Class mindmaps.CanvasView
Defined in: CanvasView.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Creates a new CanvasView.
|
Method Attributes | Method Name and Description |
---|---|
Returns the element that contains the drawing area.
|
|
Returns the element that used to draw the map upon.
|
|
Changes the size of the drawing area to match with with the new zoom
factor and scrolls the container to adjust the view port.
|
|
center()
Scrolls the container to show the center of the drawing area.
|
|
drawMap(map)
Should draw the mind map onto the drawing area.
|
|
scroll(x, y)
Scrolls the container.
|
|
setDimensions(width, height)
Applies the new size according to current zoom factor.
|
|
setZoomFactor(zoomFactor)
Sets the new zoom factor and stores the delta to the old one.
|
Class Detail
mindmaps.CanvasView()
Creates a new CanvasView. This is the base class for all canvas view
implementations.
Method Detail
{jQuery}
$getContainer()
Returns the element that contains the drawing area.
- Returns:
- {jQuery}
{jQuery}
$getDrawingArea()
Returns the element that used to draw the map upon.
- Returns:
- {jQuery}
applyViewZoom()
Changes the size of the drawing area to match with with the new zoom
factor and scrolls the container to adjust the view port.
center()
Scrolls the container to show the center of the drawing area.
drawMap(map)
Should draw the mind map onto the drawing area.
- Parameters:
- {mindmaps.MindMap} map
scroll(x, y)
Scrolls the container.
- Parameters:
- {Number} x
- {Number} y
setDimensions(width, height)
Applies the new size according to current zoom factor.
- Parameters:
- {Integer} width
- {Integer} height
setZoomFactor(zoomFactor)
Sets the new zoom factor and stores the delta to the old one.
- Parameters:
- {Number} zoomFactor