Skip to content

Commit

Permalink
never start dragging a sprite that doesn't exist anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
towerofnix committed Jul 4, 2024
1 parent a6aca93 commit d32440d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ export default class Project {
}

private _startDragging(): void {
if (!this.spritesAndClones.includes(this._consideringDraggingSprite)) {
this._consideringDraggingSprite = null;
}

if (this._consideringDraggingSprite) {
this.draggingSprite = this._consideringDraggingSprite;
this._consideringDraggingSprite = null;
Expand Down

0 comments on commit d32440d

Please sign in to comment.