open-rmf / rmf_site

Experimental visualizer for dense buildings in RMF
33 stars 13 forks source link

Fix dragging behavior when FPS is low #168

Closed luca-della-vedova closed 1 year ago

luca-della-vedova commented 1 year ago

Bug fix

Fixed bug

Starting and finishing dragging is done by two separate systems where:

This can cause an issue in cases when the FPS of the application is very low and the button is pressed and released on the same frame. We can get stuck in dragging behavior with the second system failing to cleanup the dragging.

Fix applied

This PR changes the drag start system to only start dragging if the button was pressed but not released in the current frame.