Skip to main content

Home > @jsplumbtoolkit/browser-ui > ViewGroupOptions

ViewGroupOptions interface

The mapping for the definition of a group inside a view.

Signature:

export interface ViewGroupOptions extends ViewNodeOrPortOptions 

Extends: ViewNodeOrPortOptions

Properties

PropertyModifiersTypeDescription
anchor?AnchorSpec(Optional) Spec for the anchor to use for connections to children of the group when they are transferred to the group in its collapsed state.
autoGrow?boolean(Optional) Defaults to false, meaning that the group will not be resized if an item addition/removal or drag causes the bounds of the child members to change and the new size is greater than the previous size.
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.
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) Spec for the endpoint to use for connections to children of the group when they are transferred to the group in its collapsed state.
ghost?boolean(Optional) Whether or not to show a 'ghost' element when an element inside the group is dragged to the point that it extends outside the bounds of the group. The original element remains inside the group. Defaults to false.
ghostProxyParent?any(Optional)
layout?{ type: string; options?: LayoutParameters; }(Optional) Options for the group's layout.
maxSize?[number, number](Optional) Maximum size the group can grow to. If not specified the group can grow to an arbitrary size. Note that this behaviour can also be enforced via CSS.
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.