Class: ZoomPane

ZoomPane(name, options)

A zoom pane.

Constructor

new ZoomPane(name, options)

Create a zoom pane.
Parameters:
Name Type Description
name string A name for the pane.
options Object Configuration options.
Author:
  • Lawrence Fyfe
Source:

Methods

activate()

Activate this pane, allowing it to accept pointer events.
Source:

addTimeDivider(time)

Add a divider at the specified time.
Parameters:
Name Type Description
time number The time.
Source:

clearZoom()

Clear the zoom, setting the zoom brush back to its default.
Source:

deactivate()

Deactivate this pane, preventing it from accepting pointer events.
Source:

decreaseZoom()

Decrease the zoom. This actually increases the size of the zoom brush.
Source:

draw()

Draw this ZoomPane with any time dividers. By default, a zoom brush is created that covers the entire pane. Changing the size of the zoom brush triggers a call to the onZoom() callback with the the zoom brush starting x and ending x values as parameters.
Source:

drawPanel()

Draw the panel for this pane.
Source:

drawTimeDividers()

Draw time dividers.
Source:

erasePanel()

Erase the panel for this pane.
Source:

eraseTimeDividers()

Erase time dividers.
Source:

increaseZoom()

Increase the zoom. This actually decreases the size of the zoom brush.
Source:

initialize(parentElement, width, height, timeScale)

Initialize this ZoomPane.
Parameters:
Name Type Description
parentElement Element The parent element.
width number The parent width.
height number The parent height.
timeScale d3.scaleLinear The time scale.
Source:

initializePanel(panelElement)

Initialize the panel for this pane, setting its parent element to the specified element.
Parameters:
Name Type Description
panelElement element The parent element.
Source:

lower()

Lower this pane to the bottom of the list of panes in its containing TimeFrame.
Source:

moveZoomBrush(startTime, endTime)

Move the zoom brush to the specified time range.
Parameters:
Name Type Description
startTime number The start time.
endTime number The end time.
Source:

raise()

Raise this pane to the top of the list of panes in its containing TimeFrame.
Source:

setZoom(x1, x2)

Set the zoom brush to the specified x range.
Parameters:
Name Type Description
x1 number Start x.
x2 number End x.
Source: