Fix error in ToolEvent#delta.

This commit is contained in:
Jürg Lehni 2011-05-08 17:32:59 +01:00
parent 4d6ca5c8c6
commit c44b9b254e

View file

@ -127,7 +127,7 @@ var ToolEvent = this.ToolEvent = Base.extend({
// Instead, keep calculating the delta each time, so the result can be
// directly modified by the script without changing the internal values.
// We could cache this and use clone, but this is almost as fast...
return this._delta && this.tool.lastPoint
return !this._delta && this.tool.lastPoint
? this.tool.point.subtract(this.tool.lastPoint)
: this._delta;
},