remove comment

This commit is contained in:
Matthieu Baumann
2026-01-31 23:02:05 +01:00
committed by Matthieu Baumann
parent 5a9561a13a
commit ab5019603b
3 changed files with 4579 additions and 4668 deletions
-3
View File
@@ -13,9 +13,6 @@
aladin = A.aladin(
'#aladin-lite-div',
{
toolbar: {
vertical: false,
},
showSimbadPointerControl: true,
survey: 'https://skies.esac.esa.int/AKARI/color/', // set initial image survey
projection: 'AIT', // set a projection
+4579 -4579
View File
File diff suppressed because it is too large Load Diff
-86
View File
@@ -31,82 +31,6 @@
*****************************************************************************/
import { WidgetTogglerButton } from "./Toggler.js";
/*
export class CtxMenuActionButtonOpener extends ActionButton {
// Constructor
constructor(options, aladin) {
let self;
const enableTooltips = () => {
aladin.aladinDiv.removeEventListener('click', enableTooltips);
aladin.aladinDiv.querySelectorAll('.aladin-tooltip')
// for each tooltips reset its visibility and transition delay
.forEach((t) => {
t.style.visibility = ''
t.style.transitionDelay = ''
})
};
super({
action(e) {
enableTooltips()
let wasClosed = self.ctxMenu.isHidden;
self.close()
if (self.ctxMenu.toggler === self && !wasClosed) {
return;
}
// If it was hidden then reopen it
self.open(e);
// the panel is now open and we know the button has a tooltip
// => we close it!
if (self.tooltip && !self.ctxMenu.isHidden) {
self.tooltip.element().style.visibility = 'hidden'
self.tooltip.element().style.transitionDelay = '0ms';
aladin.aladinDiv.addEventListener("click", enableTooltips)
}
},
...options,
})
self = this;
this.ctxMenu = aladin.contextMenu;
this.layout = options.ctxMenu;
}
close() {
this.closed = true;
this.ctxMenu._hide();
}
open(e) {
if (this.layout) {
this.ctxMenu.attach(this.layout, this)
}
this.ctxMenu.show({
position: {
nextTo: this,
direction: this.options.openDirection,
},
});
this.closed = false;
}
_hide() {
this.close();
super._hide();
}
}*/
export class CtxMenuActionButtonOpener extends WidgetTogglerButton {
// Constructor
@@ -126,20 +50,10 @@ export class CtxMenuActionButtonOpener extends WidgetTogglerButton {
super({
widget: aladin.contextMenu,
enable(e) {
enableTooltips()
// If it was hidden then reopen it
if (self.layout) {
self.ctxMenu.attach(self.layout, self)
}
// the panel is now open and we know the button has a tooltip
// => we close it!
if (self.tooltip && !self.ctxMenu.isHidden) {
self.tooltip.element().style.visibility = 'hidden'
self.tooltip.element().style.transitionDelay = '0ms';
aladin.aladinDiv.addEventListener("click", enableTooltips)
}
},
...options,
})