/** * Registers the appropriate tweens so that the zoom behavior dispatches events over the course of * the transition: a {@link ZoomEventType#ZOOMSTART} event when the transition starts from the * previously-set view, {@link ZoomEventType#ZOOM} events for each tick of the transition, and * finally a {@link ZoomEventType#ZOOMEND} event when the transition ends. * * <p>Note that the transition will be interrupted if the user starts zooming before the * transition ends. * * <p> * * @param selection * @return */ public Zoom event(Transition selection) { JSObject jsObject = selection.getJsObject(); JSObject result = call("event", jsObject); return new Zoom(webEngine, result); }