mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Replace accidental beans access in Item#setBounds with corresponding getters.
This commit is contained in:
parent
7285d6fc85
commit
d13e9bbaa1
1 changed files with 2 additions and 2 deletions
|
@ -1046,7 +1046,7 @@ var Item = this.Item = Base.extend({
|
|||
rect = Rectangle.read(arguments);
|
||||
var bounds = this.getBounds(),
|
||||
matrix = new Matrix(),
|
||||
center = rect.center;
|
||||
center = rect.getCenter();
|
||||
// Read this from bottom to top:
|
||||
// Translate to new center:
|
||||
matrix.translate(center);
|
||||
|
@ -1057,7 +1057,7 @@ var Item = this.Item = Base.extend({
|
|||
bounds.height != 0 ? rect.height / bounds.height : 1);
|
||||
}
|
||||
// Translate to center:
|
||||
center = bounds.center;
|
||||
center = bounds.getCenter();
|
||||
matrix.translate(-center.x, -center.y);
|
||||
// Now execute the transformation:
|
||||
this.transform(matrix);
|
||||
|
|
Loading…
Reference in a new issue