yfiles/client/tiles/ZoomAreaMode
Class ZoomAreaMode

This is an input mode for zooming to an area by means of a Rubberband.

 
All Parent Classes:
yfiles/client/tiles/InputMode
 
Constructor Summary
ZoomAreaMode(yfiles/client/tiles/widget/GraphCanvas canvas)
           

This is an input mode for zooming to an area by means of a Rubberband.

 
Method Summary
  activate()           

activates this instance.

  deactivate()           

deactivates this instance. The Rubberband is hidden.

 
Constructor Detail

ZoomAreaMode

ZoomAreaMode(yfiles/client/tiles/widget/GraphCanvas canvas)

This is an input mode for zooming to an area by means of a Rubberband.

Parameters:
canvas -

the canvas for which to handle user input

Method Detail

activate

 activate()

activates this instance.

The Rubberband for specifying the zoom area is shown, but it is only one pixel wide and high. It is assumed that the left mouse button is pressed. While the user moves the mouse the Rubberband is resized accordingly. If the user releases the left mouse button, the canvas is zoomed to the current area of the Rubberband. Usually, it is not possible to zoom exactly to the area indicated by the Rubberband, since it does not have the same aspect ratio as the canvas. Therefore the canvas is centered at the center of the Rubberband and its zoom value is such that either width or height fills the canvas. If the zoom area is less than 10 pixels wide or high the operation is canceled.


deactivate

 deactivate()

deactivates this instance. The Rubberband is hidden.


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