The main svg element.
The svg group used for panning and zooming the main svg.
The main zoom behavior.
The minimap container.
The maximum width/height for the minimap.
Padding in pixels due to the main graph labels.
The canvas used for drawing the mini version of the svg.
A buffer canvas used for temporary drawing to avoid flickering.
Padding (px) due to the main labels of the graph.
The zoom behavior of the main svg.
The maximum width and height for the minimap.
The minimap container.
The current size of the minimap
The minimap svg used for holding the viewpoint rectangle.
The last scaling factor used in the main svg.
The scale factor for the minimap. The factor is determined automatically so that the minimap doesn't violate the maximum width/height specified in the constructor. The minimap maintains the same aspect ratio as the original svg.
The main svg element.
The last translation vector used in the main svg.
The rectangle showing the current viewpoint.
The coordinates of the viewpoint rectangle.
The svg group used for panning and zooming the main svg.
Redraws the minimap. Should be called whenever the main svg was updated (e.g. when a node was expanded).
Updates the position and the size of the viewpoint rectangle. It also notifies the main svg about the new panned position.
Handles changes in zooming/panning. Should be called from the main svg to notify that a zoom/pan was performed and this minimap will update it's viewpoint rectangle.
The translate vector, or none to use the last used one.
The scaling factor, or none to use the last used one.
Generated using TypeDoc
Constructs a new minimap.