Avoid drag on double or triple click for now in TextEditor

This commit is contained in:
Héctor Ramón Jiménez 2023-09-16 19:05:31 +02:00
parent c9dbccba46
commit 45c5cfe577
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 32 additions and 24 deletions

View file

@ -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)