Skip to content

Commit

Permalink
Fix event
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack253-png committed Sep 20, 2024
1 parent 2ff94bc commit 1a3636e
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ object MouseEvent {
fun onMouseMove(x: Double, y: Double): Boolean {
for (i in instances) {
if (i.hitTest(x, y)) {
FlutterNative.sendPosEvent(i.handle, PointerPhase.kMove, x - i.rect.left, y - i.rect.top, 0)
FlutterNative.sendPosEvent(i.handle, PointerPhase.kHover, x - i.rect.left, y - i.rect.top, 0)
return true
}
Expand All @@ -27,13 +26,6 @@ object MouseEvent {
fun onMouseScroll(x: Double, y: Double, amount: Double): Boolean {
for (i in instances) {
if (i.hitTest(x, y)) {
FlutterNative.sendPosEvent(i.handle, PointerPhase.kRemove, x - i.rect.left, y - i.rect.top, 0)
FlutterNative.sendPosEvent(i.handle, PointerPhase.kAdd, x - i.rect.left, y - i.rect.top, 0)
FlutterNative.sendPosEvent(i.handle, PointerPhase.kCancel, x - i.rect.left, y - i.rect.top, 0)
FlutterNative.sendPosEvent(i.handle, PointerPhase.kPanZoomStart, x - i.rect.left, y - i.rect.top, 0)

FlutterNative.sendPosEvent(i.handle, PointerPhase.kPanZoomUpdate, x - i.rect.left, y - i.rect.top, 0)
FlutterNative.sendPosEvent(i.handle, PointerPhase.kPanZoomEnd, x - i.rect.left, y - i.rect.top, 0)
return true
}
}
Expand Down

0 comments on commit 1a3636e

Please sign in to comment.