Implements the alignment of selection cells to other cells in the graph.
mxGuide | Implements the alignment of selection cells to other cells in the graph. |
Functions | |
mxGuide | Constructs a new guide object. |
Variables | |
graph | Reference to the enclosing mxGraph instance. |
states | Contains the mxCellStates that are used for alignment. |
horizontal | Specifies if horizontal guides are enabled. |
vertical | Specifies if vertical guides are enabled. |
guideX | Holds the mxShape for the horizontal guide. |
guideY | Holds the mxShape for the vertical guide. |
rounded | Specifies if rounded coordinates should be used. |
tolerance | Default tolerance in px if grid is disabled. |
Functions | |
setStates | Sets the mxCellStates that should be used for alignment. |
isEnabledForEvent | Returns true if the guide should be enabled for the given native event. |
getGuideTolerance | Returns the tolerance for the guides. |
createGuideShape | Returns the mxShape to be used for painting the respective guide. |
isStateIgnored | Returns true if the given state should be ignored. |
move | Moves the <bounds> by the given mxPoint and returnt the snapped point. |
getDelta | Rounds to pixels for virtual states (eg. |
getGuideColor | Returns the color for the given state. |
hide | Hides all current guides. |
setVisible | Shows or hides the current guides. |
destroy | Destroys all resources that this object uses. |
mxGuide.prototype.graph
Reference to the enclosing mxGraph instance.
mxGuide.prototype.states
Contains the mxCellStates that are used for alignment.
mxGuide.prototype.guideX
Holds the mxShape for the horizontal guide.
mxGuide.prototype.guideY
Holds the mxShape for the vertical guide.
mxGuide.prototype.setStates = function( states )
Sets the mxCellStates that should be used for alignment.
mxGuide.prototype.createGuideShape = function( horizontal )
Returns the mxShape to be used for painting the respective guide. This implementation returns a new, dashed and crisp mxPolyline using mxConstants.GUIDE_COLOR and mxConstants.GUIDE_STROKEWIDTH as the format.
horizontal | Boolean that specifies which guide should be created. |
mxGuide.prototype.move = function( bounds, delta, gridEnabled, clone )
Moves the <bounds> by the given mxPoint and returnt the snapped point.
Constructs a new guide object.
function mxGuide( graph, states )
Reference to the enclosing mxGraph instance.
mxGuide.prototype.graph
Contains the mxCellStates that are used for alignment.
mxGuide.prototype.states
Specifies if horizontal guides are enabled.
mxGuide.prototype.horizontal
Specifies if vertical guides are enabled.
mxGuide.prototype.vertical
Holds the mxShape for the horizontal guide.
mxGuide.prototype.guideX
Holds the mxShape for the vertical guide.
mxGuide.prototype.guideY
Specifies if rounded coordinates should be used.
mxGuide.prototype.rounded
Default tolerance in px if grid is disabled.
mxGuide.prototype.tolerance
Sets the mxCellStates that should be used for alignment.
mxGuide.prototype.setStates = function( states )
Returns true if the guide should be enabled for the given native event.
mxGuide.prototype.isEnabledForEvent = function( evt )
Returns the tolerance for the guides.
mxGuide.prototype.getGuideTolerance = function( gridEnabled )
Returns the mxShape to be used for painting the respective guide.
mxGuide.prototype.createGuideShape = function( horizontal )
Returns true if the given state should be ignored.
mxGuide.prototype.isStateIgnored = function( state )
Moves the bounds by the given mxPoint and returnt the snapped point.
mxGuide.prototype.move = function( bounds, delta, gridEnabled, clone )
Rounds to pixels for virtual states (eg.
mxGuide.prototype.getDelta = function( bounds, stateX, dx, stateY, dy )
Returns the color for the given state.
mxGuide.prototype.getGuideColor = function( state, horizontal )
Hides all current guides.
mxGuide.prototype.hide = function()
Shows or hides the current guides.
mxGuide.prototype.setVisible = function( visible )
Destroys all resources that this object uses.
mxGuide.prototype.destroy = function()
Defines the color to be used for the guidelines in mxGraphHandler.
GUIDE_COLOR: '#FF0000'
Defines the strokewidth to be used for the guidelines in mxGraphHandler.
GUIDE_STROKEWIDTH: 1