diff --git a/src/item/Clip.js b/src/item/Clip.js index f6061fa5..f554148d 100644 --- a/src/item/Clip.js +++ b/src/item/Clip.js @@ -21,7 +21,7 @@ * @extends Group */ var Clip = Group.extend(/** @lends Clip# */{ - _applyMatrix: false, + _transformContent: false, initialize: function Clip() { Group.apply(this, arguments); diff --git a/src/item/Group.js b/src/item/Group.js index eaff646b..d0fafac6 100644 --- a/src/item/Group.js +++ b/src/item/Group.js @@ -98,7 +98,7 @@ var Group = Item.extend(/** @lends Group# */{ _changed: function _changed(flags) { _changed.base.call(this, flags); - if (flags & /*#=*/ ChangeFlag.HIERARCHY && this._applyMatrix + if (flags & /*#=*/ ChangeFlag.HIERARCHY && this._transformContent && !this._matrix.isIdentity()) { // Apply matrix now that we have content. this.applyMatrix(); diff --git a/src/item/Item.js b/src/item/Item.js index 0aa9f295..9ad2a2a0 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -43,7 +43,7 @@ var Item = Base.extend(Callback, /** @lends Item# */{ // All items apply their matrix by default. // Exceptions are Raster, PlacedSymbol, Clip and Shape. - _applyMatrix: true, + _transformContent: true, _boundsSelected: false, // Provide information about fields to be serialized, with their defaults // that can be ommited. @@ -2219,7 +2219,7 @@ var Item = Base.extend(Callback, /** @lends Item# */{ this._matrix.preConcatenate(matrix); // Call applyMatrix if we need to directly apply the accumulated // transformations to the item's content. - if (this._applyMatrix || arguments[1]) + if (this._transformContent || arguments[1]) this.applyMatrix(true); // We always need to call _changed since we're caching bounds on all // items, including Group. @@ -2250,7 +2250,7 @@ var Item = Base.extend(Callback, /** @lends Item# */{ return this; }, - _transformContent: function(matrix, applyMatrix) { + _applyMatrix: function(matrix, applyMatrix) { var children = this._children; if (children && children.length > 0) { for (var i = 0, l = children.length; i < l; i++) @@ -2260,14 +2260,14 @@ var Item = Base.extend(Callback, /** @lends Item# */{ }, applyMatrix: function(_dontNotify) { - // Call #_transformContent() with the internal _matrix and pass true for + // Call #_applyMatrix() with the internal _matrix and pass true for // applyMatrix. Application is not possible on Raster, PointText, // PlacedSymbol, since the matrix is where the actual location / // transformation state is stored. // Pass on the transformation to the content, and apply it there too, // by passing true for the 2nd hidden parameter. var matrix = this._matrix; - if (this._transformContent(matrix, true)) { + if (this._applyMatrix(matrix, true)) { // When the matrix could be applied, we also need to transform // color styles with matrices (only gradients so far): var style = this._style, diff --git a/src/item/PlacedSymbol.js b/src/item/PlacedSymbol.js index 08b5f189..cf7f00c0 100644 --- a/src/item/PlacedSymbol.js +++ b/src/item/PlacedSymbol.js @@ -19,7 +19,7 @@ * @extends Item */ var PlacedSymbol = Item.extend(/** @lends PlacedSymbol# */{ - _applyMatrix: false, + _transformContent: false, // PlacedSymbol uses strokeBounds for bounds _boundsGetter: { getBounds: 'getStrokeBounds' }, _boundsSelected: true, diff --git a/src/item/Raster.js b/src/item/Raster.js index 27fe9ac7..093583d6 100644 --- a/src/item/Raster.js +++ b/src/item/Raster.js @@ -18,7 +18,7 @@ * @extends Item */ var Raster = Item.extend(/** @lends Raster# */{ - _applyMatrix: false, + _transformContent: false, // Raster doesn't make the distinction between the different bounds, // so use the same name for all of them _boundsGetter: 'getBounds', diff --git a/src/item/Shape.js b/src/item/Shape.js index 8f633103..b2338007 100644 --- a/src/item/Shape.js +++ b/src/item/Shape.js @@ -18,7 +18,7 @@ * @extends Item */ var Shape = Item.extend(/** @lends Shape# */{ - _applyMatrix: false, + _transformContent: false, initialize: function Shape(type, point, size) { Item.call(this, point); diff --git a/src/path/Path.js b/src/path/Path.js index bcae3a74..451d5828 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -295,7 +295,7 @@ var Path = PathItem.extend(/** @lends Path# */{ return true; }, - _transformContent: function(matrix) { + _applyMatrix: function(matrix) { var coords = new Array(6); for (var i = 0, l = this._segments.length; i < l; i++) this._segments[i]._transformCoordinates(matrix, coords, true);