mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2025-12-12 07:40:26 -08:00
disable changing cuts the first 100ms after the right click to prevent changing cuts when opening the context menu
This commit is contained in:
committed by
Matthieu Baumann
parent
6d458ccab7
commit
5604ea2be6
@@ -8,7 +8,7 @@
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', { fov:0.15, target: 'Arp 240', showReticle: false, fullScreen: true });
|
||||
aladin = A.aladin('#aladin-lite-div', { fov:0.15, target: 'Arp 240', showContextMenu: true, showReticle: false, fullScreen: true });
|
||||
aladin.setBaseImageLayer(aladin.newImageSurvey('P/SDSS9/g', {colormap: "eosb", stretch: "linear"}));
|
||||
|
||||
var simbad = A.catalog({name: 'Simbad', sourceSize: 16, color: '#4050F0'});
|
||||
|
||||
@@ -88,4 +88,4 @@ codegen-units = 16
|
||||
rpath = false
|
||||
|
||||
[package.metadata.wasm-pack.profile.release]
|
||||
wasm-opt = true
|
||||
wasm-opt = false
|
||||
|
||||
@@ -779,7 +779,7 @@ export let View = (function () {
|
||||
|
||||
if (view.rightClick) {
|
||||
const rightClickDurationMs = Date.now() - view.rightClickTimeStart;
|
||||
if (rightClickDurationMs < 300) {
|
||||
if (rightClickDurationMs < 100) {
|
||||
view.aladin.contextMenu && view.aladin.contextMenu.show({e});
|
||||
}
|
||||
|
||||
@@ -959,6 +959,11 @@ export let View = (function () {
|
||||
return;
|
||||
}
|
||||
|
||||
const rightClickDurationMs = Date.now() - view.rightClickTimeStart;
|
||||
if (rightClickDurationMs < 100) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(view.selectedLayer) {
|
||||
let selectedLayer = view.imageLayers.get(view.selectedLayer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user