yfiles/client/tiles/ResizeNodesMode
Class ResizeNodesMode

This is an input mode for resizing selected nodes.

 
All Parent Classes:
yfiles/client/tiles/InputMode
 
Field Summary
 Object mainNode           

the node for which the size change is computed (read/write)

 String mode           

the moving corner or side, either "NW", "N", "NE", "W", "E", "SW", "S" or "SE" (read/write)

 
Constructor Summary
ResizeNodesMode(yfiles/client/tiles/widget/GraphCanvas canvas, yfiles/client/tiles/GraphSelection selection)
           

This is an input mode for resizing selected nodes.

 
Method Summary
  activate()           

activates this instance.

  deactivate()           

deactivates this instance. If necessary ghost objects are hidden.

 
Field Detail

mainNode

Object mainNode

the node for which the size change is computed (read/write)


mode

String mode

the moving corner or side, either "NW", "N", "NE", "W", "E", "SW", "S" or "SE" (read/write)

 
Constructor Detail

ResizeNodesMode

ResizeNodesMode(yfiles/client/tiles/widget/GraphCanvas canvas, yfiles/client/tiles/GraphSelection selection)

This is an input mode for resizing selected nodes.

Parameters:
canvas -

the canvas for which to handle user input

selection -

the selection to use (note that this is a reference and thus a "live" object)

Method Detail

activate

 activate()

activates this instance.

The selection instance passed to this input mode at creation time is checked for the current set of selected nodes. If there are no selected nodes, then this input mode deactivates itself. Otherwise the selected nodes are indicated by resizable ghost objects. It is assumed that the left mouse button is pressed. While the user moves the mouse the ghosts are resized accordingly indicating the potential new sizes of the selected nodes. If the user releases the left mouse button, the ghosts become invisible, and the real selected nodes get their new sizes. The mouse moves the corner or side (as specified by the mode) of the ghost for the main node. This corresponds to a delta in the width and height of the main node which is applied to the ghosts for the other selected nodes.


deactivate

 deactivate()

deactivates this instance. If necessary ghost objects are hidden.


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