{"id":1714,"date":"2017-03-07T22:49:13","date_gmt":"2017-03-08T03:49:13","guid":{"rendered":"https:\/\/rpchurchill.com\/wordpress\/?p=1714"},"modified":"2017-09-15T07:33:47","modified_gmt":"2017-09-15T12:33:47","slug":"a-simple-discrete-event-simulation-part-86","status":"publish","type":"post","link":"https:\/\/rpchurchill.com\/wordpress\/posts\/2017\/03\/07\/a-simple-discrete-event-simulation-part-86\/","title":{"rendered":"A Simple Discrete-Event Simulation: Part 86"},"content":{"rendered":"<p>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&#8217;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.<\/p>\n<p>I corrected all of that, as you&#8217;ll see directly in tomorrow&#8217;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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <a href=\"https:\/\/rpchurchill.com\/wordpress\/posts\/2017\/03\/07\/a-simple-discrete-event-simulation-part-86\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[121,49,148,161],"_links":{"self":[{"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/posts\/1714"}],"collection":[{"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1714"}],"version-history":[{"count":1,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/posts\/1714\/revisions"}],"predecessor-version":[{"id":1715,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/posts\/1714\/revisions\/1715"}],"wp:attachment":[{"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}