|
|||||
| SUMMARY: FIELD | CONSTR | METHOD| EVENT | DETAIL: FIELD | CONSTR | METHOD| EVENT | ||||
This widget displays an interactive line connecting a start position with the current mouse position until the user releases the mouse button.
| Field Summary | |
|---|---|
GraphCanvas |
canvas
The graph canvas that the line should be drawn on. |
HTMLElement |
root
The container in which the line should be drawn. |
String |
templateString
The template used for this widget. |
| Method Summary | |
|---|---|
|
activate(/*GraphCanvas*/ canvas)
activates the drag line for the specified canvas. |
|
activateAt(/*GraphCanvas*/ canvas, /*Object*/ pos)
activates the drag line for the specified canvas at the given position. |
|
deactivate()
deactivates the drag line. |
| Event Summary | |
|---|---|
|
onDeactivated()
is called when the drag line is deactivated (by deactivate() or after finishing a drag) |
|
onLineChange(/*Number*/ x1, /*Number*/ y1, /*Number*/ x2, /*Number*/ y2)
is called whenever the drag line changes |
|
onLineDone(/*Number*/ x1, /*Number*/ y1, /*Number*/ x2, /*Number*/ y2)
is called when the user finishes dragging the line |
| Field Detail |
|---|
/*GraphCanvas*/ canvas
/*HTMLElement*/ root
/*String*/ templateString
| Method Detail |
|---|
activate(/*GraphCanvas*/ canvas)
canvas -
activateAt(/*GraphCanvas*/ canvas, /*Object*/ pos)
canvas -
pos - An object that must have the properties x and y.
deactivate()
| Event Detail |
|---|
onDeactivated()
onLineChange(/*Number*/ x1, /*Number*/ y1, /*Number*/ x2, /*Number*/ y2)
x1 - x-coordinate of the start point of the line
y1 - y-coordinate of the start point of the line
x2 - x-coordinate of the end point of the line
y2 - y-coordinate of the end point of the line
onLineDone(/*Number*/ x1, /*Number*/ y1, /*Number*/ x2, /*Number*/ y2)
x1 - x-coordinate of the start point of the line
y1 - y-coordinate of the start point of the line
x2 - x-coordinate of the end point of the line
y2 - y-coordinate of the end point of the line