|
|||||
SUMMARY: FIELD | CONSTR | METHOD| EVENT | DETAIL: FIELD | CONSTR | METHOD| EVENT |
A widget which visualizes the currently visible area of another GraphCanvas on an overview canvas and enables viewpoint dragging in the overview.
The ViewPortMarker is realized by a transparent <div>
element with the
CSS class yFilesViewPortMarker
. Its appearance can be modified by updating or overriding
the CSS rule for this class.
Field Summary | |
---|---|
yfiles/client/tiles/widget/GraphCanvas |
canvas
The graph canvas whose visible area this widget visualizes. |
String |
canvasId
widget id of the observed GraphCanvas |
Number |
dragDelay
The delay between actual viewport changes caused by subsequent drag moves, in milliseconds.
The delay will only be used in bitmap mode in order to limit the amount of tile requests while dragging the viewport marker.
The default value is |
Object |
lastBounds
An object with the properties |
HTMLDivElement |
marker
The top-level element representing this widget. |
HTMLElement |
markerParent
The element that represents the overview widget. |
yfiles/client/tiles/widget/GraphCanvas |
overview
The overview graph canvas where the visible are of the main canvas should be visualized |
String |
overviewId
widget id of the overview GraphCanvas |
String |
templateString
The template that is used to create the HTML for this widget. |
Constructor Summary | |
---|---|
ViewPortMarker(Object|null params, DOMNode|String srcNodeRef)
Create the widget. |
Method Summary | |
---|---|
|
canvasChanged(Number x, Number y, Number width, Number height, Number zoom)
Callback that is invoked when the viewport of the canvas was changed. |
|
centerMarker(MouseEvent evt)
Callback that centers the viewport visualization around the specified event position. |
dojo/dnd/Moveable |
createMovable()
Create the |
|
lateInitialization(Object widget)
Called when any widget has been added to the canvas in order to resolve the main canvas, using the provided canvas id. |
|
markerChanged(dojo/dnd/Mover mover, Object leftTop)
Callback that is invoked when the viewport visualization was moved. |
|
overviewChanged()
Callback that is invoked when the viewport of the overview was changed. |
|
postCreate()
|
Field Detail |
---|
yfiles/client/tiles/widget/GraphCanvas canvas
The graph canvas whose visible area this widget visualizes.
String canvasId
widget id of the observed GraphCanvas
Number dragDelay
The delay between actual viewport changes caused by subsequent drag moves, in milliseconds.
The delay will only be used in bitmap mode in order to limit the amount of tile requests while dragging the viewport marker.
The default value is 30
.
Object lastBounds
An object with the properties x
, y
, width
, height
and zoom
that describes the
most recent bounds and zoom value of the overview.
HTMLDivElement marker
The top-level element representing this widget.
HTMLElement markerParent
The element that represents the overview widget.
yfiles/client/tiles/widget/GraphCanvas overview
The overview graph canvas where the visible are of the main canvas should be visualized
String overviewId
widget id of the overview GraphCanvas
String templateString
The template that is used to create the HTML for this widget.
Constructor Detail |
---|
ViewPortMarker(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 |
---|
canvasChanged(Number x, Number y, Number width, Number height, Number zoom)
Callback that is invoked when the viewport of the canvas was changed.
x
-
y
-
width
-
height
-
zoom
-
centerMarker(MouseEvent evt)
Callback that centers the viewport visualization around the specified event position.
evt
- The event specifying the coordinates where the viewport should be centered.
dojo/dnd/Moveable createMovable()
Create the dojo/dnd/Moveable
instance that will be used by the instance to drag the viewport visualization.
lateInitialization(Object widget)
Called when any widget has been added to the canvas in order to resolve the main canvas, using the provided canvas id.
widget
- A widget that has just been added to the document.
markerChanged(dojo/dnd/Mover mover, Object leftTop)
Callback that is invoked when the viewport visualization was moved.
mover
- The Mover subclass that is used to drag the viewport visualization
leftTop
- An object with l
and t
properties specifying the topleft coordinates of the Mover.
overviewChanged()
Callback that is invoked when the viewport of the overview was changed.
postCreate()