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
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.
Property Value
Gets or sets the optional tag object associated with the handle.
Implements
Gets or sets the type of the handle that can be used by the rendering engine to render types differently.
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.
Implements
Called during the drag to collect snap results.
Remarks
Parameters
A map of options to pass to the method.
- evt - CollectSnapResultsEventArgs
- The CollectSnapResultsEventArgs instance containing the event data.
- source - any
- The source of the event.
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.
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 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.
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.
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.
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.