Leftover selection boxes (#570)

This commit is contained in:
DD Liu 2018-07-25 16:28:55 -04:00 committed by GitHub
parent 28ad90c9fe
commit f7ca2c7e43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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