diff options
Diffstat (limited to 'src/transform.js')
-rw-r--r-- | src/transform.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/transform.js b/src/transform.js index 1635152..33f5019 100644 --- a/src/transform.js +++ b/src/transform.js @@ -58,13 +58,13 @@ SVG.extend(SVG.Element, { matrix = matrix.scale(o.scaleX, o.scaleY, o.cx, o.cy) // act on skew - } else if (o.skewX != null || o.skewY != null) { + } else if (o.skew != null || o.skewX != null || o.skewY != null) { // ensure centre point ensureCentre(o, target) // ensure skew values on both axes - o.skewX = o.skewX != null ? o.skewX : 0 - o.skewY = o.skewY != null ? o.skewY : 0 + o.skewX = o.skew != null ? o.skew : o.skewX != null ? o.skewX : 0 + o.skewY = o.skew != null ? o.skew : o.skewY != null ? o.skewY : 0 if (!relative) { // absolute; reset skew values @@ -267,6 +267,12 @@ SVG.Transformation = SVG.invent({ o[this.arguments[i]] = typeof this[this.arguments[i]] == 'undefined' ? 0 : o[this.arguments[i]] } + // The method SVG.Matrix.extract which was used before calling this + // method to obtain a value for the parameter o doesn't return a cx and + // a cy so we use the ones that were provided to this object at its creation + o.cx = this.cx + o.cy = this.cy + this._undo = new SVG[capitalize(this.method)](o, true).at(1) return this |