From c37d94a4dccd3c0d2ce8db99bd80b6e514f5c7de Mon Sep 17 00:00:00 2001 From: Saivan Date: Mon, 5 Mar 2018 02:40:32 +1100 Subject: Removed gbox and fixed a few typos Since gbox is completely replaced by rbox, we don't need it anymore. There were also a few small errors to fix. --- src/group.js | 14 -------------- src/matrix.js | 2 +- src/sugar.js | 2 +- 3 files changed, 2 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/group.js b/src/group.js index 22cd47a..0088a1c 100644 --- a/src/group.js +++ b/src/group.js @@ -7,20 +7,6 @@ SVG.G = SVG.invent({ // Add class methods extend: { - gbox: function () { - var bbox = this.bbox() - var trans = this.transform() - - bbox.x += trans.e - bbox.x2 += trans.e - bbox.cx += trans.e - - bbox.y += trans.f - bbox.y2 += trans.f - bbox.cy += trans.f - - return bbox - } }, // Add parent method diff --git a/src/matrix.js b/src/matrix.js index fda6e19..786d1c1 100644 --- a/src/matrix.js +++ b/src/matrix.js @@ -6,7 +6,7 @@ SVG.Matrix = SVG.invent({ var base = arrayToMatrix([1, 0, 0, 1, 0, 0]) var i - // ensure source as object// ens + // ensure source as object source = source instanceof SVG.Element ? source.matrixify() : typeof source === 'string' ? arrayToMatrix(source.split(SVG.regex.delimiter).map(parseFloat)) : Array.isArray(source) ? arrayToMatrix(source) diff --git a/src/sugar.js b/src/sugar.js index 29f632d..e3ed6a5 100644 --- a/src/sugar.js +++ b/src/sugar.js @@ -88,7 +88,7 @@ SVG.extend([SVG.Element, SVG.FX], { : (direction === 'y') ? [0, around] : isFinite(direction) ? [direction, direction] : [0, 0] - this.transform({flip: directionString, ox: origin[0], oy: origin[1]}, true) + this.transform({flip: directionString, origin: origin}, true) }, // Opacity -- cgit v1.2.3