Yinteger / Jiggy.io

GNU General Public License v3.0
1 stars 1 forks source link

Bug/#14 canvas resizes constantly by 1px #18

Closed Yinteger closed 6 years ago

Yinteger commented 6 years ago

The autoSize method of ViewPort was buggy, with an offset that caused the screen to flicker or grow. Removed the API and added a new fillPage API, which uses fixed positioning, and top/left of 0px to position the canvas at the top left of the screen. Then it grabs the window.innerHeight and window.innerWidth to set the width/height of the canvas to fill the entire page. It also uses window.onresize to dynamically update if the page is resized.