A Simple Discrete-Event Simulation: Part 86

I was working to add the next behavior when I discovered that things that used to work no longer did. After a bit of digging I realized that the problem was trying to handle click events separately from mouseup and mousedown events. It turns out that it isn’t really possible to separate them out; a click events also fires off a mousedown and a mouseup event. I therefore had to handle the click behavior in an integrated way as I do when handling touch events. The way to differentiate a click from a drag is to ensure the mouseup event occurs within a specified time window and that not too much movement has occurred.

I corrected all of that, as you’ll see directly in tomorrow’s code. It uses ideas I had stubbed in previously. I also realized I was using the wrong time stamping method and changed all of the relevant calls to use the correct one.

This entry was posted in Software and tagged , , , . Bookmark the permalink.

Leave a Reply