Uploaded February 2018 | Updated November 2026, 2 days ago
Found an interesting bug with the snap-to code, so I thought I’d post a video showing it. After an element has ‘snapped’ into place, the way I check if it’s 'unsnapped’ is to check the current mouse position with the mouse position from the previous app state, and if it’s greater than some threshold, break the snap. The (obvious, now) problem is that if the mouse moves slowly, then the difference between any two successive frames is never enough to break the snap. I’ll rework it a bit and post a proper video of it next.
Found an interesting bug with the snap-to code, so I thought I’d post a video showing it. After an element has ‘snapped’ into place, the way I check if it’s 'unsnapped’ is to check the current mouse position with the mouse position from the previous app state, and if it’s greater than some threshold, break the snap. The (obvious, now) problem is that if the mouse moves slowly, then the difference between any two successive frames is never enough to break the snap. I’ll rework it a bit and post a proper video of it next.










