Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gannebamm/5affa046ce667a6657cd9784123db4e3 to your computer and use it in GitHub Desktop.
Save gannebamm/5affa046ce667a6657cd9784123db4e3 to your computer and use it in GitHub Desktop.
Index: web/client/reducers/layers.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/client/reducers/layers.js (revision 8c7f43eb38f2e17e9fec7b7816c5fb96dde08622)
+++ web/client/reducers/layers.js (date 1579704777330)
@@ -163,8 +163,23 @@
// TODO remove
return assign({}, layer, {visibility: false});
}
+ // check if layer shall be exclusive
+ const groups = (state.groups);
+ for (let i in groups) {
+ const group = groups[i];
+ if (group.id === layer.group) {
+ // get group of layer
+ if (group.title === 'exclusive') {
+ if (action.newProperties && action.newProperties.visibility) {
+ console.log(layer.title + " should not be visible anymore");
+ return assign({}, layer, {visibility: false});
+ }
+ }
+ }
+ }
return assign({}, layer);
});
+
return assign({}, state, {flat: newLayers});
}
case CHANGE_GROUP_PROPERTIES: {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment