Hello,
https://gojs.net/latest/intro/itemArrays.html#ItemTemplates
I assign the “vertical” value of the main panel to “spot” or “auto”.
When this happens, the panel adds an extra element.
is it bug or i did it wrong?
Hello,
https://gojs.net/latest/intro/itemArrays.html#ItemTemplates
I assign the “vertical” value of the main panel to “spot” or “auto”.
When this happens, the panel adds an extra element.
is it bug or i did it wrong?
No, GoJS never automatically adds elements to a panel beyond what you supply in the Panel.itemArray.
However the arrangement (size and position) of the elements in a panel can vary dramatically based on the panel type. GoJS Panels -- Northwoods Software
Ok I’ve realized now.
I use binding function for “itemArray” and i return new javascript array. ( this object not equal node source data). Panel is render one more item for this state.
But if i use orjinal data for node .
It is good working.
Well how to access node data for the bindings in the “itemTemplate” values ?
We don’t make this particularly easy or efficient, but perhaps you have a situation such as:
itemTemplate:
$(go.Panel, . . .,
$(go.Shape, . . .,
new go.Binding("fill", "", function(itemdata, shape) {
return shape.part.data.color || "black";
})),
. ..
)
so thanks walter