mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
parent
9fb48d1dd4
commit
2218ca31f6
1 changed files with 3 additions and 2 deletions
|
@ -72,6 +72,7 @@ var CanvasView = View.extend(/** @lends CanvasView# */{
|
||||||
lastPoint,
|
lastPoint,
|
||||||
overPoint,
|
overPoint,
|
||||||
downItem,
|
downItem,
|
||||||
|
lastItem,
|
||||||
overItem,
|
overItem,
|
||||||
hasDrag,
|
hasDrag,
|
||||||
doubleClick,
|
doubleClick,
|
||||||
|
@ -122,8 +123,8 @@ var CanvasView = View.extend(/** @lends CanvasView# */{
|
||||||
var item = handleEvent(this, 'mousedown', event, point);
|
var item = handleEvent(this, 'mousedown', event, point);
|
||||||
// See if we're clicking again on the same item, within the
|
// See if we're clicking again on the same item, within the
|
||||||
// double-click time. Firefox uses 300ms as the max time difference:
|
// double-click time. Firefox uses 300ms as the max time difference:
|
||||||
doubleClick = downItem == item && Date.now() - clickTime < 300;
|
doubleClick = lastItem == item && (Date.now() - clickTime < 300);
|
||||||
downItem = item;
|
downItem = lastItem = item;
|
||||||
downPoint = lastPoint = overPoint = point;
|
downPoint = lastPoint = overPoint = point;
|
||||||
hasDrag = downItem && downItem.responds('mousedrag');
|
hasDrag = downItem && downItem.responds('mousedrag');
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue