HTML5 canvas ignores width and height set in JavaScript (solved)
By Vandersteene
29 Jun 2013 03:33
English
4 Replies
Hello,
I'm using a HTML5 canvas to draw on but everything is scaled to 150% and positioned at 150% of what is specified. For example, on the screen the canvas has size (450, 450) although in the JavaScript source the size is set to (300, 300).
Adding the viewport tag to the head tag in the index.html file solved the problem: meta name="viewport" content="width=480, height=800, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"
Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.
You must log in to use this service. Log in now?
The tag you entered already exists.
Do you want to report this post as spam?
The post has been reported as spam.
cannot be empty.
Are you sure you want to cancel and return to the list?
The code has been copied to the clipboard.
Enter a title.
All Categories
General Support
Tizen .NET
Web Application Development
Native Application Development
SDK & IDE
--------
--------