aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-12-01 15:57:06 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-12-01 15:57:06 +0100
commit9546418c5ed9b1876132b43dff1ae690c3ec4e24 (patch)
treee291fe6c2443aeaaef99edf5fbc5cd1af336f43e /src/utils
parentdbe9c376fd76dd4e4777281888f4092e38512c18 (diff)
parent947964e4a257b1b1fcc9b115a218a9d8dde7513f (diff)
downloadsvg.js-9546418c5ed9b1876132b43dff1ae690c3ec4e24.tar.gz
svg.js-9546418c5ed9b1876132b43dff1ae690c3ec4e24.zip
Merge branch '790-color-spaces' into 3.0.0
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/adopter.js2
-rw-r--r--src/utils/methods.js2
-rw-r--r--src/utils/utils.js8
3 files changed, 7 insertions, 5 deletions
diff --git a/src/utils/adopter.js b/src/utils/adopter.js
index 4f50ca0..3e86d8a 100644
--- a/src/utils/adopter.js
+++ b/src/utils/adopter.js
@@ -110,7 +110,7 @@ export function assignNewId (node) {
export function extend (modules, methods, attrCheck) {
var key, i
- modules = Array.isArray(modules) ? modules : [modules]
+ modules = Array.isArray(modules) ? modules : [ modules ]
for (i = modules.length - 1; i >= 0; i--) {
for (key in methods) {
diff --git a/src/utils/methods.js b/src/utils/methods.js
index bf30a1e..bc05a70 100644
--- a/src/utils/methods.js
+++ b/src/utils/methods.js
@@ -25,7 +25,7 @@ export function getMethodsFor (name) {
}
export function getMethodNames () {
- return [...new Set(names)]
+ return [ ...new Set(names) ]
}
export function addMethodNames (_names) {
diff --git a/src/utils/utils.js b/src/utils/utils.js
index 64c0eed..3bac0de 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -18,7 +18,9 @@ export function filter (array, block) {
var result = []
for (i = 0; i < il; i++) {
- if (block(array[i])) { result.push(array[i]) }
+ if (block(array[i])) {
+ result.push(array[i])
+ }
}
return result
@@ -85,10 +87,10 @@ export function getOrigin (o, element) {
// Calculate the transformed x and y coordinates
let bx = string.includes('left') ? x
: string.includes('right') ? x + width
- : x + width / 2
+ : x + width / 2
let by = string.includes('top') ? y
: string.includes('bottom') ? y + height
- : y + height / 2
+ : y + height / 2
// Set the bounds eg : "bottom-left", "Top right", "middle" etc...
ox = o.ox != null ? o.ox : bx