richardfxr / fixel

A collaborative web-based pixel art creator.
https://www.fixel.io/
0 stars 0 forks source link

Cursor becomes misaligned after resizing #10

Closed richardfxr closed 5 months ago

richardfxr commented 5 months ago

The cursor position for users becomes offset if the window is resized after initial load. This issue also occurs without resizing at times.

richardfxr commented 5 months ago

This was caused by the width and height of interactionArea not updating when the window was resized. A ResizeObserver is now set to observe interactionArea and update the width and height values accordingly.