I have a web app that scales a div to match the screen size. Let's say that the div has 500px width and the screen is 600px, so by javascript I set to the div a transform: scale(1.2)
css property and it matches to the screen size. Inside the div I have a canvas that is also scaled. I use KonvaJS to draw elements and I need to drag them. When I run the app in a computer the drag works well, but when I run in a mobile, iPad or iPhone there is an offset in the drag, I have to put my finger outside the element to be able to drag it.
Here you can see a simple approach https://jsfiddle.net/aapdl/47x75uuq/2/
Try to drag each box in a computer and then in an mobile, iPad or iPhone.
Thanks.
Asked
Active
Viewed 84 times
0

aapdl
- 1
- 2
-
Hi, I update the url, I made the div smaller so that the scale would be bigger, if you want, check again. – aapdl Apr 27 '16 at 18:52
-
I need a fixed dimensions canvas. – aapdl Apr 27 '16 at 19:17