fix removal when rebasing, remove z-index of the tooltip causing bugs in the ui

This commit is contained in:
Matthieu Baumann
2024-11-08 14:23:18 +01:00
committed by Matthieu Baumann
parent 765c0d0dcb
commit 5f57f037f8
3 changed files with 10 additions and 6 deletions

View File

@@ -978,7 +978,7 @@ canvas {
font-family: monospace;
line-height: 1rem;
z-index: 100;
/*z-index: 100;*/
float: left;
}

View File

@@ -206,6 +206,12 @@ export let DefaultActionsForContextMenu = (function () {
action(o) {
a.select('rect', selectObjects)
}
},
{
label: 'Polygon',
action(o) {
a.select('poly', selectObjects)
}
}
]
},

View File

@@ -71,7 +71,6 @@ export class PolySelect extends FSM {
this.callback = callback;
// reset the coo
this.coos = [];
}
let click = (params) => {
@@ -146,6 +145,9 @@ export class PolySelect extends FSM {
}
let finish = () => {
if(btn) {
btn.remove();
}
if (this.coos.length <= 2) {
console.warn("Invalid selection, please draw at least a 3 vertices polygon")
@@ -156,10 +158,6 @@ export class PolySelect extends FSM {
return;
}
if(btn) {
btn.remove();
}
// finish the selection
let xMin = this.coos[0].x
let yMin = this.coos[0].y