A more sophisticated IHandle implementation that modifies a rectangle.
Implements
- I
- I
- I
- I
Remarks
Implementations of this class work on a mutable rectangle instance for handling drags of the handle. A separate point implementation is used for specifying the position of the handle. As a convenience, this class also implements the IMutablePoint interface which modifies the handle's position.
Members
Show:
Constructors
Creates a handle for the given rectangle at the given position.
Creates a handle for the given
rectangle at the given position.The location is calculated for the rectangle using the position.
The instance modifies the instances using the IMutableRectangle interface. The handle will automatically trim changes of the rectangle to the specified minimum and maximum size.
Parameters
- position: HandlePositions
- The position of the handle.
- rectangle: IMutableRectangle
- The rectangle to change.
Properties
Gets or sets the cursor to display when the mouse hovers over or drags this handle.
Gets or sets the cursor to display when the mouse hovers over or drags this handle.
conversionfinal
Implements
IHandle.cursorGets a view of the center of the handle.
Gets a view of the center of the handle.
The point describes the current world coordinate of the element that can be modified by this handle.
readonlyfinal
Implements
IDragHandler.locationGets or sets the largest allowed size for the rectangle.
Gets or sets the largest allowed size for the rectangle.
The default is INFINITE, which does not restrict the area at all.
conversionfinal
The value is stored by reference. The default is INFINITE.
conversionfinal
Gets or sets the minimum enclosed area that needs to be encompassed by the rectangle.
Gets or sets the minimum enclosed area that needs to be encompassed by the rectangle.
The default is EMPTY, which does not restrict the area at all.
conversionfinal
The default is ZERO.
conversionfinal
Gets the position of the handle.
Gets the position of the handle.
protectedreadonlyfinal
Gets the rectangle instance to modify.
Gets the rectangle instance to modify.
protectedreadonlyfinal
final
Implements
IHandle.tagGets or sets the type of the handle that can be used by the rendering engine to render types differently.
Gets or sets the type of the handle that can be used by the rendering engine to render types differently.
conversionfinal
Implements
IHandle.typeThe setter delegates to moveBy
final
Implements
IMutablePoint.xThe setter delegates to moveBy
final
Implements
IMutablePoint.yMethods
Delegates the original values to set.
Delegates the original values to set.
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.
Implements
IDragHandler.cancelDragCalculates the Euclidean distance between two points.
Calculates the Euclidean distance between two points.
Parameters
- point2: IPoint
- The second point.
Return Value
- number
- The distance between the two points.
Defined in
IPoint.distanceToParameters
- x: number
- the x coordinate of the second point
- y: number
- the y coordinate of the second point
Return Value
- number
- the Euclidean distance between this point and the point (x,y).
Defined in
IPoint.distanceToThis implementation does nothing.
This implementation does nothing.
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
Implements
IDragHandler.dragFinishedIgnore clicking the handle.
Ignore clicking the handle.
Delegates to set.
Delegates to set.
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.
Implements
IDragHandler.handleMoveThis implementation does nothing.
This implementation does nothing.
Parameters
- context: IInputModeContext
- The context to retrieve information about the drag from.
Implements
IDragHandler.initializeDragDelegates to moveBy.
Delegates to moveBy.
Parameters
- x: number
- The amount to move in x-direction.
- y: number
- The amount to move in y-direction.
Parameters
- x: number
- The new x-coordinate.
- y: number
- The new y-coordinate.
Defined in
IMutablePoint.setLocationThis method is useful to obtain a copy of the state and for making use of the various utility methods that are provided by Point.
Return Value
- Point
- The current values of the coordinates of the point.