Fixed a particularly nasty bug where dragging the blank over the drag handle would send it to the first (top left) square. Even though the drag handle isn’t a tile, it was considered part of the board as it overlayed the tiles. The function responsible for identifying the tile to swap correctly returned undefined when dragging over the handle, but JavaScript’s type coercion converted this to 0, resulting in the blank moving to the 0th (top left) position. The fix is rejecting the swap when the identification function returns undefined.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.