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._Widget
dijit._Templated
 
Field Summary
 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.
 String overviewId
          widget id of the overview GraphCanvas
 String templateString
          The template that is used to create the HTML for this widget.
 
Method Summary
  _onMouseDown(/*Event*/ evt)
          Called when the left mouse button has been pressed on the viewport visualization.
  _onMouseUp(/*Event*/ evt)
          Called when the left mouse button has been released on the overview canvas.
  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

/*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.

overviewId

/*String*/ overviewId
widget id of the overview GraphCanvas

templateString

/*String*/ templateString
The template that is used to create the HTML for this widget.
 
Method Detail

_onMouseDown

_onMouseDown(/*Event*/ evt)
Called when the left mouse button has been pressed on the viewport visualization.
Starts a viewport drag gesture.
Parameters:
evt - The mouse down event

_onMouseUp

_onMouseUp(/*Event*/ evt)
Called when the left mouse button has been released on the overview canvas.
Ends a viewport drag gesture.
Parameters:
evt - The mouse up event

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 - The new x coordinate of the canvas.
y - The new y coordinate of the canvas.
width - The new width of the canvas.
height - The new height of the canvas.
zoom - The new zoom of the canvas.

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-2011 yWorks GmbH. All rights reserved.