From 8d55e8647f3f7b492e7ff8df23d2ae5efad4e2a1 Mon Sep 17 00:00:00 2001 From: Thomas Boch Date: Fri, 24 Jan 2020 09:07:55 +0100 Subject: [PATCH] Add filter function option for HiPS catalogues --- src/js/ProgressiveCat.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/js/ProgressiveCat.js b/src/js/ProgressiveCat.js index a37e4589..53ba9c14 100644 --- a/src/js/ProgressiveCat.js +++ b/src/js/ProgressiveCat.js @@ -59,6 +59,9 @@ ProgressiveCat = (function() { this.selectSize = this.sourceSize + 2; this.selectionColor = '#00ff00'; // TODO: to be merged with Catalog + // allows for filtering of sources + this.filterFn = options.filter || undefined; // TODO: do the same for catalog + this.onClick = options.onClick || undefined; // TODO: inherit from catalog @@ -359,14 +362,21 @@ ProgressiveCat = (function() { if (! sources) { return; } + var s; for (var k=0, len = sources.length; k