yfiles/client/tiles/widget/Rubberband
Class Rubberband

a widget for specifying a rectangular area on a GraphCanvas

The Rubberband is realized by a transparent <div> element with the CSS class yFilesRubberbandArea. Its appearance can be modified by updating or overriding the CSS rule for this class in resources/style/yfiles-ajax.css.

 
All Parent Classes:
dijit/_WidgetBase
dijit/_TemplatedMixin
 
Field Summary
 HTMLDivElement area           

The element that displays the rectangular area.

 yfiles/client/tiles/widget/GraphCanvas canvas           

the canvas

 Boolean fixCanvas           

If true then the canvas will be fixed when this widget is activated. The default value is false.

 Boolean releaseCanvas           

If true then the canvas will be released when this widget is deactivated. The default value is false.

 HTMLDivElement root           

The root element of this widget.

 String templateString           

The template that is used by this widget.

 
Constructor Summary
Rubberband(Object|null params, DOMNode|String srcNodeRef)
           

Create the widget.

 
Method Summary
  activate(yfiles/client/tiles/widget/GraphCanvas canvas)           

activates the rubber band for the specified canvas.

  activateAt(yfiles/client/tiles/widget/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)

  postCreate()           
 
Field Detail

area

HTMLDivElement area

The element that displays the rectangular area.


canvas

yfiles/client/tiles/widget/GraphCanvas canvas

the canvas


fixCanvas

Boolean fixCanvas

If true then the canvas will be fixed when this widget is activated. The default value is false.


releaseCanvas

Boolean releaseCanvas

If true then the canvas will be released when this widget is deactivated. The default value is false.


root

HTMLDivElement root

The root element of this widget.


templateString

String templateString

The template that is used by this widget.

 
Constructor Detail

Rubberband

Rubberband(Object|null params, DOMNode|String srcNodeRef)

Create the widget.

Parameters:
params -

Hash of initialization parameters for widget, including scalar values (like title, duration etc.) and functions, typically callbacks like onClick. The hash can contain any of the widget's properties, excluding read-only properties.

srcNodeRef -

If a srcNodeRef (DOM node) is specified:

  • use srcNodeRef.innerHTML as my contents
  • if this is a behavioral widget then apply behavior to that srcNodeRef
  • otherwise, replace srcNodeRef with my generated DOM tree
Method Detail

activate

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

activates the rubber band for the specified canvas.

The rubberband becomes visible on the next mouse down event for the canvas.

Parameters:
canvas -

activateAt

 activateAt(yfiles/client/tiles/widget/GraphCanvas canvas, Object pos)

activates the rubberband for the specified canvas at a specific position.

The rubberband becomes visible at the given position.

Parameters:
canvas -
pos -

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 -
y -
width -
height -

onAreaResized

 onAreaResized(Number x, Number y, Number width, Number height)

is called whenever the rubberband area changes

Parameters:
x -
y -
width -
height -

onDeactivated

 onDeactivated()

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


postCreate

 postCreate()

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