mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-28 17:02:24 -05:00
Allow pointer events to be used if supported
This commit is contained in:
parent
112047f5ad
commit
fb7d27cb85
1 changed files with 3 additions and 1 deletions
|
@ -53,6 +53,8 @@ var View = Base.extend(Emitter, /** @lends View# */{
|
|||
DomElement.setPrefixed(element.style, {
|
||||
userDrag: none,
|
||||
userSelect: none,
|
||||
// Prevent pointer events from doing things like panning the page
|
||||
touchAction: none,
|
||||
touchCallout: none,
|
||||
contentZooming: none,
|
||||
tapHighlightColor: 'rgba(0,0,0,0)'
|
||||
|
@ -1069,7 +1071,7 @@ new function() { // Injection scope for event handling on the browser
|
|||
// Touch handling inspired by Hammer.js
|
||||
var navigator = window.navigator,
|
||||
mousedown, mousemove, mouseup;
|
||||
if (navigator.pointerEnabled || navigator.msPointerEnabled) {
|
||||
if (window.PointerEvent || navigator.msPointerEnabled) {
|
||||
// HTML5 / MS pointer events
|
||||
mousedown = 'pointerdown MSPointerDown';
|
||||
mousemove = 'pointermove MSPointerMove';
|
||||
|
|
Loading…
Reference in a new issue