Adds the given objects to the given drag group.
Spec for the drag group. If you supply a string, then all objects are added to the drag group with that name, and they are marked "active". If you supply an object in the form { id:string, active?:boolean } then all the objects are added to the drag group with the active state you provide.
Rest
...objects: (Objects to add.
Runs each of the given objects through the code that automatically assigns them to a drag group. Since this
Rest
...objects: (Removes the given object(s) from any drag group they may belong to. You don't need to specify the name of the drag group since an object may belong to only one at a time.
Rest
...objects: (
Provides the ability to assign elements to groups for dragging purposes: when a member of some group is dragged, the other elements of the group can be dragged along with it.
The core concept is of the "DragGroup", which is basically just a tag. Each member of a group can belong to the group in one of two roles:
When you configure this plugin you are required to provide an
assignDragGroup
function, whose signature is:assignDragGroup:(v:Vertex) => DragGroupSpec
The return value
DragGroupSpec
may be either:id
andactive
which you can specify the active/passive role