yfiles.client.tiles.CreateEdgeMode
Class CreateEdgeMode

This is an input mode for creating edges. A CanvasDragLine is used to display the potential edge once the input mode is activated (see activate).

 
All Parent Classes:
InputMode
 
Field Summary
 Boolean routeEdges
          route newly created edges (optional, default false)
 Object startNode
          the start node for the edge to be created (read/write)
 
Constructor Summary
CreateEdgeMode(/*GraphCanvas*/ canvas, /*Boolean*/ routeEdges)
           This is an input mode for creating edges.
 
Method Summary
  activate()
          activates this instance.
  deactivate()
          deactivates this instance.
 
Field Detail

routeEdges

/*Boolean*/ routeEdges
route newly created edges (optional, default false)

startNode

/*Object*/ startNode
the start node for the edge to be created (read/write)
 
Constructor Detail

CreateEdgeMode

CreateEdgeMode(/*GraphCanvas*/ canvas, /*Boolean*/ routeEdges)
This is an input mode for creating edges. A CanvasDragLine is used to display the potential edge once the input mode is activated (see activate).
Parameters:
canvas - the canvas
routeEdges - route newly created edges (optional, default false)
Method Detail

activate

activate()
activates this instance. If the attribute startNode is not set, the instance deactivates itself immediately. Otherwise the CanvasDragLine becomes visible. It is assumed that the left mouse button is pressed. An edge is created when the user eventually releases the button while the mouse is over a node. For creating self loops, the user has to leave the start node and enter it again before releasing the button.

deactivate

deactivate()
deactivates this instance. The CanvasDragLine becomes invisible.

Copyright © 2006-2008 yWorks GmbH. All rights reserved.