为什么我设置了isTreeExpanded会改变我的布局

当我不设置isTreeExpanded属性的时候,我刚加载进来时的布局是正常的

但是,当我设置了isTreeExpanded之后,我的布局就乱掉了,这是为什么?

我试着注释掉了scrollMode:go.Diagram.InfiniteScroll属性,发现能够正常运作,但是我需要他,我该怎么做

We’ll investigate.

What browser and platform are you experiencing this problem? Have you tried it with different browsers and on different operating systems and hardware?

We have found a minor problem only on Firefox with initialAutoScale: go.Diagram.Uniform if the Diagram DIV is 100% width (and maybe some other specific circumstances).

However we have not noticed any problems that depend on the Diagram.scrollMode.

I also don’t understand your issues with Node.isTreeExpanded. If the value of that property is false, I’d expect only a single node to be visible in the diagram. Or only however nodes are the roots of trees. So I don’t understand how you could get the second diagram screenshot.

我使用的是谷歌浏览器,windows的操作系统,我的div是100%的宽度,现在我也不知道哪里出了问题,我只要设置isTreeExpanded为false,initialAutoScale:go.Diagram.Uniform就不能正常的工作

If you could give us some way to reproduce the problem, we could look into it.

Have you confirmed that the behavior of your app is exactly the same in other browsers?

Do you do anything to expand trees when your node template sets Node.isTreeExpanded to false?

首先,很抱歉这么久才回复你,希望你能谅解
我在这里设置了全部折叠


然后我再展开到第三级的节点,其余不展开
就出现了我上述描述的问题,整的布局就不居中了

谢谢你的回复,让我找到了灵感,我通过设置initialPosition,很好的解决了我的问题