mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Rename #transformContent() to #_transform(), to make sure it's supposed to be a private method.
This commit is contained in:
parent
1f29f6f104
commit
53b091b871
4 changed files with 6 additions and 6 deletions
|
@ -591,8 +591,8 @@ Item = Base.extend({
|
|||
// TODO: Handle flags, add TransformFlag class and convert to bit mask
|
||||
// for quicker checking
|
||||
// TODO: Call transform on chidren only if 'children' flag is provided
|
||||
if (this.transformContent)
|
||||
this.transformContent(matrix, flags);
|
||||
if (this._transform)
|
||||
this._transform(matrix, flags);
|
||||
if (this.children) {
|
||||
for (var i = 0, l = this.children.length; i < l; i++) {
|
||||
var child = this.children[i];
|
||||
|
@ -602,7 +602,7 @@ Item = Base.extend({
|
|||
},
|
||||
|
||||
/*
|
||||
transformContent: function(matrix, flags) {
|
||||
_transform: function(matrix, flags) {
|
||||
// The code that performs the actual transformation of content,
|
||||
// if defined. Item itself does not define this.
|
||||
},
|
||||
|
|
|
@ -25,7 +25,7 @@ PlacedSymbol = Item.extend({
|
|||
this._size = this._bounds.size;
|
||||
},
|
||||
|
||||
transformContent: function(matrix, flags) {
|
||||
_transform: function(matrix, flags) {
|
||||
var width = this._size.width;
|
||||
var height = this._size.height;
|
||||
var x = width * -0.5;
|
||||
|
|
|
@ -149,7 +149,7 @@ Raster = Item.extend({
|
|||
this._canvas = canvas;
|
||||
},
|
||||
|
||||
transformContent: function(matrix, flags) {
|
||||
_transform: function(matrix, flags) {
|
||||
// In order to set the right context transformation when drawing the
|
||||
// raster, simply preconcatenate the internal matrix with the provided
|
||||
// one.
|
||||
|
|
|
@ -70,7 +70,7 @@ Path = PathItem.extend({
|
|||
return -result.b;
|
||||
},
|
||||
|
||||
transformContent: function(matrix, flags) {
|
||||
_transform: function(matrix, flags) {
|
||||
var coords = new Array(6);
|
||||
for (var i = 0, l = this._segments.length; i < l; i++) {
|
||||
var segment = this._segments[i];
|
||||
|
|
Loading…
Reference in a new issue