In Framer Studio the following code is working (letting me draw stuff on Canvas at the mouse Position), yet on iPhone it's producing 'underfined' for myX and myY. Any ideas?
myCanvasView.on Events.TouchMove, (event, layer) -> myTouchEvent = Events.touchEvent(event) myX = myTouchEvent.x myY = myTouchEvent.y
OK I solved it—seems I need a slightly different way to access the touches directly on the phone.
myCanvasView.on Events.TouchMove, (event, layer) -> myTouchEvent = Events.touchEvent(event) if (Utils.isPhone()) myX = event.touches.screenX myY = event.touches.screenY else myX = myTouchEvent.x myY = myTouchEvent.y
I want to add that I only solved this due to the quick try-and-see nature of Framer. I had a to Google for some time to find reference to this other method, and there was a lot of trying permutations, but because no compile/share cycle I wasn't discouraged past the threshold of stopping trying. So, kudos to the Framer Studio team. The realtime nature of the desktop app, including using Frameless on my iPhone make a really big difference and your team's work is very appreciated
Oh, and the console implementation on both desktop and iPhone are super nice, and saved the day.