From 6ff9882c7c85fcd399b9c623f60d5d466cdbb99b Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Thu, 28 Jun 2018 23:15:31 +0200 Subject: satisfy linter, fix global var --- src/helpers.js | 4 ++-- src/matrix.js | 2 +- src/transform.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/helpers.js b/src/helpers.js index 9159b4f..99a7c0b 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -262,10 +262,10 @@ function formatTransforms (o) { function getOrigin (o, element) { // Allow origin or around as the names - origin = o.around == null ? o.origin : o.around + let origin = o.around == null ? o.origin : o.around // Allow the user to pass a string to rotate around a given point - if ( typeof origin === 'string' || origin == null ) { + if (typeof origin === 'string' || origin == null) { // Get the bounding box of the element with no transformations applied const string = (origin || 'center').toLowerCase().trim() const { height, width, x, y } = element.bbox() diff --git a/src/matrix.js b/src/matrix.js index 31d3d58..05e9c7d 100644 --- a/src/matrix.js +++ b/src/matrix.js @@ -103,7 +103,7 @@ SVG.Matrix = SVG.invent({ }, // Decomposes this matrix into its affine parameters - decompose: function (cx=0, cy=0) { + decompose: function (cx = 0, cy = 0) { // Get the parameters from the matrix var a = this.a var b = this.b diff --git a/src/transform.js b/src/transform.js index 6b40161..c769f53 100644 --- a/src/transform.js +++ b/src/transform.js @@ -1,4 +1,4 @@ -/* global arrayToMatrix */ +/* global arrayToMatrix getOrigin */ SVG.extend(SVG.Element, { // Reset all transformations @@ -58,7 +58,7 @@ SVG.extend(SVG.Element, { } // Set the origin according to the defined transform - o.origin = getOrigin (o, this) + o.origin = getOrigin(o, this) // The user can pass a boolean, an SVG.Element or an SVG.Matrix or nothing var cleanRelative = relative === true ? this : (relative || false) -- cgit v1.2.3