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. |
vertical | Holds the mxShape for the horizontal guide. |
vertical | Holds the mxShape for the vertical guide. |
rounded | Specifies if rounded coordinates should be used. |
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. |
move | Moves the <bounds> by the given mxPoint and returnt the snapped point. |
hide | Hides all current guides. |
hide | Hides all current guides. |
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.
Holds the mxShape for the horizontal guide.
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
Specifies if rounded coordinates should be used.
mxGuide.prototype.rounded
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()
Returns the mxShape to be used for painting the respective guide.
mxGuide.prototype.createGuideShape = function( horizontal )
Moves the bounds by the given mxPoint and returnt the snapped point.
mxGuide.prototype.move = function( bounds, delta, gridEnabled, clone )
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