Created
March 2, 2020 11:49
-
-
Save gannebamm/5affa046ce667a6657cd9784123db4e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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