From 627961627e7ed452a04c7c6011a231cbf8be468d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Fri, 23 Dec 2011 22:43:27 +0100 Subject: [PATCH] Have Path always directly apply any transformation to its Segments. This is required so the coordinates of its bounds, length and SegmentPoints are always in the same space. --- src/path/Path.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/path/Path.js b/src/path/Path.js index d630c8ea..9633e39f 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -21,6 +21,7 @@ * * @extends PathItem */ +// DOCS: Explain that path matrix is always applied with each transformation. var Path = this.Path = PathItem.extend(/** @lends Path# */{ /** * Creates a new Path item and places it at the top of the active layer. @@ -206,6 +207,11 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{ // path, with the added benefit that b can be < a, and closed looping is // taken into account. + // DOCS: Explain that path matrix is always applied with each transformation. + transform: function(matrix) { + this.base(matrix, true); + }, + _apply: function(matrix) { var coords = new Array(6); for (var i = 0, l = this._segments.length; i < l; i++) {