diff options
author | Saivan <savian@me.com> | 2018-03-05 02:24:43 +1100 |
---|---|---|
committer | Saivan <savian@me.com> | 2018-03-05 02:24:43 +1100 |
commit | 4a03212d2dfac7079d51bd98faefe423889761cf (patch) | |
tree | 7cc09f4340d98ffc8317ab40b47028810b8cb167 /src/group.js | |
parent | c64401369e6a2e066c9a38abd7b0e385555fe36d (diff) | |
download | svg.js-4a03212d2dfac7079d51bd98faefe423889761cf.tar.gz svg.js-4a03212d2dfac7079d51bd98faefe423889761cf.zip |
Fixed recommendations by @Fuzzyma regarding transforms
This commit fixes a number of issues with transformations:
- Removed move/dmove/etc... on groups
- Sugar was being passed origin instead of ox, oy
- Updated the changelog
- Removed parseMatrix in favor of new SVG.Matrix()
- .matrix is the getter for a matrix, not .transform
- added a [02:24:41] Using gulpfile ~/Desktop/svg/svg.js/gulpfile.js
[02:24:41] Starting 'lint'...
[02:24:43] Finished 'lint' after 2.32 s directive
Diffstat (limited to 'src/group.js')
-rw-r--r-- | src/group.js | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/group.js b/src/group.js index dc2b60b..22cd47a 100644 --- a/src/group.js +++ b/src/group.js @@ -7,22 +7,6 @@ SVG.G = SVG.invent({ // Add class methods extend: { - // Move over x-axis - x: function (x) { - return x == null ? this.transform().e : this.translate(x - this.gbox().x, 0) - }, - // Move over y-axis - y: function (y) { - return y == null ? this.transform().f : this.translate(0, y - this.gbox().y) - }, - // Move by center over x-axis - cx: function (x) { - return x == null ? this.gbox().cx : this.x(x - this.gbox().width / 2) - }, - // Move by center over y-axis - cy: function (y) { - return y == null ? this.gbox().cy : this.y(y - this.gbox().height / 2) - }, gbox: function () { var bbox = this.bbox() var trans = this.transform() |