mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-08 05:42:07 -05:00
No need to check result of Point.read(), as it will always be a Point (_readNull is only defined for Color).
This commit is contained in:
parent
4153bc0fbf
commit
d6a49e2eb4
1 changed files with 3 additions and 5 deletions
|
@ -34,11 +34,9 @@ var PointText = this.PointText = TextItem.extend({
|
||||||
|
|
||||||
setPoint: function(point) {
|
setPoint: function(point) {
|
||||||
point = Point.read(arguments);
|
point = Point.read(arguments);
|
||||||
if (point) {
|
var delta = point.subtract(this._point);
|
||||||
var delta = point.subtract(this._point);
|
this.matrix.preConcatenate(new Matrix().translate(delta));
|
||||||
this.matrix.preConcatenate(new Matrix().translate(delta));
|
this._point = point;
|
||||||
this._point = point;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// TODO: position should be the center point of the bounds
|
// TODO: position should be the center point of the bounds
|
||||||
|
|
Loading…
Reference in a new issue