Commit b8d98eb6 authored by Robin Tissot's avatar Robin Tissot
Browse files

Adds a way to select overlaping regions.

parent 267a9d23
......@@ -1177,6 +1177,16 @@ class Segmenter {
onMouseDown(event) {
if (isRightClick(event.event)) return;
if (this.selecting) {
if (this.mode == 'regions') {
// if what we are selecting is already selected, check there isn't something below
for (let i=0; i<this.regions.length; i++) {
if (this.selecting.selected && this.regions[i] != this.selecting) {
let hit = this.regions[i].polygonPath.hitTest(event.point);
if (hit) this.selecting = this.regions[i];
break;
}
}
}
// selection
if (event.event.shiftKey) {
this.selecting.toggleSelect();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment