Skip to main content

Home > @jsplumbtoolkit/browser-ui > ViewGroupOptions

ViewGroupOptions interface#

Signature:

export interface ViewGroupOptions extends ViewNodeOrPortOptions 

Extends: ViewNodeOrPortOptions

Properties#

PropertyTypeDescription
anchor?AnchorSpec(Optional)
autoShrink?boolean(Optional) False by default. If true, (and autoSize is also true) indicates that if a child member is dragged/added/removed and the group's size is recalculated to be smaller than the previous size, the new size should be applied.
autoSize?boolean(Optional) False by default. If true, indicates that the group should be resized whenever one of its child elements is dragged. By default this only takes effect if the change in size will cause the group to expand. Set autoShrink:true if you want the group to also automatically shrink.
component?any(Optional)
constrain?boolean(Optional) False by default - nodes/groups may be dragged outside of the bounds of the group. When you do drag a node/group outside of the bounds of its parent, what happens next depends on the other flags you have set and where you have dropped it. orphan:true, for instance, will cause the node/group to be removed from its parent group. revert will reinstate the node/group's position inside its parent, unless it was dropped on another group.
dropOverride?boolean(Optional) False by default. If true, Nodes dropped onto other Groups first have any rules established by this Group applied. For instance, if the Groups stated prune:true, then the Node would be removed from the dataset rather than be dropped onto another Group.
droppable?boolean(Optional) True by default - indicates that nodes/groups may be dropped onto the group, either from some other group or from the main canvas.
endpoint?EndpointSpec(Optional)
layout?{ type: string; options?: LayoutParameters; }(Optional) Options for the group's layout.
orphan?boolean(Optional) False by default. If true, nodes/groups dropped outside of the group (and not dropped onto another group) are removed from the group (but remain in the dataset). When you set this to true, revert is automatically forced to false.
prune?boolean(Optional) False by default. If true, Nodes dropped outside of the Group (and not dropped onto another Group) are removed from the dataset (not just the Group...the entire dataset).
revert?boolean(Optional) True by default - a node/group dragged outside of its parent group will, unless dropped on another group, revert back to its position inside the group.