Index: experimental/webtry/res/js/webtry.js |
diff --git a/experimental/webtry/res/js/webtry.js b/experimental/webtry/res/js/webtry.js |
index 3514a001966c2ed547d4b907247faef1490b15a2..f0a5bb5327213383c051cdf4ff42c9a7aad46705 100644 |
--- a/experimental/webtry/res/js/webtry.js |
+++ b/experimental/webtry/res/js/webtry.js |
@@ -73,9 +73,9 @@ |
this.parentNode.insertBefore(canvasCopy, this); |
} |
- document.body.addEventListener('mousemove', zoomMove, true); |
- document.body.addEventListener('mouseup', zoomFinished); |
- document.body.addEventListener('mouseleave', zoomFinished); |
+ document.body.addEventListener('pointermove', zoomMove, true); |
+ document.body.addEventListener('pointerup', zoomFinished); |
+ document.body.addEventListener('pointerleave', zoomFinished); |
// Kick off the drawing. |
setTimeout(drawZoom, 1); |
@@ -141,15 +141,15 @@ |
document.body.style.cursor = 'default'; |
ctx.canvas.parentNode.removeChild(ctx.canvas); |
canvasCopy.parentNode.removeChild(canvasCopy); |
- document.body.removeEventListener('mousemove', zoomMove, true); |
- document.body.removeEventListener('mouseup', zoomFinished); |
- document.body.removeEventListener('mouseleave', zoomFinished); |
+ document.body.removeEventListener('pointermove', zoomMove, true); |
+ document.body.removeEventListener('pointerup', zoomFinished); |
+ document.body.removeEventListener('pointerleave', zoomFinished); |
} |
this.addEventListener('DOMContentLoaded', function() { |
var zoomables = document.body.querySelectorAll('.zoom'); |
for (var i=0; i<zoomables.length; i++) { |
- zoomables[i].addEventListener('mousedown', zoomMouseDown); |
+ zoomables[i].addEventListener('pointerdown', zoomMouseDown); |
} |
}); |
})(); |