mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2025-12-25 12:25:52 -08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6acb3a324 | ||
|
|
14d54b03bc | ||
|
|
9e2779837d | ||
|
|
e29b5202b3 |
@@ -2,7 +2,7 @@
|
||||
"homepage": "https://aladin.u-strasbg.fr/",
|
||||
"name": "aladin-lite",
|
||||
"type": "module",
|
||||
"version": "3.6.1",
|
||||
"version": "3.6.2",
|
||||
"description": "An astronomical HiPS visualizer in the browser",
|
||||
"author": "Thomas Boch and Matthieu Baumann",
|
||||
"license": "GPL-3",
|
||||
|
||||
@@ -3,7 +3,7 @@ name = "aladin-lite"
|
||||
description = "Aladin Lite v3 introduces a new graphical engine written in Rust with the use of WebGL"
|
||||
license = "BSD-3-Clause"
|
||||
repository = "https://github.com/cds-astro/aladin-lite"
|
||||
version = "3.6.1"
|
||||
version = "3.6.2"
|
||||
authors = [ "baumannmatthieu0@gmail.com", "matthieu.baumann@astro.unistra.fr",]
|
||||
edition = "2018"
|
||||
|
||||
|
||||
@@ -505,12 +505,15 @@
|
||||
|
||||
.aladin-form .aladin-form-input {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.aladin-form-group > * {
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
.aladin-form .aladin-form-input:last-of-type {
|
||||
.aladin-form-group > *:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@@ -527,10 +530,6 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.aladin-form .aladin-form-input > label {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.aladin-form .aladin-form-input .aladin-input {
|
||||
flex: 2;
|
||||
}
|
||||
@@ -840,13 +839,18 @@
|
||||
box-shadow: 0 0 1em 0 rgba(0, 0, 0, 0.2);
|
||||
cursor: pointer;
|
||||
font-family: monospace;
|
||||
width: 100%;
|
||||
box-sizing: content-box;
|
||||
/* <option> colors */
|
||||
/* Remove focus outline */
|
||||
/* Remove IE arrow */
|
||||
}
|
||||
|
||||
/* This is done so that the select shrink to the size of its parent (coupled with flex)
|
||||
otherwise it fits its content options. If those are too big the select can go out of its parent */
|
||||
.aladin-horizontal-list .aladin-input-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.aladin-input-select option {
|
||||
color: inherit;
|
||||
background-color: #320a28;
|
||||
|
||||
@@ -246,8 +246,6 @@ export let View = (function () {
|
||||
// some variables for mouse handling
|
||||
this.dragging = false;
|
||||
this.dragCoo = null;
|
||||
this.rightclickx = null;
|
||||
this.rightclicky = null;
|
||||
this.selectedLayer = 'base';
|
||||
|
||||
this.needRedraw = true;
|
||||
@@ -618,6 +616,7 @@ export let View = (function () {
|
||||
};
|
||||
var longTouchTimer;
|
||||
var longTouchDuration = 800;
|
||||
var showContextMenu = true;
|
||||
var xystart;
|
||||
|
||||
var handleSelect = function(xy, tolerance) {
|
||||
@@ -688,9 +687,7 @@ export let View = (function () {
|
||||
|
||||
if (e.which === 3 || e.button === 2) {
|
||||
view.rightClick = true;
|
||||
view.rightClickTimeStart = Date.now();
|
||||
view.rightclickx = xymouse.x;
|
||||
view.rightclicky = xymouse.y;
|
||||
showContextMenu = true;
|
||||
|
||||
if (view.selectedLayer) {
|
||||
const imageLayer = view.imageLayers.get(view.selectedLayer);
|
||||
@@ -776,15 +773,11 @@ export let View = (function () {
|
||||
});
|
||||
|
||||
if (view.rightClick) {
|
||||
const rightClickDurationMs = Date.now() - view.rightClickTimeStart;
|
||||
if (rightClickDurationMs < 100) {
|
||||
if (showContextMenu) {
|
||||
view.aladin.contextMenu && view.aladin.contextMenu.show({e});
|
||||
}
|
||||
|
||||
view.rightClick = false;
|
||||
view.rightclickx = null;
|
||||
view.rightclicky = null;
|
||||
view.rightClickTimeStart = undefined;
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -815,11 +808,10 @@ export let View = (function () {
|
||||
view.aladin.statusBar.removeMessage('opening-ctxmenu')
|
||||
}
|
||||
clearTimeout(longTouchTimer)
|
||||
longTouchTimer = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
xystart = undefined;
|
||||
|
||||
if ((e.type === 'touchend' || e.type === 'touchcancel') && view.pinchZoomParameters.isPinching) {
|
||||
view.pinchZoomParameters.isPinching = false;
|
||||
view.pinchZoomParameters.initialFov = view.pinchZoomParameters.initialDistance = undefined;
|
||||
@@ -921,7 +913,6 @@ export let View = (function () {
|
||||
var lastMouseMovePos = null;
|
||||
Utils.on(view.catalogCanvas, "mousemove touchmove", function (e) {
|
||||
e.preventDefault();
|
||||
//e.stopPropagation();
|
||||
|
||||
const xymouse = Utils.relMouseCoords(e);
|
||||
|
||||
@@ -935,16 +926,17 @@ export let View = (function () {
|
||||
xy: xymouse,
|
||||
});
|
||||
|
||||
let dist = (() => {
|
||||
return (xymouse.x - xystart.x)*(xymouse.x - xystart.x) + (xymouse.y - xystart.y)*(xymouse.y - xystart.y)
|
||||
})();
|
||||
|
||||
if (e.type === 'touchmove' && xystart) {
|
||||
let dist = (() => {
|
||||
return (xymouse.x - xystart.x)*(xymouse.x - xystart.x) + (xymouse.y - xystart.y)*(xymouse.y - xystart.y)
|
||||
})();
|
||||
if (longTouchTimer && dist > 100) {
|
||||
if (view.aladin.statusBar) {
|
||||
view.aladin.statusBar.removeMessage('opening-ctxmenu')
|
||||
}
|
||||
clearTimeout(longTouchTimer)
|
||||
xystart = undefined;
|
||||
longTouchTimer = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -957,11 +949,12 @@ export let View = (function () {
|
||||
return;
|
||||
}
|
||||
|
||||
const rightClickDurationMs = Date.now() - view.rightClickTimeStart;
|
||||
if (rightClickDurationMs < 100) {
|
||||
if (dist < 100) {
|
||||
return;
|
||||
}
|
||||
|
||||
showContextMenu = false;
|
||||
|
||||
if(view.selectedLayer) {
|
||||
let selectedLayer = view.imageLayers.get(view.selectedLayer);
|
||||
|
||||
@@ -1255,17 +1248,9 @@ export let View = (function () {
|
||||
return;
|
||||
|
||||
switch (e.keyCode) {
|
||||
// shift
|
||||
case 16:
|
||||
view.aladin.select('rect', (selection) => {
|
||||
view.selectObjects(selection);
|
||||
})
|
||||
break;
|
||||
// escape
|
||||
case 27:
|
||||
// if there is a selection occuring
|
||||
view.selector && view.selector.cancel()
|
||||
|
||||
if (view.aladin.isInFullscreen) {
|
||||
view.aladin.toggleFullscreen(view.aladin.options.realFullscreen);
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ import { ActionButton } from "../Widgets/ActionButton.js";
|
||||
header: Layout.horizontal([selectorBtn, 'Cone search']),
|
||||
subInputs: [
|
||||
{
|
||||
label: "ra:",
|
||||
label: "RA:",
|
||||
name: "ra",
|
||||
type: "text",
|
||||
value: defaultRa,
|
||||
@@ -291,7 +291,7 @@ import { ActionButton } from "../Widgets/ActionButton.js";
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "dec:",
|
||||
label: "Dec:",
|
||||
name: "dec",
|
||||
type: "text",
|
||||
value: defaultDec,
|
||||
|
||||
Reference in New Issue
Block a user