Compare commits

..

6 Commits

Author SHA1 Message Date
Matthieu Baumann
fe8cbd97ec update playwright snapshots 2025-05-23 18:44:56 +02:00
Matthieu Baumann
02ff1cdbdd fix test ci fmt 2025-05-23 18:25:15 +02:00
Matthieu Baumann
867f90f433 cargo fmt 2025-05-23 18:21:24 +02:00
Matthieu Baumann
d3e1cccca4 cargo clippy 2025-05-23 17:51:07 +02:00
Matthieu Baumann
0339183fdf remove warnings 2025-05-23 15:04:39 +02:00
Matthieu Baumann
cc35560e5c fix allsky retrieval and simplify hips rendering 2025-05-22 19:07:45 +02:00
8 changed files with 11 additions and 47 deletions

View File

@@ -33,16 +33,10 @@ var myFilterFunction = function(source) {
return color>colorThreshold;
}
aladin = A.aladin('#aladin-lite-div', {target: 'M 81', fov: 0.5, survey: 'CDS/P/SDSS9/color'});
var cat = A.catalogFromSimbad('M 81', 0.25, {
shape: (s) => {
return A.circle(s.ra, s.dec, 0.003, {lineWidth: 3});
},
onClick: 'showTable', verbosity: 3, filter: myFilterFunction
aladin = A.aladin('#aladin-lite-div', {target: 'M 81', fov: 0.5, survey: 'CDS/P/SDSS9/color'});
var cat = A.catalogFromSimbad('M 81', 0.25, {onClick: 'showTable', verbosity: 3, filter: myFilterFunction});
aladin.addCatalog(cat);
});
aladin.addCatalog(cat);
});
</script>
</body>

View File

@@ -1063,20 +1063,9 @@ export let Catalog = (function () {
var f;
for (let k = 0; k < this.footprints.length; k++) {
f = this.footprints[k];
if (this.filterFn && f.source) {
if(!this.filterFn(f.source)) {
f.hide()
} else {
f.show()
f.draw(ctx, this.view);
f.source.tooSmallFootprint = f.isTooSmall();
}
} else {
f.draw(ctx, this.view);
f.source.tooSmallFootprint = f.isTooSmall();
}
f.draw(ctx, this.view);
f.source.tooSmallFootprint = f.isTooSmall();
}
};

View File

@@ -45,6 +45,7 @@ export let DefaultActionsForContextMenu = (function () {
const a = aladinInstance;
const selectObjects = (selection) => {
console.log(selection)
a.view.selectObjects(selection);
};
return [

View File

@@ -12,16 +12,6 @@ export let HiPSList = (function () {
cooFrame: "equatorial",
startUrl: "https://alasky.cds.unistra.fr/DSS/DSSColor",
},
{
creatorDid: "ivo://erosita/dr1/rate/rgb",
id: "erosita/dr1/rate/rgb",
name: "eROSITA-DE DR1 RGB (0.2-0.5, 0.5-1.0, 1.0-2.0 keV) Rate Image",
maxOrder: 6,
tileSize: 512,
imgFormat: "png",
cooFrame: "equatorial",
startUrl: "https://erosita.mpe.mpg.de/dr1/erodat/static/hips/eRASS1_RGB_Rate_c010/"
},
{
creatorDid: "ivo://CDS/P/2MASS/color",
name: "2MASS colored",
@@ -212,7 +202,7 @@ export let HiPSList = (function () {
imgFormat: "jpeg",
minOrder: 3,
startUrl: "https://alasky.cds.unistra.fr/IPAC/IPAC_P_GLIMPSE360",
},
}
];
return HiPSList;

View File

@@ -251,7 +251,7 @@ export let Footprint= (function() {
return true;
}
}
return this.shapes.some((shape) => shape.intersectsBBox(x, y, w, h, view));
return false;
};
return Footprint;

View File

@@ -135,12 +135,10 @@ export class Selector {
}
// footprints
overlayItems = cat.getFootprints();
if (overlayItems) {
const {x, y, w, h} = selection.bbox();
for (var l = 0; l < overlayItems.length; l++) {
f = overlayItems[l];
if (f.intersectsBBox(x, y, w, h, view)) {
objListPerCatalog.push(f);
}

View File

@@ -322,17 +322,10 @@ export let Circle = (function() {
};
// From StackOverflow: https://stackoverflow.com/questions/401847/circle-rectangle-collision-detection-intersection
Circle.prototype.intersectsBBox = function(x, y, w, h, view) {
var centerXyview = view.aladin.world2pix(this.centerRaDec[0], this.centerRaDec[1]);
if (!centerXyview) {
return false;
}
// compute the absolute distance between the middle of the bbox
// and the center of the circle
Circle.prototype.intersectsBBox = function(x, y, w, h) {
const circleDistance = {
x: Math.abs(centerXyview[0] - (x + w/2)),
y: Math.abs(centerXyview[1] - (y + h/2))
x: Math.abs(this.center.x - x),
y: Math.abs(this.center.y - y)
};
if (circleDistance.x > (w/2 + this.radius)) { return false; }

View File

@@ -346,7 +346,6 @@ export let Ellipse = (function() {
Ellipse.prototype.intersectsBBox = function(x, y, w, h) {
// todo
return false;
};
return Ellipse;