Skip to content

Commit

Permalink
new UI StackBox
Browse files Browse the repository at this point in the history
  • Loading branch information
bmatthieu3 committed Apr 22, 2024
1 parent 116ba0d commit 63aebf7
Show file tree
Hide file tree
Showing 29 changed files with 1,482 additions and 241 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 3.3.3

* [feat] New `hipsList` option parameter when instancing a new Aladin object.
* [feat] Zoom smoothing using hermite cubic interpolation functions
* [feat] shape option of Catalog and ProgressiveCat accepts a function returning a Footprint. This allow user to
associate a footprint to a specific source
Expand Down
5 changes: 5 additions & 0 deletions assets/icons/add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 3 additions & 21 deletions examples/al-catalog-hips-shape.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,8 @@
import A from '../src/js/A.js';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {target: '12 25 41.512 +12 48 47.2', fov: 1, showContextMenu: true});
aladin = A.aladin('#aladin-lite-div', {target: '12 25 41.512 +12 48 47.2', inertia: false, fov: 1, showContextMenu: true});
// define custom draw function
var drawFunction = function(source, canvasCtx, viewParams) {
canvasCtx.beginPath();
canvasCtx.arc(source.x, source.y, source.data['coo_err_min'] * 5, 0, 2 * Math.PI, false);
canvasCtx.closePath();
canvasCtx.strokeStyle = '#c38';
canvasCtx.lineWidth = 3;
canvasCtx.globalAlpha = 0.7,
canvasCtx.stroke();
var fov = Math.max(viewParams['fov'][0], viewParams['fov'][1]);

// object name is displayed only if fov<10°
if (fov>10) {
return;
}

canvasCtx.globalAlpha = 0.9;
canvasCtx.globalAlpha = 1;
};

var drawFunctionFootprint = function(s) {
let a = +s.data.size_maj;
Expand All @@ -39,8 +21,8 @@
if (!galaxy)
return;

let angle = +s.data.size_angle || 0.0;
return A.ellipse(s.ra, s.dec, a / 60, b / 60, angle, {color: 'cyan'});
let theta = +s.data.size_angle || 0.0;
return A.ellipse(s.ra, s.dec, a / 60, b / 60, theta, {color: 'cyan'});
};

var hips = A.catalogHiPS('https://axel.u-strasbg.fr/HiPSCatService/Simbad', {onClick: 'showTable', name: 'Simbad', color: 'cyan', hoverColor: 'red', shape: drawFunctionFootprint});
Expand Down
2 changes: 1 addition & 1 deletion examples/al-coronelli.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@

A.init.then(() => {
var hipsDir="http://alasky.u-strasbg.fr/CDS_P_Coronelli";
aladin = A.aladin("#aladin-lite-div", {showSimbadPointerControl: true, realFullscreen: true, fov: 100, allowFullZoomout: true, showReticle: false });
aladin = A.aladin("#aladin-lite-div", {showSimbadPointerControl: true, expandLayersControl: true, realFullscreen: true, fov: 100, allowFullZoomout: true, showReticle: false });
aladin.createImageSurvey('illenoroC', 'illenoroC', hipsDir, 'equatorial', 4, {imgFormat: 'jpg', longitudeReversed: false});
aladin.createImageSurvey('Coronelli', 'Coronelli', hipsDir, 'equatorial', 4, {imgFormat: 'jpg', longitudeReversed: true});
aladin.setImageSurvey('Coronelli');
Expand Down
2 changes: 1 addition & 1 deletion examples/al-footprints.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
console.log("Object hovered stopped: ", object, "mouse coords xy: ", xyMouseCoords.x, xyMouseCoords.y);
})

const cat = A.catalogFromVizieR('B/assocdata/obscore', 'M 1', 100, {onClick: 'showTable', hoverColor: 'purple', limit: 1000});
const cat = A.catalogFromVizieR('B/assocdata/obscore', 'M 1', 10, {onClick: 'showTable', hoverColor: 'purple', limit: 10000});
aladin.addCatalog(cat);
});
</script>
Expand Down
32 changes: 32 additions & 0 deletions examples/al-save-colormap.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!doctype html>
<html>
<head>
<!--<link rel="stylesheet" href="./layers.css" />-->
</head>
<body>

<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>

<script type="module">
import A from '../src/js/A.js';
var aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {fullScreen: true, cooFrame: "ICRSd", showSimbadPointerControl: true, showShareControl: true, showShareControl: true, survey: 'https://alasky.cds.unistra.fr/DSS/DSSColor/', fov: 180, showContextMenu: true});
// manage URL parameters
let survey1 = aladin.getBaseImageLayer();
survey1.setColormap('magma', {stretch: 'linear'});

let survey2 = aladin.newImageSurvey("CSIRO/P/RACS/low/I");
aladin.setImageLayer(survey2)
survey2.setColormap('rdbu', {stretch: 'linear'});

let survey3 = aladin.newImageSurvey("CSIRO/P/RACS/mid/I");
aladin.setImageLayer(survey3)
survey3.setColormap('cubehelix', {stretch: 'asinh'});

aladin.setImageLayer(survey2);
});
</script>

</body>
</html>
32 changes: 30 additions & 2 deletions src/css/aladin.css
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ canvas {
}

.aladin-input-text.aladin-dark-theme.search {
width: 14rem;
width: 15rem;
text-shadow: 0px 0px 2px #000;
}

Expand Down Expand Up @@ -824,6 +824,7 @@ canvas {
border-radius: 5px;
font-family: monospace;
font-size: 1rem;
box-sizing: border-box;
}

.aladin-input-text.aladin-dark-theme, .aladin-input-number.aladin-dark-theme {
Expand Down Expand Up @@ -853,18 +854,20 @@ canvas {
/* Remove focus outline */
/* Remove IE arrow */
}

.aladin-input-select option {
color: inherit;
background-color: #320a28;
}

.aladin-input-select:focus {
outline: none;
}

.aladin-input-select::-ms-expand {
display: none;
}


/* Frames */
.aladin-input-color {
appearance: none;
Expand Down Expand Up @@ -1104,6 +1107,19 @@ canvas {
height: 1.7rem;
}

.aladin-input-text.aladin-dark-theme.search.aladin-HiPS-search {
width: 100%;

}

.aladin-stack-box {
width: 17rem;
}

.aladin-stack-box .content > * {
margin-bottom: 0.5rem;
}

.aladin-location {
position: absolute;
top: 0.2rem;
Expand All @@ -1122,13 +1138,25 @@ canvas {
bottom: 0.2rem;
left: 0.2rem;

background-color: red;

font-family: monospace;

font-size: 1rem;
border-radius: 5px;
line-height: 1.7rem;
}

.aladin-fov .aladin-zoom-in {
margin-right: 0;
border-right: none;
border-radius: 5px 0px 0px 5px;
}

.aladin-fov .aladin-zoom-out {
border-radius: 0px 5px 5px 0px;
}

.aladin-status-bar {
border-radius: 3px;
padding: 0.4rem;
Expand Down
Loading

0 comments on commit 63aebf7

Please sign in to comment.