feat: Add 'reason' field to move event (#6996)

* feat: Add 'reason' field to move event

There are many types of move.  This addition allows one to detect what the reason for each move is.

* Clang formatting.

And unsaved editor tabs.

* Change reason string to array.
This commit is contained in:
Neil Fraser
2023-04-26 00:22:10 +02:00
committed by GitHub
parent 139bc299a0
commit 64aa3e7df4
12 changed files with 71 additions and 16 deletions

View File

@@ -71,7 +71,7 @@ function bumpObjectIntoBounds(
const deltaX = newXPosition - objectMetrics.left;
if (deltaX || deltaY) {
object.moveBy(deltaX, deltaY);
object.moveBy(deltaX, deltaY, ['inbounds']);
return true;
}
return false;