Implements a single custom handle for vertices.
mxHandle | Implements a single custom handle for vertices. |
Functions | |
mxHandle | Constructs a new handle for the given state. |
Variables | |
cursor | Specifies the cursor to be used for this handle. |
image | Specifies the mxImage to be used to render the handle. |
ignoreGrid | Default is false. |
Functions | |
getPosition | Hook for subclassers to return the current position of the handle. |
setPosition | Hooks for subclassers to update the style in the <state>. |
execute | Hook for subclassers to execute the handle. |
copyStyle | Sets the cell style with the given name to the corresponding value in <state>. |
processEvent | Processes the given mxMouseEvent and invokes setPosition. |
positionChanged | Should be called after setPosition in processEvent. |
getRotation | Returns the rotation defined in the style of the cell. |
getTotalRotation | Returns the rotation from the style and the rotation from the direction of the cell. |
init | Creates and initializes the shapes required for this handle. |
createShape | Creates and returns the shape for this handle. |
initShape | Initializes <shape> and sets its cursor. |
redraw | Renders the shape for this handle. |
isHtmlRequired | Returns true if this handle should be rendered in HTML. |
rotatePoint | Rotates the point by the given angle. |
flipPoint | Flips the given point vertically and/or horizontally. |
snapPoint | Snaps the given point to the grid if ignore is false. |
setVisible | Shows or hides this handle. |
reset | Resets the state of this handle by setting its visibility to true. |
destroy | Destroys this handle. |
function mxHandle( state, cursor, image, shape )
Constructs a new handle for the given state.
state | mxCellState of the cell to be handled. |
mxHandle.prototype.image
Specifies the mxImage to be used to render the handle. Default is null.
mxHandle.prototype.processEvent = function( me )
Processes the given mxMouseEvent and invokes setPosition.
mxHandle.prototype.positionChanged = function()
Should be called after setPosition in processEvent. This repaints the state using mxCellRenderer.
Constructs a new handle for the given state.
function mxHandle( state, cursor, image, shape )
Specifies the cursor to be used for this handle.
mxHandle.prototype.cursor
Specifies the mxImage to be used to render the handle.
mxHandle.prototype.image
Default is false.
mxHandle.prototype.ignoreGrid
Hook for subclassers to return the current position of the handle.
mxHandle.prototype.getPosition = function( bounds )
Hooks for subclassers to update the style in the state.
mxHandle.prototype.setPosition = function( bounds, pt, me )
Hook for subclassers to execute the handle.
mxHandle.prototype.execute = function( me )
Sets the cell style with the given name to the corresponding value in state.
mxHandle.prototype.copyStyle = function( key )
Processes the given mxMouseEvent and invokes setPosition.
mxHandle.prototype.processEvent = function( me )
Should be called after setPosition in processEvent.
mxHandle.prototype.positionChanged = function()
Returns the rotation defined in the style of the cell.
mxHandle.prototype.getRotation = function()
Returns the rotation from the style and the rotation from the direction of the cell.
mxHandle.prototype.getTotalRotation = function()
Creates and initializes the shapes required for this handle.
mxHandle.prototype.init = function()
Creates and returns the shape for this handle.
mxHandle.prototype.createShape = function( html )
Initializes shape and sets its cursor.
mxHandle.prototype.initShape = function( html )
Renders the shape for this handle.
mxHandle.prototype.redraw = function()
Returns true if this handle should be rendered in HTML.
mxHandle.prototype.isHtmlRequired = function()
Rotates the point by the given angle.
mxHandle.prototype.rotatePoint = function( pt, alpha )
Flips the given point vertically and/or horizontally.
mxHandle.prototype.flipPoint = function( pt )
Snaps the given point to the grid if ignore is false.
mxHandle.prototype.snapPoint = function( pt, ignore )
Shows or hides this handle.
mxHandle.prototype.setVisible = function( visible )
Resets the state of this handle by setting its visibility to true.
mxHandle.prototype.reset = function()
Destroys this handle.
mxHandle.prototype.destroy = function()