Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Preserve functions and add todo to review combining functionality later

ZachTRicee46fd0f4334f
diff --git a/web/js/map/ui.js b/web/js/map/ui.js
index 3cdb42fd7..eb165242a 100644
--- a/web/js/map/ui.js
+++ b/web/js/map/ui.js
@@ -80,13 +80,13 @@ export function mapui(models, config) {
.on('remove', removeLayer)
.on('visibility', updateLayerVisibilities)
.on('opacity', updateOpacity)
- .on('update', updateLayer);
+ .on('update', updateLayerOrder);
models.date.events.on('select', updateDate);
models.palettes.events
- .on('set-custom', updateLayer)
- .on('clear-custom', updateLayer)
- .on('range', updateLayer)
- .on('update', updateLayer);
+ .on('set-custom', updateLookup)
+ .on('clear-custom', updateLookup)
+ .on('range', updateLookup)
+ .on('update', updateLookup);
$(window)
.on('resize', onResize);
updateProjection(true);
@@ -339,13 +339,13 @@ export function mapui(models, config) {
/*
* Reloads layer on change
*
- * @method updateLayer
+ * @method updateLayerOrder
* @static
*
*
* @returns {void}
*/
- var updateLayer = function () {
+ var updateLayerOrder = function () {
reloadLayers();
};
@@ -372,6 +372,21 @@ export function mapui(models, config) {
updateLayerVisibilities();
};
+ /*
+ * Update layers for the correct Date
+ *
+ * @method updateLookup
+ * @static
+ *
+ *
+ * @returns {void}
+ *
+ * @todo Check if this function can be combined with updateLayerOrder
+ */
+ var updateLookup = function (layerId) {
+ reloadLayers();
+ };
+
self.getCustomLayerTimeout = function (layer) {
if (models.palettes.isActive(layer.id)) {
return 200;