mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2025-03-13 22:50:01 -04:00
Leftover selection boxes (#570)
This commit is contained in:
parent
28ad90c9fe
commit
f7ca2c7e43
1 changed files with 3 additions and 2 deletions
|
@ -27,9 +27,10 @@ class SelectionBoxTool {
|
|||
}
|
||||
onMouseDrag (event) {
|
||||
if (event.event.button > 0) return; // only first mouse button
|
||||
if (this.selectionRect) {
|
||||
this.selectionRect.remove();
|
||||
}
|
||||
this.selectionRect = rectSelect(event);
|
||||
// Remove this rect on the next drag and up event
|
||||
this.selectionRect.removeOnDrag();
|
||||
}
|
||||
onMouseUpVector (event) {
|
||||
if (event.event.button > 0) return; // only first mouse button
|
||||
|
|
Loading…
Reference in a new issue