compensate for scroll in push
This commit is contained in:
parent
9e9baa725b
commit
589f3beba5
@ -246,7 +246,7 @@ where
|
|||||||
);
|
);
|
||||||
match x {
|
match x {
|
||||||
touch::Event::FingerPressed { id, position } => {
|
touch::Event::FingerPressed { id, position } => {
|
||||||
if layout.bounds().contains(position) {
|
if layout.bounds().contains(position + scroll_offset) {
|
||||||
eprintln!("ins");
|
eprintln!("ins");
|
||||||
let _ = self.fingers_mid_press.insert(id);
|
let _ = self.fingers_mid_press.insert(id);
|
||||||
|
|
||||||
@ -254,7 +254,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
touch::Event::FingerMoved { id, position } => {
|
touch::Event::FingerMoved { id, position } => {
|
||||||
if !layout.bounds().contains(position) {
|
if !layout.bounds().contains(position + scroll_offset) {
|
||||||
eprintln!("exited");
|
eprintln!("exited");
|
||||||
let _ = self.fingers_mid_press.remove(&id);
|
let _ = self.fingers_mid_press.remove(&id);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user