/** ******************* */ protected void zoom(final float factor) { Chart chart = targets.get(0); BoundingBox3d viewBounds = chart.getView().getBounds(); BoundingBox3d newBounds = viewBounds.scale(new Coord3d(factor, factor, 1)); chart.getView().setBoundManual(newBounds); chart.getView().shoot(); fireControllerEvent(ControllerType.ZOOM, factor); }
protected void pan(Coord3d from, Coord3d to) { Chart chart = targets.get(0); BoundingBox3d viewBounds = chart.getView().getBounds(); Coord3d offset = to.sub(from).div(-PAN_FACTOR); BoundingBox3d newBounds = viewBounds.shift(offset); chart.getView().setBoundManual(newBounds); chart.getView().shoot(); fireControllerEvent(ControllerType.PAN, offset); }