Interface for an object that can be used to drag something displayed in a CanvasComponent
Inheritance Hierarchy
Remarks
Items can be dragged with the mouse and an instance of this class will modify their position accordingly. A drag will trigger the invocation of initializeDrag, zero or more handleMove calls, and will be finalized by either dragFinished or cancelDrag.
See Also
API
- IPositionHandler, IHandle, IInputModeContext
Demos
- Shows how to customize and restrict the movement behavior of nodes.
Members
No filters for this type
Properties
Gets a view of the location of the item.
Gets a view of the location of the item.
The point describes the current world coordinate of the element that can be modified by this handler.
readonlyabstract
Implemented in
ConstrainedDragHandler.location, ConstrainedHandle.location, PortLocationModelParameterHandle.location, PortRelocationHandle.location, RectangleHandle.location, ReshapeHandlerHandle.location, ConstrainedPositionHandler.location, GroupingNodePositionHandler.location, LabelPositionHandler.location, ReparentStripePositionHandler.locationMethods
Called by clients to indicate that the dragging has been canceled by the user.
Called by clients to indicate that the dragging has been canceled by the user.
This method may be called after the initial initializeDrag and zero or more invocations of handleMove. Implementations should reset the position of the items they modify to their initial state. Alternatively to this method the dragFinished method might be called.
abstract
Parameters
- 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
Developer's Guide
Implemented in
ConstrainedDragHandler.cancelDrag, PortLocationModelParameterHandle.cancelDrag, PortRelocationHandle.cancelDrag, RectangleHandle.cancelDrag, ReshapeHandlerHandle.cancelDrag, GroupingNodePositionHandler.cancelDrag, LabelPositionHandler.cancelDrag, ReparentStripePositionHandler.cancelDragCalled by clients to indicate that the repositioning has just been finished.
Called by clients to indicate that the repositioning has just been finished.
This method may be called after the initial initializeDrag and zero or more invocations of handleMove. Alternatively to this method the cancelDrag method might be called.
abstract
Parameters
- 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
Developer's Guide
Implemented in
ConstrainedDragHandler.dragFinished, PortLocationModelParameterHandle.dragFinished, PortRelocationHandle.dragFinished, RectangleHandle.dragFinished, ReshapeHandlerHandle.dragFinished, GroupingNodePositionHandler.dragFinished, LabelPositionHandler.dragFinished, ReparentStripePositionHandler.dragFinishedCalled by clients to indicate that the element has been dragged and its position should be updated.
Called by clients to indicate that the element has been dragged and its position should be updated.
This method may be called more than once after an initial initializeDrag and the final call will be followed by either one dragFinished or one cancelDrag call.
abstract
Parameters
- 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
Developer's Guide
Implemented in
ConstrainedDragHandler.handleMove, PortLocationModelParameterHandle.handleMove, PortRelocationHandle.handleMove, RectangleHandle.handleMove, ReshapeHandlerHandle.handleMove, GroupingNodePositionHandler.handleMove, LabelPositionHandler.handleMove, ReparentStripePositionHandler.handleMoveCalled by clients to indicate that the element is going to be dragged.
Called by clients to indicate that the element is going to be dragged.
This call will be followed by one or more calls to handleMove, and a final dragFinished or cancelDrag.
abstract
Parameters
- context: IInputModeContext
- The context to retrieve information about the drag from.
See Also
Developer's Guide