Skip to content

Commit b54bdad

Browse files
committed
Rename Item#transformContent to #applyMatrix.
1 parent 9d47bfc commit b54bdad

3 files changed

Lines changed: 12 additions & 10 deletions

File tree

examples/Rasters/PhyllotaxisRaster.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
// Create the group of circle shaped paths and scale it up a bit:
3030
var group = createPhyllotaxis(values.amount);
31-
group.transformContent = true;
31+
group.applyMatrix = true;
3232
group.scale(3);
3333

3434
function createPhyllotaxis(amount) {

src/item/Item.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ var Item = this.Item = Base.extend(Callback, /** @lends Item# */{
9191

9292
// Only for external sources, e.g. Raster
9393
onLoad: {}
94-
});
94+
}
95+
);
9596
},
9697

9798
initialize: function(pointOrMatrix) {
@@ -387,7 +388,7 @@ var Item = this.Item = Base.extend(Callback, /** @lends Item# */{
387388
* @type Boolean
388389
* @default false
389390
*/
390-
transformContent: false,
391+
applyMatrix: false,
391392

392393
/**
393394
* Specifies whether an item is selected and will also return {@code true}
@@ -1861,12 +1862,12 @@ var Item = this.Item = Base.extend(Callback, /** @lends Item# */{
18611862
if (this._transform)
18621863
this._transform(matrix);
18631864
// If we need to directly apply the accumulated transformations, call
1864-
// #applyMatrix() with the internal _,atrix, and set it to the identity
1865+
// #_applyMatrix() with the internal _matrix, and set it to the identity
18651866
// transformation if it was possible to apply it. Application is not
18661867
// possible on Raster, PointText, PlacedSymbol, since the matrix is
18671868
// storing the actual location / transformation state.
1868-
if ((this.transformContent || arguments[1])
1869-
&& this.applyMatrix(this._matrix))
1869+
if ((this.applyMatrix || arguments[1])
1870+
&& this._applyMatrix(this._matrix))
18701871
// TODO: This needs a _changed notification, but the GEOMETRY
18711872
// actually doesn't change! What to do?
18721873
this._matrix.setIdentity();
@@ -1899,7 +1900,7 @@ var Item = this.Item = Base.extend(Callback, /** @lends Item# */{
18991900
return this;
19001901
},
19011902

1902-
applyMatrix: function(matrix) {
1903+
_applyMatrix: function(matrix) {
19031904
// Pass on the transformation to the children, and apply it there too:
19041905
if (this._children) {
19051906
for (var i = 0, l = this._children.length; i < l; i++)

src/path/Path.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
// DOCS: Explain that path matrix is always applied with each transformation.
2525
var Path = this.Path = PathItem.extend(/** @lends Path# */{
2626
_type: 'path',
27-
// Paths directly apply transformation matrices to the Segments by default.
28-
transformContent: true,
2927

3028
/**
3129
* Creates a new Path item and places it at the top of the active layer.
@@ -249,7 +247,10 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
249247
return true;
250248
},
251249

252-
applyMatrix: function(matrix) {
250+
// Paths directly apply transformation matrices to the Segments by default.
251+
applyMatrix: true,
252+
253+
_applyMatrix: function(matrix) {
253254
var coords = new Array(6);
254255
for (var i = 0, l = this._segments.length; i < l; i++) {
255256
this._segments[i]._transformCoordinates(matrix, coords, true);

0 commit comments

Comments
 (0)