1

I've followed go.js example (http://gojs.net/latest/intro/layers.html) of using layers and now I want to modify it, so I can assign all groups to the same new layer while keeping the contents of the group in a separate layer. This seems to be working, as I can see, that depending on addLayerBefore or addLayerAfter being called the group overlay is displayed in front or behind the group contents. Now unfortunately, when I set the group layer invisible the group contents also become invisible. This is bad, as my whole idea to put the group and its contents to the separate layers, was in order to be able to add button, that toggle displaying group overlay, while keeping group contents always visible. Is there any way to achieve this functionality?

4

1 回答 1

2

最简单的方法是将组或图层设置opacity0,而不是使用visibleParts 或 Layers 的属性。

visible有隐藏其他对象的特定规则,例如组的成员部分、连接的链接等。opacity始终只是装饰性的。

于 2015-09-24T17:24:18.800 回答