ReadonlyallowWhat the zoom may do.
ReadonlygesturesWhether the zoom may listen to the mouse and the fingers.
Whether the zoom may move the origin.
Whether the zoom may change the length of a unit.
Whether the mode of navigation is on: see gestures.
Enters or leaves the mode of navigation. In it a layer over the drawing takes the mouse and the fingers: a drag moves the drawing (if the zoom may move), the wheel zooms (if it may zoom), and two fingers pinch to zoom and move. The points cannot be dragged meanwhile.
The length of a unit compared with the one at the start: 2 when it is twice as long.
The part of the plane that the drawing shows, in units.
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Optionaloptions: boolean | AddEventListenerOptionsThe dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
Stops listening and takes the layer away. The layout stays as it is.
Stop calling a handler given to on.
the zoom, to chain.
Call handler when the zoom sends event. The same handler given twice is called once.
the zoom, to chain.
Someone else changed the layout: it becomes the one that reset comes back to. Either way, the window changed.
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
Optionaloptions: boolean | EventListenerOptionsComes back to the layout at the start (or the last one that someone else gave to the graph). It is always allowed.
Makes the units factor times longer. The point of the drawing under center (in pixels, the middle of the drawing by default) stays
under it; with allow: 'zoom' the origin is the one that stays, and center is not used. Stops at the limits of the zoom.
Optionalcenter: XYShows exactly this part of the plane, each axis with its own length of unit.
Zooms and moves the part of the plane that a graph shows: the drawing keeps its size, the units get longer or shorter and the origin moves. It is made with the graph,
new Zoom(graph), and attaches itself to it; a graph has one. It is independent from the other controllers.What it may do is
allow(both,zoomormove). The units never go below a hundredth or above a hundred times the ones at the start: a zoom that would go beyond stops there. The points that were dragged or animated keep their place in the plane (seeGraph.updateLayout).With
gestures: trueit may also listen to the mouse and the fingers: Ctrl and the wheel always zoom around the cursor, and in the mode of navigation (navigating) a drag moves the drawing, the wheel zooms, and two fingers pinch to zoom and move. In that mode the points of the drawing cannot be dragged: a layer over the drawing takes the mouse and the fingers.The events are
change(the window that is shown, whoever changed the layout) andnavigation(the mode was entered or left).