Zoom in or out
This document describes how to zoom on the whiteboard being displayed.

Prerequisites
Create a whiteboard by referring to Create a super board.
Implementation steps
The zooming function is enabled by default. You can use gestures to zoom in and out on a whiteboard.
If the setToolType is set to Click, this function is disabled and the whiteboard cannot be zoomed in or out using gestures.
-
Call the setOperationMode method to set the operation mode to ZegoSuperBoardOperationMode.Zoom, to enable the zooming function of ZegoSuperBoard.
-
Multiple modes can be set simultaneously using the "bitwise OR operator". For example, when set to Zoom | Draw, both zoom mode and draw mode are supported.
// Get the currently displayed subView through superBoardView
var zegoSuperBoard = ZegoSuperBoardManager.getInstance()
var zegoSuperBoardSubView = zegoSuperBoard.getSuperBoardView().getCurrentSuperBoardSubView();
if (!zegoSuperBoardSubView) return;
// Enable only the zooming function.
// ZegoSuperBoardOperationMode.Zoom = 8
zegoSuperBoardSubView.setOperationMode(8);
// Enable both the drawing and zooming functions.
// ZegoSuperBoardOperationMode.Draw = 4
// ZegoSuperBoardOperationMode.Zoom = 8
zegoSuperBoardSubView.setOperationMode(4|8);Use the following methods to enable the synchronous zooming function to synchronously zoom in and out for all parties.
//Enable the synchronous zooming function.
ZegoSuperBoardManager.getInstance().enableSyncScale(true)
//Enable the function of receiving the synchronous zooming effect.
ZegoSuperBoardManager.getInstance().enableResponseScale(true);
