Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Colormap parser now handles +INF and -INF

Mike McGann12ac2e188048
diff --git a/bin/wv-options-colormap b/bin/wv-options-colormap
index d50a3ed5b..90c22ff1e 100755
--- a/bin/wv-options-colormap
+++ b/bin/wv-options-colormap
@@ -69,7 +69,13 @@ def process_file(file):
elif "@value" in entry:
items = re.sub(r"[\(\)\[\]]", "", entry["@value"]).split(",")
try:
- scaleValues += [map(lambda v: float(v), items)]
+ for scaleValue in items:
+ v = float(scaleValue)
+ if v == float("inf"):
+ v = sys.float_info.max
+ if v == float("-inf"):
+ v = sys.float_info.min
+ scaleValues += [v]
except ValueError as e:
raise ValueError("Invalid value: %s" % entry["@value"])
scaleColors += [color]
diff --git a/web/js/date/wv.date.timeline.js b/web/js/date/wv.date.timeline.js
index 9f6ca36a2..3439218c7 100644
--- a/web/js/date/wv.date.timeline.js
+++ b/web/js/date/wv.date.timeline.js
@@ -50,7 +50,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
};
var width;
-
+
var getTimelineWidth = function(){
width = $(window).outerWidth(true) - $("#timeline-header").outerWidth(true) - $("#timeline-zoom").outerWidth(true) - $("#timeline-hide").outerWidth(true)-margin.left-margin.right - 22; //margin left + right + 1px border * 2
};
@@ -1765,7 +1765,7 @@ wv.date.timeline = wv.date.timeline || function(models, config, ui) {
resizeWindow();
wv.ui.mouse.wheel($("#timeline-footer svg")).change(zoomed);
$('#timeline-footer').css('margin-left',margin.left-1 + 'px');
- $('#timeline-footer').css('margin-right',margin.right-1 + 'px');
+ $('#timeline-footer').css('margin-right',margin.right-1 + 'px');
}; // end init()
var forwardNextDay = function(){ //FIXME: Limit animation correctly
var nextDay = new Date(new Date(model.selected)