I am completely new to GO.JS and wanted to create a node template with following constrains -
Node template is rectangle shape with two inner rectangle shape.
The inner rectangle should be with dotted lines.
The dotted rectangle contains text blocks
Now, depending on my setting, I should be able to see dotted lines optionally. For eq. By using the created node in design interface I should be able to see the dotted rectangle (so user can drag-drop custom information) and when actual results is displayed using same node template the dotted lines should not be visible (final result).
How I can achieve this ? I am tring to modify the same of Entity relationship template and found that Shape cannot be added within another shape.
Thanks for your quick reply. Yesterday I also managed to show dotted rectangle in the Entity Relation sample.
With my change, when re sizing the node , inner rectangle remains at same position ( the margin from outer rectangle node to dotted lines gets increased. It should remain same)
Even i tried the sample of “Viewbox Panels”, as per the link by allowing nodes to resizable. With this sample the outer most shape gets resized. By providing the margin to outer most shape, it gets displayed inside of node but then node doesn’t have any border.
With your example also, the inner dotted rectangle remains at same position when re-sized the node. Instead of that it should preserve the margin.
Final expected thing is one node with two text area surrounded by dotted border. By resizing the node the inner dotted rectangle should get resized.
Could you please sketch images before and after resizing? Also, what should happen when the user tries to resize very small, smaller than will fit the text?
I updated your example to have two text box inside a node and resizing possibility. Also it has minimum constrain on node width & height so it cannot be resized beyound specific width & height.
In the sample the bigger node (long text) shows the left & right margin properly but not top & bottom.
In case of Beta node, dotted lines should start at left position as shown in node with large text.
Resizing the large nodes (reducing the width) , should preserve the margin of 5 given to “Vertical” panel.