Skip to content

Commit

Permalink
slider using EventPropagation
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhou121 committed Nov 13, 2023
1 parent 4a308fb commit b1d9ca3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/widgets/slider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use crate::{
unit::PxPct,
view::View,
views::Decorators,
EventPropagation,
// EventPropagation,
};

Expand Down Expand Up @@ -120,7 +121,7 @@ impl View for Slider {
cx: &mut crate::context::EventCx,
_id_path: Option<&[crate::id::Id]>,
event: crate::event::Event,
) -> bool {
) -> EventPropagation {
match event {
crate::event::Event::PointerDown(event) => {
cx.update_active(self.id);
Expand Down Expand Up @@ -161,7 +162,7 @@ impl View for Slider {
}
_ => {}
};
false
EventPropagation::Continue
}

fn style(&mut self, cx: &mut crate::context::StyleCx<'_>) {
Expand Down

0 comments on commit b1d9ca3

Please sign in to comment.