caleb531 / jcanvas

A jQuery plugin that makes the HTML5 canvas easy to work with.
https://projects.calebevans.me/jcanvas/
MIT License
626 stars 192 forks source link

drawText aligning not working on mobile #330

Closed qroft closed 6 years ago

qroft commented 6 years ago

Thanks a lot for this plugin! At the moment i am creating a hybrid app via Phonegap based on the Onsen UI.

When i use the align:'right' as option within a drawText object, on my Chrome browser everything looks awesome. But while checking it via the Phonegap App on my Android smartphone, the text is not right aligned.

caleb531 commented 6 years ago

@qroft jCanvas is just using the native canvas textAlign property to make that happen. So I would recommend creating a small example using native canvas and textAlign, and testing on both Chrome and Phonegap+Android. If there's still a discrepancy, then it's a larger issue than jCanvas. If not, then it's a definite jCanvas bug. https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/textAlign

If this sounds good to you, please let me know what you find. :)

caleb531 commented 6 years ago

@qroft I'm closing this issue unless you are still experiencing problems.