Adding canvas resizing trigger to window.onResize