Handle page resizing
Better detect mouse leave/enter canvas