Skip to content

Commit

Permalink
prevent dragging if not locked by current user
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsoeres committed Oct 20, 2023
1 parent d96fb5d commit 547d7b0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export class InventoryItemComponent implements OnInit {
}

onDragStart(event: DragEvent) {
if (this.item.userLock !== this.currentUser) {
console.warn("EEEEEEEEEEEEEEEEEEEEEEEE!!!")
event.preventDefault();
}
event.dataTransfer?.clearData()
event.dataTransfer?.setData("application/json", JSON.stringify(this.item))
}
Expand Down

0 comments on commit 547d7b0

Please sign in to comment.