Skip to content

Commit

Permalink
Don't discard possible drag event when moving outside draggable object
Browse files Browse the repository at this point in the history
Fixes #20
  • Loading branch information
britzl committed Jun 27, 2021
1 parent 365460f commit 141620d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions in/cursor.script
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@ function update(self, dt)
-- in both cases we clear pressed and over state and generate an OUT event
if self.state.pressed and self.state.pressed_id and not self.collision_id and not self.state.dragging then
trigger_event(self, self.state.over_id, self.state.over_group, self.action, cursor.OUT)
clear_pressed_state(self)
clear_over_state(self)
clear_drag_state(self)
if not go_exists(self.state.pressed_id) or self.state.dragging_cancelled then
clear_pressed_state(self)
clear_drag_state(self)
end
end

--
Expand Down

0 comments on commit 141620d

Please sign in to comment.