|
|||||
| SUMMARY: FIELD | CONSTR | METHOD| EVENT | DETAIL: FIELD | CONSTR | METHOD| EVENT | ||||
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.
| Field Summary | |
|---|---|
HTMLDivElement |
area
The element that displays the rectangular area. |
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. |
| 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. |
|
postCreate()
|
| Event Summary | |
|---|---|
|
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 |
|---|
/*HTMLDivElement*/ area
/*Boolean*/ fixCanvas
true then the canvas will be fixed when this widget is activated.
The default value is false.
/*Boolean*/ releaseCanvas
true then the canvas will be released when this widget is deactivated.
The default value is false.
/*HTMLDivElement*/ root
/*String*/ templateString
| Method Detail |
|---|
activate(/*GraphCanvas*/ canvas)
canvas - The canvas this widget is associated with.
activateAt(/*GraphCanvas*/ canvas, /*Object*/ pos)
canvas - The canvas.
pos - position with x and y coordinates
deactivate()
postCreate()
| Event Detail |
|---|
onAreaDone(/*Number*/ x, /*Number*/ y, /*Number*/ width, /*Number*/ height)
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(/*Number*/ x, /*Number*/ y, /*Number*/ width, /*Number*/ height)
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()