|
|
@@ -661,9 +661,8 @@ impl BaseEdit {
|
|
|
fn handle_touch_start(&self, touch_pos: Point) -> bool {
|
|
|
t!("handle_touch_start({touch_pos:?})");
|
|
|
|
|
|
- let mut local_pos = touch_pos;
|
|
|
- self.abs_to_local(&mut local_pos);
|
|
|
- t!("localize touch_pos = {local_pos:?}");
|
|
|
+ let rect = self.rect.get();
|
|
|
+ let local_pos = touch_pos - rect.pos();
|
|
|
|
|
|
let atom = &mut self.render_api.make_guard(gfxtag!("BaseEdit::handle_touch_start_action"));
|
|
|
if let Some(action_id) = self.action_mode.interact(local_pos) {
|
|
|
@@ -695,13 +694,12 @@ impl BaseEdit {
|
|
|
self.action_mode.redraw(atom.batch_id);
|
|
|
}
|
|
|
|
|
|
- let rect = self.rect.get();
|
|
|
if !rect.contains(touch_pos) {
|
|
|
t!("rect!cont rect={rect:?}, touch_pos={touch_pos:?}");
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
- if self.try_handle_drag(local_pos) {
|
|
|
+ if self.try_handle_drag(touch_pos) {
|
|
|
return true
|
|
|
}
|
|
|
|
|
|
@@ -728,6 +726,8 @@ impl BaseEdit {
|
|
|
let editor = self.editor.lock();
|
|
|
let Some((mut first, mut last)) = self.get_select_handles(&editor) else { return false };
|
|
|
|
|
|
+ self.abs_to_local(&mut touch_pos);
|
|
|
+
|
|
|
let baseline = self.baseline.get();
|
|
|
let handle_off_y = self.handle_descent.get();
|
|
|
|