don't check bounds on lift because seems buggy
This commit is contained in:
parent
9cdd7c5527
commit
340601f526
@ -256,9 +256,8 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
touch::Event::FingerLifted { id, position } => {
|
touch::Event::FingerLifted { id, position } => {
|
||||||
if self.fingers_mid_press.remove(&id)
|
// !!! The finger position seems to be buggy on the Lift event.
|
||||||
&& layout.bounds().contains(position)
|
if self.fingers_mid_press.remove(&id) {
|
||||||
{
|
|
||||||
eprintln!("lifted");
|
eprintln!("lifted");
|
||||||
// this should be treated as a click
|
// this should be treated as a click
|
||||||
if let Some(on_press) = self.on_press.clone() {
|
if let Some(on_press) = self.on_press.clone() {
|
||||||
|
@ -201,8 +201,9 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
touch::Event::FingerLifted { id, position } => {
|
touch::Event::FingerLifted { id, position } => {
|
||||||
|
// !!! The finger position seems to be buggy on the Lift event.
|
||||||
if self.fingers_mid_press.remove(&id)
|
if self.fingers_mid_press.remove(&id)
|
||||||
&& layout.bounds().contains(position)
|
// && layout.bounds().contains(position)
|
||||||
{
|
{
|
||||||
// this should be treated as a click
|
// this should be treated as a click
|
||||||
messages.push((self.on_toggle)(!self.is_active));
|
messages.push((self.on_toggle)(!self.is_active));
|
||||||
|
Loading…
Reference in New Issue
Block a user