Skip to content

Commit

Permalink
feat(map): add state property on ramp layer object
Browse files Browse the repository at this point in the history
It will be used to hold layer states like whether wms query
toggle is on or off.
  • Loading branch information
AleksueiR committed Apr 30, 2015
1 parent 808e1cc commit 16b3d5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/js/RAMP/Modules/filterManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,9 @@ define([
queryCheckboxGroup.on(CheckboxGroup.event.MEMBER_TOGGLE, function (evt) {
console.log("Filter Manager -> Checkbox", evt.checkbox.id, "set by", evt.agency, "to", evt.checkbox.state);

/*topic.publish(EventManager.FilterManager.LAYER_VISIBILITY_TOGGLED, {
id: evt.checkbox.id,
state: evt.checkbox.state
});*/
// TODO: temp function; move or connect to the ramp state manager later.
var wmsLayer = RAMP.layerRegistry[evt.checkbox.id];
wmsLayer.ramp.state.wmsQuery = evt.checkbox.state;
});

queryCheckboxGroup.on(CheckboxGroup.event.MASTER_TOGGLE, function (evt) {
Expand Down
4 changes: 4 additions & 0 deletions src/js/RAMP/Modules/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,10 @@ define([
state: "loading",
inLS: false, //layer has entry in layer selector
inCount: false //layer is included in the layer counts
},
// hold layer state like wmsQuery being on or off
state: {

}
};

Expand Down

0 comments on commit 16b3d5b

Please sign in to comment.