mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-01 10:38:17 +08:00
fix!: Remove pointerId from Draggable callbacks (#1313)
Since pointerId is already handled by the handle* methods we don't have to expose it in the onDrag* methods, this conforms with the standard set in Tappable.
This commit is contained in:
@ -49,13 +49,13 @@ class DraggableSquare extends Ember with Draggable {
|
||||
}
|
||||
|
||||
@override
|
||||
bool onDragStart(int pointerId, DragStartInfo info) {
|
||||
bool onDragStart(DragStartInfo info) {
|
||||
dragDeltaPosition = info.eventPosition.game - position;
|
||||
return false;
|
||||
}
|
||||
|
||||
@override
|
||||
bool onDragUpdate(int pointerId, DragUpdateInfo info) {
|
||||
bool onDragUpdate(DragUpdateInfo info) {
|
||||
if (parent is! DraggablesExample) {
|
||||
return true;
|
||||
}
|
||||
@ -69,13 +69,13 @@ class DraggableSquare extends Ember with Draggable {
|
||||
}
|
||||
|
||||
@override
|
||||
bool onDragEnd(int pointerId, _) {
|
||||
bool onDragEnd(_) {
|
||||
dragDeltaPosition = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
@override
|
||||
bool onDragCancel(int pointerId) {
|
||||
bool onDragCancel() {
|
||||
dragDeltaPosition = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user