From 211e3797f55808575ba4fe5d15333666b4376bc6 Mon Sep 17 00:00:00 2001 From: Matthieu Baumann Date: Thu, 4 Sep 2025 13:58:06 +0200 Subject: [PATCH] final commit --- examples/al-cat-galaxy-shape.html | 1 + src/js/A.js | 2 +- src/js/Catalog.js | 6 +++--- src/js/ProgressiveCat.js | 2 +- src/js/View.js | 2 +- src/js/gui/Box/StackBox.js | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/al-cat-galaxy-shape.html b/examples/al-cat-galaxy-shape.html index 37e38531..91761629 100644 --- a/examples/al-cat-galaxy-shape.html +++ b/examples/al-cat-galaxy-shape.html @@ -26,6 +26,7 @@ limit: 1000, //orderBy: 'nb_ref', onClick: 'showTable', + onlyFootprints: false, color: (s) => { let coo = A.coo(); coo.parse(s.data['RAJ2000'] + ' ' + s.data['DEJ2000']) diff --git a/src/js/A.js b/src/js/A.js index dd61a12c..8a4402c3 100644 --- a/src/js/A.js +++ b/src/js/A.js @@ -575,7 +575,7 @@ A.catalogFromURL = function (url, options, successCallback, errorCallback, usePr c.setFields(fields); if (fields.s_region) { // for ObsCore tables, show also the (ra, dec) as a source - c.onlyFootprint = false; + c.onlyFootprints = false; } c.addSources(sources); diff --git a/src/js/Catalog.js b/src/js/Catalog.js index c5ae5e17..c70d4ca2 100644 --- a/src/js/Catalog.js +++ b/src/js/Catalog.js @@ -57,7 +57,7 @@ If a function is given, user can return Image, HTMLImageCanvas, HTMLImageElement * @property {string} [labelColumn] - The name of the column to be used for the label. * @property {string} [labelColor=color] - The color of the source labels. * @property {string} [labelFont="10px sans-serif"] - The font for the source labels. -* @property {boolean} [onlyFootprint=true] - When shapes/footprints are associated to a source (through a shape function given), decide wheter to show the point source as well. Point source is hidden by default +* @property {boolean} [onlyFootprints=true] - When shapes/footprints are associated to a source (through a shape function given), decide wheter to show the point source as well. Point source is hidden by default */ export let Catalog = (function () { @@ -113,7 +113,7 @@ export let Catalog = (function () { this.hoverColor = options.hoverColor || undefined; // when footprints are associated to source, do we need to draw the point source as well ? - this.onlyFootprint = options.onlyFootprint ?? true; + this.onlyFootprints = options.onlyFootprints ?? true; this.displayLabel = options.displayLabel || false; this.labelColor = options.labelColor || undefined; @@ -1032,7 +1032,7 @@ export let Catalog = (function () { s.footprint.draw(ctx, this.view) s.tooSmallFootprint = s.footprint.isTooSmall(); - if (!s.tooSmallFootprint && this.onlyFootprint) { + if (!s.tooSmallFootprint && this.onlyFootprints) { return true; } } diff --git a/src/js/ProgressiveCat.js b/src/js/ProgressiveCat.js index 216be0d8..54673f4b 100644 --- a/src/js/ProgressiveCat.js +++ b/src/js/ProgressiveCat.js @@ -67,7 +67,7 @@ export let ProgressiveCat = (function() { this.hoverColor = options.hoverColor || this.color; // when footprints are associated to source, do we need to draw the point source as well ? - this.onlyFootprint = options.onlyFootprint ?? true; + this.onlyFootprints = options.onlyFootprints ?? true; // allows for filtering of sources diff --git a/src/js/View.js b/src/js/View.js index 170cba15..213a017c 100644 --- a/src/js/View.js +++ b/src/js/View.js @@ -2207,7 +2207,7 @@ export let View = (function () { continue; } - if (s.isFootprint() && cat.onlyFootprint && !s.tooSmallFootprint) { + if (s.isFootprint() && cat.onlyFootprints && !s.tooSmallFootprint) { continue; } diff --git a/src/js/gui/Box/StackBox.js b/src/js/gui/Box/StackBox.js index 87c347e8..f4b070e5 100644 --- a/src/js/gui/Box/StackBox.js +++ b/src/js/gui/Box/StackBox.js @@ -83,7 +83,7 @@ export class OverlayStackBox extends Box { sourceSize: 8, color: "#318d80", hoverColor: 'red', - onlyFootprint: false, + onlyFootprints: false, onClick: "showTable", shape: (s) => { let galaxy = ["Seyfert","Seyfert_1", "Seyfert_2","LSB_G","PartofG","RadioG","Gin","GinPair","HII_G","LensedG","BClG","BlueCompG","EmG","GinCl","GinGroup","StarburstG","LINER","AGN", "Galaxy", "GtowardsGroup", "GtowardsCl", "BrightestCG"].some((n) => s.data.main_type.indexOf(n) >= 0);