Skip to content

Commit

Permalink
#37 show val range text
Browse files Browse the repository at this point in the history
  • Loading branch information
gyuque committed Mar 12, 2014
1 parent 21d2f36 commit 7f1d6fd
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion inner/js/ui/MeshConfigurationPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ if (!window.mobmap) { window.mobmap={}; }

this.gradientEditor = new mobmap.GradientEditor( layer.colorRule );
this.configurePanelContent();
this.observeValueRangeControllerEvents();

this.syncFromData();
}

MeshConfigurationPanel.prototype = {
Expand All @@ -37,7 +40,6 @@ if (!window.mobmap) { window.mobmap={}; }
var box = $H('div', 'mm-gradient-val-range-control-box');

var labelbox = $H('div');
labelbox.innerHTML = "Val. range:";

var val_range = $H('input', 'mm-gradient-val-range-slider');
val_range.type = 'range';
Expand All @@ -51,7 +53,24 @@ if (!window.mobmap) { window.mobmap={}; }
box.appendChild(val_range);
container.appendChild(box);
},

observeValueRangeControllerEvents: function() {
this.jValRangeSlider.change( this.onValRangeSliderChange.bind(this) );
},

onValRangeSliderChange: function () {

},

updateValRangeText: function() {
var r = this.boundLayer.renderValueRange;
this.jValRangeDispBox.text("Val. range: " + r.min +'-'+ r.max);
},

syncFromData: function() {
this.updateValRangeText();
},

show: function() { this.expandablePanel.show(); },
hide: function() { this.expandablePanel.hide(); }
};
Expand Down

0 comments on commit 7f1d6fd

Please sign in to comment.