Fix cases where toolPoint was null.

This commit is contained in:
Jürg Lehni 2016-03-27 21:41:22 -07:00
parent 27f866df61
commit e054b760ed
2 changed files with 2 additions and 2 deletions

View file

@ -19,7 +19,7 @@ var jsdom = require('jsdom');
/* global document:true, window:true */
var document = jsdom.jsdom('<html><body></body></html>', {
features: {
FetchExternalResources : ['img', 'script']
FetchExternalResources: ['img', 'script']
}
}),
window = document.defaultView;

View file

@ -307,7 +307,7 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{
// clicks, so mouseup has a delta spanning over the full drag.
// Use the current point if this is the first mousedown, so
// there's always a delta.
toolPoint = move ? tool._point : tool._downPoint || pt;
toolPoint = (move ? tool._point : tool._downPoint) || pt;
if (move) {
if (tool._moveCount && pt.equals(toolPoint)) {
return false;