Ionic/Capacitor Rounds HTML Canvas coordinates in XCode build, not in dev server #4991
Unanswered
andrew-lyons
asked this question in
Q&A
Replies: 1 comment
-
When you use ionic serve you mean you are running on desktop or you load the site on the phone? I've added a touch listener to the body and on the iPhone I always get integers, doesn't matter if it's a website or a Capacitor app, while on desktop browsers and Android I get floating points. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am developing a capacitor plugin that requires floating point numbers from the client. I am using an HTML canvas and listening to the touch events associated.
When using ionic serve for the dev environment, my touchevent data looks like this:
but in my XCode build, I log this:
Notice the XCode results are integers, not floating point or doubles. I have no idea why this would be different between the dev environment and production build. Anyone have insights?
Beta Was this translation helpful? Give feedback.
All reactions