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:
Lukas Klingsbo
2022-01-18 23:22:10 +01:00
committed by GitHub
parent b1d4e5872e
commit 27adda17b7
6 changed files with 49 additions and 27 deletions

View File

@ -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;
}