Constructor
# new DragComponentAction(pluginData, viewport, layout)
Default constructor.
Parameters:
Name | Type | Description |
---|---|---|
pluginData |
DefaultData
|
Plugin data storage. |
viewport |
object
|
D3 selection of the view port. |
layout |
DefaultLayout
|
Layout to organise components. |
Members
Methods
# dropInWorkflow(event, sources, target) → {boolean}
Drop component into workflow container.
Parameters:
Name | Type | Description |
---|---|---|
event |
object
|
The event containing the target information. |
sources |
Array.<Component>
|
Sources to drop. |
target |
Component
|
Target container. |
Need to call draw at the end.
boolean
# dropOnScene(event, sources) → {boolean}
Drop components on scene, remove referenced parent attribute.
Parameters:
Name | Type | Description |
---|---|---|
event |
object
|
The event containing the target information. |
sources |
Array.<Component>
|
Sources to drop. |
Need to redraw only if sources have container.
boolean
# dropOnTarget(event, sources, target) → {boolean}
Drop components into container.
Parameters:
Name | Type | Description |
---|---|---|
event |
object
|
The event containing the target information. |
sources |
Array.<Component>
|
Sources to drop. |
target |
Component
|
Target container. |
Redraw only if source can be dropped on target.
boolean
# execute(event) → {boolean}
Update position of sources element.
Parameters:
Name | Type | Description |
---|---|---|
event |
object
|
The event containing the target information. |
No need to redraw because, element is directly updated.
boolean
# finalize(event) → {boolean}
Update component position and update parent of component if needed.
Parameters:
Name | Type | Description |
---|---|---|
event |
object
|
The event containing the target information. |
Need to call draw at the end.
boolean
# getParentTypes(sources) → {Array.<string>}
Get all parent types that the sources have in common.
Parameters:
Name | Type | Description |
---|---|---|
sources |
Array.<string>
|
Component ids list. |
Parent types list.
Array.<string>