diff --git a/cadc-votv/src/www/cadcVOTV/javascript/cadc.plugin.footprint-viewer.js b/cadc-votv/src/www/cadcVOTV/javascript/cadc.plugin.footprint-viewer.js index f370580..6355e47 100644 --- a/cadc-votv/src/www/cadcVOTV/javascript/cadc.plugin.footprint-viewer.js +++ b/cadc-votv/src/www/cadcVOTV/javascript/cadc.plugin.footprint-viewer.js @@ -29,6 +29,7 @@ var DEG_PER_ARC_SEC = 1.0 / 3600.0; var POLYGON_SPLIT = "Polygon ICRS"; var DEFAULT_FOV_DEGREES = 180; + var ALADIN_ROW_LIMIT = 10000; var _self = this; var _defaults = { @@ -162,6 +163,9 @@ lineWidth: 5 }); _self.aladin.addOverlay(_self.currentFootprint); + _self.viewAladinButton = $("#slick-visualize"); + _self.viewAladinStatus = $("#slick-visualize-status"); + _self.rowCount = 0; if (inputs.fov != null) { @@ -178,7 +182,25 @@ else { _self.viewer.subscribe(cadc.vot.events.onRowAdded, - handleAddFootprint); + function() + { + handleAddFootprint; + + if (_self.rowCount == 0) + { + // _self.viewAladinButton.removeClass("button-disabled"); + _self.viewAladinButton.removeClass("ui-disabled"); + _self.viewAladinStatus.addClass("wb-invisible"); + } + _self.rowCount++; + if (_self.rowCount > ALADIN_ROW_LIMIT && + !(_self.viewAladinButton.hasClass("ui-disabled"))) + { + // _self.viewAladinButton.addClass("button-disabled"); + _self.viewAladinButton.addClass("ui-disabled"); + _self.viewAladinStatus.removeClass("wb-invisible"); + } + }); _self.viewer.subscribe(cadc.vot.events.onDataLoaded, function ()