sales.satanicspider74
New Member
- Messages
- 5
- Reaction score
- 0
- Points
- 0
So I have a page with 2 canvas elements.
Used JS to draw a 10x10 rectangle to each canvas. And they looked correct.
Then resized the canvas elements with a css class using the width and height properties. Instead of pixles I used percentage. First canvas width 100% height 88%. Second canvas width 100% height 8%.
Without changing the js the squares are not the same size.
Weird eh?
Used JS to draw a 10x10 rectangle to each canvas. And they looked correct.
Then resized the canvas elements with a css class using the width and height properties. Instead of pixles I used percentage. First canvas width 100% height 88%. Second canvas width 100% height 8%.
Without changing the js the squares are not the same size.
Weird eh?