diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2019-11-01 13:37:24 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2019-11-01 13:37:24 +0100 |
commit | 2827a27531c661726d204d6da9d17c6f72d8e404 (patch) | |
tree | a4180b1f462685cce0c314be16511a630d222b05 /src/utils | |
parent | 0748382e9859c31253d93b0c258487da362bcade (diff) | |
download | svg.js-2827a27531c661726d204d6da9d17c6f72d8e404.tar.gz svg.js-2827a27531c661726d204d6da9d17c6f72d8e404.zip |
Updated dependencies to newest version, new linter fixed stuff
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/adopter.js | 4 | ||||
-rw-r--r-- | src/utils/methods.js | 4 | ||||
-rw-r--r-- | src/utils/utils.js | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/utils/adopter.js b/src/utils/adopter.js index 45e9bd3..e8b30ea 100644 --- a/src/utils/adopter.js +++ b/src/utils/adopter.js @@ -129,7 +129,7 @@ export function extend (modules, methods, attrCheck) { export function wrapWithAttrCheck (fn) { return function (...args) { - let o = args[args.length - 1] + const o = args[args.length - 1] if (o && o.constructor === Object && !(o instanceof Array)) { return fn.apply(this, args.slice(0, -1)).attr(o) @@ -158,7 +158,7 @@ export function invent (config) { if (config.extend) { extend(initializer, config.extend) } // Attach construct method to parent - if (config.construct) { extend(config.parent || elements['Container'], config.construct) } + if (config.construct) { extend(config.parent || elements.Container, config.construct) } return initializer } diff --git a/src/utils/methods.js b/src/utils/methods.js index e957213..45525e3 100644 --- a/src/utils/methods.js +++ b/src/utils/methods.js @@ -3,14 +3,14 @@ const names = [] export function registerMethods (name, m) { if (Array.isArray(name)) { - for (let _name of name) { + for (const _name of name) { registerMethods(_name, m) } return } if (typeof name === 'object') { - for (let _name in name) { + for (const _name in name) { registerMethods(_name, name[_name]) } return diff --git a/src/utils/utils.js b/src/utils/utils.js index c2046a9..5d8706e 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -75,7 +75,7 @@ export function proportionalSize (element, width, height, box) { export function getOrigin (o, element) { // Allow origin or around as the names - let origin = o.origin // o.around == null ? o.origin : o.around + const origin = o.origin // o.around == null ? o.origin : o.around let ox, oy // Allow the user to pass a string to rotate around a given point @@ -85,10 +85,10 @@ export function getOrigin (o, element) { const { height, width, x, y } = element.bbox() // Calculate the transformed x and y coordinates - let bx = string.includes('left') ? x + const bx = string.includes('left') ? x : string.includes('right') ? x + width : x + width / 2 - let by = string.includes('top') ? y + const by = string.includes('top') ? y : string.includes('bottom') ? y + height : y + height / 2 |