summaryrefslogtreecommitdiffstats
path: root/core/src/mouse
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-16 19:05:31 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-16 19:05:31 +0200
commit45c5cfe5774ac99a6e1b1d1014418f68b21b41cf (patch)
tree7b70a8510ba08c3c56845f513d54380d50c9308e /core/src/mouse
parentc9dbccba468da683af2513535c40374da804aa60 (diff)
downloadiced-45c5cfe5774ac99a6e1b1d1014418f68b21b41cf.tar.gz
iced-45c5cfe5774ac99a6e1b1d1014418f68b21b41cf.tar.bz2
iced-45c5cfe5774ac99a6e1b1d1014418f68b21b41cf.zip
Avoid drag on double or triple click for now in `TextEditor`
Diffstat (limited to 'core/src/mouse')
-rw-r--r--core/src/mouse/click.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/src/mouse/click.rs b/core/src/mouse/click.rs
index 4a7d796c..e8e5fb56 100644
--- a/core/src/mouse/click.rs
+++ b/core/src/mouse/click.rs
@@ -61,6 +61,10 @@ impl Click {
self.kind
}
+ pub fn position(&self) -> Point {
+ self.position
+ }
+
fn is_consecutive(&self, new_position: Point, time: Instant) -> bool {
let duration = if time > self.time {
Some(time - self.time)