SmilyOrg / photofield

Experimental fast photo viewer.
MIT License
402 stars 7 forks source link

Cursor does not show up as a hand on hover #21

Closed SmilyOrg closed 1 year ago

SmilyOrg commented 1 year ago

Describe the bug If you hover over photos, the cursor remains an arrow, when it should be a hand instead, indicating that you can click on them to zoom in.

Additional context This is because the photos don't actually exist as individual objects, making this a non-trivial functionality to add,

See also user reports #1, #2, #3

A few possible solutions:

  1. Each photo is created as an individual object (as a vector map?). This has performance implications when showing thousands or tens of thousands of photos.
  2. The server is queried for each mouse position to check if it's over a photo or not. This needs minimal additional implementation, but seems unpractical as it would spam the API too much and look laggy / delayed.
  3. The frontend is able to query the loaded images directly (or some mask equivalent loaded in the background) and can tell which pixel is a photo and which one isn't.