yfiles/client/tiles/widget/ViewPortMarker
Class ViewPortMarker

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.

 
All Parent Classes:
dijit/_WidgetBase
dijit/_TemplatedMixin
 
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 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 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 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.

  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

canvas

yfiles/client/tiles/widget/GraphCanvas canvas

The graph canvas whose visible area this widget visualizes.


canvasId

String canvasId

widget id of the observed GraphCanvas


dragDelay

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.


lastBounds

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.


marker

HTMLDivElement marker

The top-level element representing this widget.


markerParent

HTMLElement markerParent

The element that represents the overview widget.


overview

yfiles/client/tiles/widget/GraphCanvas overview

The overview graph canvas where the visible are of the main canvas should be visualized


overviewId

String overviewId

widget id of the overview GraphCanvas


templateString

String templateString

The template that is used to create the HTML for this widget.

 
Constructor Detail

ViewPortMarker

ViewPortMarker(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

canvasChanged

 canvasChanged(Number x, Number y, Number width, Number height, Number zoom)

Callback that is invoked when the viewport of the canvas was changed.

Parameters:
x -
y -
width -
height -
zoom -

centerMarker

 centerMarker(MouseEvent evt)

Callback that centers the viewport visualization around the specified event position.

Parameters:
evt -

The event specifying the coordinates where the viewport should be centered.


createMovable

dojo/dnd/Moveable createMovable()

Create the dojo/dnd/Moveable instance that will be used by the instance to drag the viewport visualization.


lateInitialization

 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.

Parameters:
widget -

A widget that has just been added to the document.


markerChanged

 markerChanged(dojo/dnd/Mover mover, Object leftTop)

Callback that is invoked when the viewport visualization was moved.

Parameters:
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

 overviewChanged()

Callback that is invoked when the viewport of the overview was changed.


postCreate

 postCreate()

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