An implementation of the IHandle that can be used to move an IPort interactively by assigning new IPortLocationModelParameters to the locationParameter
Remarks
Type Details
- yfiles module
- view-editor
- yfiles-umd modules
- view-editor, view-table, view
- Legacy UMD name
- yfiles.input.PortLocationModelParameterHandle
Constructors
Initializes a new instance of the PortLocationModelParameterHandle class to change the IPortLocationModelParameter of the given port
Parameters
A map of options to pass to the method.
- port - IPort
- The port to adjust the location parameter of.
Properties
Gets a view of the location of the item.
Remarks
Implements
Gets the port this instance acts on.
Methods
Called by clients to indicate that the dragging has been canceled by the user.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to retrieve information about the drag from.
- originalLocation - Point
- The value of the coordinate of the location property at the time of initializeDrag.
See Also
Implements
Called during the drag to collect snap results.
Remarks
Parameters
A map of options to pass to the method.
- source - Object
- The source of the event.
- evt - CollectSnapResultsEventArgs
- The CollectSnapResultsEventArgs instance containing the event data.
Called by clients to indicate that the repositioning has just been finished.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to retrieve information about the drag from.
- originalLocation - Point
- The value of the location property at the time of initializeDrag.
- newLocation - Point
- The coordinates in the world coordinate system that the client wants the handle to be at. Depending on the implementation the location may or may not be modified to reflect the new value. This is the same value as delivered in the last invocation of handleMove
See Also
Implements
Gets the graph to use for setting the parameter from the context.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The input mode context to use.
Returns
- ↪IGraph
- The graph or
null
if the graph could not be obtained.
See Also
Determines the type of the movement for the given port.
Remarks
Parameters
A map of options to pass to the method.
- port - IPort
- The port to determine the move type for.
Returns
- ↪MoveTypes
- This implementation returns LINEAR_MOVE for models of type FreeNodePortLocationModel and ARBITRARY_MOVE for all others.
getNewParameter
(port: IPort, model: IPortLocationModel, location: Point) : IPortLocationModelParameterObtains the new parameter for the given location and port.
Parameters
A map of options to pass to the method.
- port - IPort
- The port to obtain a parameter for.
- model - IPortLocationModel
- The model to use.
- location - Point
- The new location.
Returns
- ↪IPortLocationModelParameter
- The new parameter to use.
Ignore clicking the handle.
Parameters
A map of options to pass to the method.
- evt - ClickEventArgs
- Arguments describing the click.
See Also
Implements
Called by clients to indicate that the element has been dragged and its position should be updated.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to retrieve information about the drag from.
- originalLocation - Point
- The value of the location property at the time of initializeDrag.
- newLocation - Point
- The coordinates in the world coordinate system that the client wants the handle to be at. Depending on the implementation the location may or may not be modified to reflect the new value.
See Also
Implements
Called by clients to indicate that the element is going to be dragged.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to retrieve information about the drag from.
See Also
Implements
Applies the parameter.
Parameters
A map of options to pass to the method.
- graph - IGraph
- The graph to use for applying.
- port - IPort
- The port to apply the parameter to.
- locationParameter - IPortLocationModelParameter
- The new parameter to apply.