setZoom method

double setZoom(
  1. double scale
)

Implementation

double setZoom(double scale) {
  final prevScale = viewportScale;
  final nextScale = clampedScale(scale);
  _viewport.scale = nextScale;
  _event.emit(
    "zoom",
    ZoomEventData(prevScale: prevScale, nextScale: nextScale),
  );
  return nextScale;
}