- I
Remarks
See Also
Developer's Guide
API
- startDrag
Members
Constructors
Initializes a new instance of the StripeDropInputMode class for the given data type.
This instance fires events only if a drag operation carries DragDropItem of the given type.
When no transferType is provided, it defaults to DEFAULT_TRANSFER_TYPE so it fires only for DragDropItem carrying this data type. For example, startDrag initiates such a drag operation.
Parameters
- transferType: string
- A list of types for which this input mode is registered.
Properties
true and thus prevents pointer events from being processed by visuals in the canvas.Property Value
true if pointer input should be captured during the drag; false otherwise.Gets the installed controller.
Defined in
DropInputMode.controllerGets or sets the event recognizer that determines whether to disable snapping temporarily.
Property Value
Gets or sets the DragDropEffects that will be used for drags on the canvas.
Defined in
DropInputMode.dragDropEffectGets the currently dragged IModelItem instance.
Overrides
ItemDropInputMode.draggedItemDefined in
DropInputMode.dropDataGets the pointer position after dropping an item.
Defined in
DropInputMode.dropLocationGets the drop target at snappedPointerPosition
Examples
mode.nodeDropInputMode.enabled = falseDefined in
DropInputMode.enabledThe value of this property will be delegated to the exclusive property of the controller.
If this mode is marked as exclusive and has the mutex, all other modes added to the same MultiplexingInputMode will be deactivated. Otherwise, it will always run concurrently with all other modes.
Defined in
DropInputMode.exclusiveDefined in
DropInputMode.isDraggingGets or sets the callback for item creation.
See Also
Developer's Guide
Defined in
ItemDropInputMode.itemCreatorGets the last processed drag event argument.
Defined in
DropInputMode.lastDragEventArgsRetrieves the IInputModeContext this mode has been installed in.
null if this mode is currently not installed. Use createInputModeContext to obtain a context that has this IInputMode as the inputMode.Defined in
DropInputMode.parentInputModeContextGets the current pointer position during drag operations.
Defined in
DropInputMode.pointerPositionGets the graph displayed as item preview.
Property Value
null if no preview is displayed at the moment.See Also
Developer's Guide
Defined in
ItemDropInputMode.previewGraphDefined in
DropInputMode.priorityGets or sets the GraphSnapContext which is used to snap the dragged element during the drag.
null (the default), this input mode tries to obtain the GraphSnapContext from the IInputModeContext. To explicitly disable snapping, a GraphSnapContext implementation that is disabled needs to be set.See Also
Developer's Guide
Defined in
ItemDropInputMode.snapContextGets the current snapped pointer position during drag operations.
Defined in
ItemDropInputMode.snappedPointerPositionGets or sets the IHitTestable that determines whether the given location is a valid drop location.
Property Value
true for valid drop locations.See Also
Developer's Guide
Defined in
DropInputMode.validDropHitTestableMethods
Called to adjust the dropEffect accordingly.
Parameters
- evt: DragEventArgs
- The event args of the drag event to adjust the effects for.
Return Value
- boolean
trueif the drag event is handled by this input mode.
Overrides
DropInputMode.adjustEffectOverrides
DropInputMode.cancelDefined in
ItemDropInputMode.cleanUpDefined in
ItemDropInputMode.cleanUpDropTargetDefined in
ItemDropInputMode.cleanUpSnapContextCallback registered on the SnapContext that collects SnapResults for the dragged element.
Parameters
- evt: CollectSnapResultsEventArgs
- The arguments describing the movement SnapResults shall be collected for.
- source: any
- The SnapContext this callback is registered at.
Defined in
ItemDropInputMode.collectSnapResultsCreates an implementation of IInputModeContext that is specific to this mode.
This is needed for events that are triggered by this InputMode to signalize where the event is coming from. A common usage for this is for example in isHit calls.
The result can be given to isHit or enumerateHits to let implementations of IHitTestable get access to the current IInputModeContext. This can be done by looking up IInputModeContext from the ICanvasContext's lookup method or simply downcasting.
Return Value
- IInputModeContext
- A readily configured IInputModeContext.
Defined in
ItemDropInputMode.createInputModeContextHelper method that yields a suitably configured InputModeEventArgs for this input mode.
Return Value
- InputModeEventArgs
- An input mode event argument that is configured for this instance.
Defined in
DropInputMode.createInputModeEventArgsCreate a preview version of the table that is temporarily used to show the dragged stripe.
Create a new stripe as the result of a drag and drop gesture.
Parameters
- context: IInputModeContext
- The context for which the stripe should be created.
- newParent: IStripe
- The parent for which to create the stripe.
- draggedStripe: IStripe
- The dragged stripe.
Return Value
- IStripe
- a newly created stripe.
Returns the drop target at the specified location.
null is returned.Parameters
- dragLocation: Point
- The location to return the drop target for.
Return Value
- IModelItem
- The drop target at the specified location or
nullif no drop target can be found.
Defined in
ItemDropInputMode.getDropTargetParameters
Return Value
Defined in
ItemDropInputMode.initializeDropTargetSee Also
Developer's Guide
Defined in
ItemDropInputMode.initializePreviewDefined in
ItemDropInputMode.initializeSnapContextInstalls this mode into the given canvas.
Parameters
- context: IInputModeContext
- the context to install this mode into
- controller: ConcurrencyController
- The controller for this mode.
See Also
Defined in
DropInputMode.installCalled after cancel has been called.
Can be overridden in subclasses to perform additional actions after the mode has been canceled.
This implementation does nothing.
Defined in
DropInputMode.onCanceledCan be overridden in subclasses to perform additional actions after the mode has been activated.
Overriding implementations should call the base implementation.
Can be overridden in subclasses to perform additional actions after the mode has been deactivated.
Overriding implementations should call the base implementation.
Called once a drag has been dropped on the canvas.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Overrides
ItemDropInputMode.onDragDroppedCalled once a drag has entered the canvas.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Overrides
ItemDropInputMode.onDragEnteredCalled whenever a drag is over the canvas.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Defined in
ItemDropInputMode.onDraggedOverCalled once a drag has left the canvas.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Overrides
ItemDropInputMode.onDragLeftCalled whenever a new item is created.
Parameters
- evt: InputModeItemEventArgs<IStripe>
- The InputModeItemEventArgs<TModelItem> containing the new item.
Defined in
ItemDropInputMode.onItemCreatedCalled after tryStop has been called.
Can be overridden in subclasses to perform additional actions after the mode has been stopped.
This implementation does nothing.
Defined in
DropInputMode.onStoppedCalled whenever a new stripe is created.
Parameters
- evt: InputModeItemEventArgs<IStripe>
- The InputModeItemEventArgs<IStripe> of the creation event.
Subclasses shall fill the specified graph that is used to preview the dragged item.
Sets the drag location and calls updatePreview to update the layout of item preview based on the pointer coordinates and the results of the snapContext.
Parameters
- location: Point
- The current location of the pointer in world coordinates.
Overrides
ItemDropInputMode.setDragLocationOverridden to only return true if this instance does not currently have the input mutex.
true if this instance does not currently have the input mutex.Uninstalls this mode from the canvas.
Parameters
- context: IInputModeContext
- the context
Defined in
DropInputMode.uninstallParameters
- dragLocation: Point
- The location to update the drop target for.
Defined in
ItemDropInputMode.updateDropTargetSubclasses shall update the previewGraph so the dragged item is displayed at the specified dragLocation.
dragLocation.Events
Occurs when a drag operation is dropped onto the CanvasComponent into which this instance is installed.
No event is raised
- if this instance is not enabled,
- if another concurrent input mode is active or
- the data from the drag operation does not conform to the expected type.
To get additional data for the event, clients should use the sender which is set to the sending DropInputMode. The EventArgs provide no useful data.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Defined in
DropInputMode.drag-droppedOccurs when a drag operation enters the CanvasComponent into which this instance is installed.
No event is raised
- if this instance is not enabled,
- if another concurrent input mode is active or
- the data from the drag operation does not conform to the expected type.
To get additional data for the event, clients should use the sender which is set to the sending DropInputMode. The EventArgs provide no useful data.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Defined in
DropInputMode.drag-enteredOccurs when a drag operation leaves the CanvasComponent into which this instance is installed.
No event is raised
- if this instance is not enabled,
- if another concurrent input mode is active or
- the data from the drag operation does not conform to the expected type.
To get additional data for the event, clients should use the sender which is set to the sending DropInputMode. The EventArgs provide no useful data.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Defined in
DropInputMode.drag-leftOccurs when a drag operation drags over the CanvasComponent into which this instance is installed.
No event is raised
- if this instance is not enabled,
- if another concurrent input mode is active or
- the data from the drag operation does not conform to the expected type.
To get additional data for the event, clients should use the sender which is set to the sending DropInputMode. The EventArgs provide no useful data.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Defined in
DropInputMode.drag-overOccurs when a new item gets created by this input mode.
Properties of
InputModeItemEventArgs<IStripe>- context: IInputModeContext
- Gets the context for the current event.
- item: TModelItem
- Gets the item which has been created or changed.
Defined in
ItemDropInputMode.item-createdOccurs when a new stripe gets created by this input mode.
Properties of
InputModeItemEventArgs<IStripe>- context: IInputModeContext
- Gets the context for the current event.
- item: TModelItem
- Gets the item which has been created or changed.
Constants
The transfer type to which the StripeDropInputMode and its startDrag method is configured by default.
Static Methods
Starts a drag and drop operation for an IStripe.
This method creates a DragSource, and then invokes startDrag with a DragDropItem that contains the stripe and the corresponding type.
If useCssCursors is enabled, the following CSS classes are assigned to elements hovered during a drag operation, depending on the allowed drag-drop operations for these elements:
yfiles-cursor-dragdrop-moveyfiles-cursor-dragdrop-linkyfiles-cursor-dragdrop-allyfiles-cursor-dragdrop-no-drop
Parameters
- dragSource: any
- The source of the drag operation.
- stripe: IStripe
- The stripe to drag.
- dragDropEffects?: DragDropEffects
- The allowed drag drop effects.
- useCssCursors?: boolean
- Whether to adjust the classes of elements being hovered over during the drag. The default is
true. - dragPreview?: any
- Optional element that should be shown during dragging, e.g. outside of the GraphComponent. Note that this feature requires support for CSS pointer-events and should not be used in browsers that do not support it.
Return Value
- DragSource
- The new DragSource instance.