Skip to content

Commit

Permalink
drag event should include slider value
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Aug 30, 2024
1 parent 904a1b6 commit 34a5c9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion haxe/ui/components/Slider.hx
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,10 @@ private class Events extends haxe.ui.events.Events {
event.value = e.value;
_slider.dispatch(event);
if (_activeThumb != null) {
_slider.dispatch(new DragEvent(DragEvent.DRAG));
var dragEvent = new DragEvent(DragEvent.DRAG);
dragEvent.previousValue = e.previousValue;
dragEvent.value = e.value;
_slider.dispatch(dragEvent);
}
}

Expand Down
4 changes: 4 additions & 0 deletions haxe/ui/events/DragEvent.hx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ class DragEvent extends UIEvent {
c.bubble = this.bubble;
c.target = this.target;
c.data = this.data;
c.value = this.value;
c.previousValue = this.previousValue;
c.canceled = this.canceled;
c.relatedEvent = this.relatedEvent;
c.relatedComponent = this.relatedComponent;
c.left = this.left;
c.top = this.top;
postClone(c);
Expand Down

0 comments on commit 34a5c9e

Please sign in to comment.