mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Tool: check for event first, before checking for event.targetTouches.
This commit is contained in:
parent
72976f4191
commit
97b7dacfa2
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ var Tool = this.Tool = ToolHandler.extend(new function() {
|
||||||
// If the event was triggered by a touch screen device,
|
// If the event was triggered by a touch screen device,
|
||||||
// prevent the default behaviour, as it will otherwise
|
// prevent the default behaviour, as it will otherwise
|
||||||
// scroll the page:
|
// scroll the page:
|
||||||
if (event.targetTouches)
|
if (event && event.targetTouches)
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var point = event && viewToArtwork(event, that._document);
|
var point = event && viewToArtwork(event, that._document);
|
||||||
// If there is only an onMouseMove handler, call it when
|
// If there is only an onMouseMove handler, call it when
|
||||||
|
|
Loading…
Reference in a new issue