PanelExpanderButton的点击范围太小,现在想和面板绑定,点击这个面板的时候,会触发这个面板下的PanelExpanderButton事件,先感谢各位的建议
Are you asking about how to handle a click event on some panel that is bigger than the “PanelExpanderButton” that you have in that panel? It really would help if you described your circumstances and what you want more completely, preferably with a small screenshot. That might reduce the guessing that I have to do.
I suppose you could implement your own GraphObject.click event handler that either:
- called the click event handler of the “PanelExpanderButton”, or
- executed the same code as that “PanelExpanderButton” event handler, shown in https://gojs.net/latest/extensions/Buttons.js
我是想点击这块白色都区域,展开下面的详情
OK, then my previous answer does apply to your situation.
OK, so now whenever the user clicks anywhere within the “Vertical” Panel, your click function will be called.
You may want to set click = null on the “PanelExpanderButton”, so that its click doesn’t happen and then bubble up to your handler, causing the panel visible property to be toggled twice.