Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions source/pixel.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,16 @@ export default class PixelPlugin
case this.tools.type.grab:
mouseClickDiv.style.cursor = "-webkit-grab";
break;
case this.tools.type.select:
if(this.selection !== null && this.selection.selectedShape !== null) {
let rectangle = this.selection.selectedShape;
//if the rectangle has 0 area, then the user just clicked and should be
//interpreted as a command to remove the current selection
if(rectangle.relativeRectHeight === 0 && rectangle.relativeRectWidth === 0) {
this.selection.clearSelection(this.core.getSettings().maxZoomLevel);
}
}
break;
default:
}
}
Expand Down