|
|||||
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. |
yfiles/client/tiles/widget/GraphCanvas |
canvas
the canvas |
Boolean |
fixCanvas
If |
Boolean |
releaseCanvas
If |
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 |
---|
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 Detail |
---|
Rubberband(Object|null params, DOMNode|String srcNodeRef)
Create the widget.
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:
Method Detail |
---|
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.
canvas
-
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.
canvas
-
pos
-
deactivate()
deactivates the rubber band.
The rubberband will not react on mouse events, until the next call to activate().
onAreaDone(Number x, Number y, Number width, Number height)
is called when the user finishes dragging the rubberband area
x
-
y
-
width
-
height
-
onAreaResized(Number x, Number y, Number width, Number height)
is called whenever the rubberband area changes
x
-
y
-
width
-
height
-
onDeactivated()
is called when the Rubberband is deactivated (by deactivate() or after finishing a drag)
postCreate()