GlenDC / trixel

An easy to use webtool, to make trixel art.
http://www.glendc.com/trixel/
MIT License
18 stars 0 forks source link

Cursor Preview Trixel is wrong #8

Closed GlenDC closed 9 years ago

GlenDC commented 9 years ago

The position of the cursor-preview-trixel is now always correct. This is especially true when we're zoomed in and offset our grid.

GlenDC commented 9 years ago

This one can be solved by:

  1. Transforming the cursor into a center-position of a triangle T
  2. If the cursor is not within T, we concider T's left/up neighbour N iff it exist
  3. If the cursor is not within N or N does not exist, we consider T's right/down neighbour M, iff it exist
  4. A solution can't be found if cursor is not within M or M does not exist
GlenDC commented 9 years ago

This issue is almost solved. We still need to fix the cursor Preview for all situations where scale > 1.