mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Fix cases where toolPoint was null.
This commit is contained in:
parent
27f866df61
commit
e054b760ed
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue