yfiles.client.tiles.widget.Rubberband
Class Rubberband

a widget for specifying a rectangular area on a GraphCanvas

 
All Parent Classes:
dijit._Widget
dijit._Templated
 
Field Summary
 GraphCanvas canvas
          the canvas
 
Method Summary
  activate(/*GraphCanvas*/ canvas)
          activates the rubber band for the specified canvas.
  activateAt(/*GraphCanvas*/ canvas, /*Object*/ pos)
          activates the rubberband for the specified canvas at a specific position.
  deactivate()
          deactivates the rubber band.
  onAreaDone(/*Number*/ x, /*Number*/ y, /*Number*/ width, /*Number*/ height)
          is called when the user finishes dragging the rubberband area
  onAreaResized(/*Number*/ x, /*Number*/ y, /*Number*/ width, /*Number*/ height)
          is called whenever the rubberband area changes
  onDeactivated()
          is called when the Rubberband is deactivated (by deactivate() or after finishing a drag)
 
Field Detail

canvas

/*GraphCanvas*/ canvas
the canvas
 
Method Detail

activate

activate(/*GraphCanvas*/ canvas)
activates the rubber band for the specified canvas. The rubberband becomes visible on the next mouse down event for the canvas.

activateAt

activateAt(/*GraphCanvas*/ canvas, /*Object*/ pos)
activates the rubberband for the specified canvas at a specific position. The rubberband becomes visible at the given position.
Parameters:
pos - position with x and y coordinates

deactivate

deactivate()
deactivates the rubber band. The rubberband will not react on mouse events, until the next call to activate().

onAreaDone

onAreaDone(/*Number*/ x, /*Number*/ y, /*Number*/ width, /*Number*/ height)
is called when the user finishes dragging the rubberband area
Parameters:
x - left border of the current rubberband area in pixels
y - upper border of the current rubberband area in pixels
width - width of the current rubberband area in pixels
height - height of the current rubberband area in pixels

onAreaResized

onAreaResized(/*Number*/ x, /*Number*/ y, /*Number*/ width, /*Number*/ height)
is called whenever the rubberband area changes
Parameters:
x - left border of the current rubberband area in pixels
y - upper border of the current rubberband area in pixels
width - width of the current rubberband area in pixels
height - height of the current rubberband area in pixels

onDeactivated

onDeactivated()
is called when the Rubberband is deactivated (by deactivate() or after finishing a drag)

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