A palette row can land on a lane
Browse files at this commita650264de5f7af8e420ef2b7131ac3f6f6f0d691Parent: 45b9182- feat
- a palette row can land on a lane
1 changed file +3 -0
crates/app/src/ui/bench_stance.rsmodified+3 -0
| @@ -723,6 +723,9 @@ fn lane_row( | |||
| 723 | }, | 723 | }, |
| 724 | )) | 724 | )) |
| 725 | .drag_over::<SubPick>(|d, _, _, _| d.bg(rgb(DARK_RAISED()))) | 725 | .drag_over::<SubPick>(|d, _, _, _| d.bg(rgb(DARK_RAISED()))) |
| 726 | + .on_drop(cx.listener(move |this, drag: &SubPick, window, cx| { | ||
| 727 | + this.place_sub(drag.0, lane, window.mouse_position().x, cx); | ||
| 728 | + })) | ||
| 726 | .on_drag_move(cx.listener( | 729 | .on_drag_move(cx.listener( |
| 727 | move |this, event: &DragMoveEvent<SubPick>, _, cx| { | 730 | move |this, event: &DragMoveEvent<SubPick>, _, cx| { |
| 728 | if !event.bounds.contains(&event.event.position) { | 731 | if !event.bounds.contains(&event.event.position) { |