June 2015
Beginner
354 pages
8h 23m
English
Let's allow our tablet users to drag-n-drop our circles with the following steps:
canvas element in iOS devices. We want to get rid of this highlighted part to make the dragging interaction smooth. Add the following CSS rules to the canvas CSS. Please note that we use the webkit vendor prefix here because this rule is specific for webkit at the time of writing this book:canvas {
/* for iOS devices */
-webkit-tap-highlight-color: transparent;
}untangle.input.js file. We bind the mouse events on the Canvas in the previous step. Now we add the support for touch events. We used MouseEvent.pageX and pageY to calculate the mouse position. With ...Read now
Unlock full access