Skip to content

Commit

Permalink
update active layers when layer is added to removed #601
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin King committed Nov 8, 2017
1 parent 0380335 commit e0c4048
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions web/js/layers/wv.layers.modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -790,11 +790,21 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {
var onLayerAdded = function(layer) {
var $element = $(self.selector + " [data-layer='" + wv.util.jqueryEscape(layer.id) + "']");
$element.iCheck("check");
if(self.reactList) {
self.reactList.setState({
activeLayers: model.active
});
}
};

var onLayerRemoved = function(layer) {
var $element = $(self.selector + " [data-layer='" + wv.util.jqueryEscape(layer.id) + "']");
$element.iCheck("uncheck");
if(self.reactList) {
self.reactList.setState({
activeLayers: model.active
});
}
};

var unfocusInput = function() {
Expand Down

0 comments on commit e0c4048

Please sign in to comment.