Skip to content

Commit

Permalink
fix removal when rebasing, remove z-index of the tooltip causing bugs…
Browse files Browse the repository at this point in the history
… in the ui
  • Loading branch information
bmatthieu3 committed Nov 8, 2024
1 parent 75e3f1b commit 5fccb67
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/css/aladin.css
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ canvas {
font-family: monospace;
line-height: 1rem;

z-index: 100;
/*z-index: 100;*/

float: left;
}
Expand Down
6 changes: 6 additions & 0 deletions src/js/DefaultActionsForContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ export let DefaultActionsForContextMenu = (function () {
action(o) {
a.select('rect', selectObjects)
}
},
{
label: 'Polygon',
action(o) {
a.select('poly', selectObjects)
}
}
]
},
Expand Down
8 changes: 3 additions & 5 deletions src/js/FiniteStateMachine/PolySelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export class PolySelect extends FSM {
this.callback = callback;
// reset the coo
this.coos = [];

}

let click = (params) => {
Expand Down Expand Up @@ -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")
Expand All @@ -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
Expand Down

0 comments on commit 5fccb67

Please sign in to comment.