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:
Jürg Lehni 2011-05-20 08:28:49 +01:00
parent 4153bc0fbf
commit d6a49e2eb4

View file

@ -34,11 +34,9 @@ var PointText = this.PointText = TextItem.extend({
setPoint: function(point) {
point = Point.read(arguments);
if (point) {
var delta = point.subtract(this._point);
this.matrix.preConcatenate(new Matrix().translate(delta));
this._point = point;
}
var delta = point.subtract(this._point);
this.matrix.preConcatenate(new Matrix().translate(delta));
this._point = point;
},
// TODO: position should be the center point of the bounds