Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Added transparency support for layers

Shriram Ilavajhala6c2f744dbf5c
diff --git a/src/js/image/wv.image.panel.js b/src/js/image/wv.image.panel.js
index a5a4ac8e4..a5ec44e97 100644
--- a/src/js/image/wv.image.panel.js
+++ b/src/js/image/wv.image.panel.js
@@ -42,10 +42,6 @@ wv.image.panel = wv.image.panel || function(models, ui, config) {
}
- var opacities = [];
- _(products).each( function(product){
- opacities.push( ( _.isUndefined(product.opacity) ) ? 1: product.opacity );
- });
var init = function() {
ui.rubberband.events.on("update", update);
@@ -180,6 +176,12 @@ wv.image.panel = wv.image.panel || function(models, ui, config) {
// when the backfill removes the old projection.
var epsg = models.proj.change.epsg;
+ // get layer transparencies (opacities)
+ var opacities = [];
+ _(products).each( function(product){
+ opacities.push( ( _.isUndefined(product.opacity) ) ? 1: product.opacity );
+ });
+
//console.log("EPSG: " + epsg);
var px = pixels;