diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/adopter.js | 2 | ||||
-rw-r--r-- | src/utils/methods.js | 2 | ||||
-rw-r--r-- | src/utils/utils.js | 8 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/utils/adopter.js b/src/utils/adopter.js index a826607..5830f5c 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 |