There may be inaccuracies in the mobile browser, and I want to disable this feature and control it through my own code
Hello @2415994048,
It does not look like there is a public API to control the variable _pinchZoomModifier
in the CameraZoomOperator class. I will create a feature request to include set/get methods to access this variable.
An unofficial way to suppress the pinch zoom feature is to set _pinchZoomModifier
to zero:
var om = hwv.operatorManager;
var operatorZoom = om.getOperator(Communicator.OperatorId.Zoom);
operatorZoom._pinchZoomModifier=0;
Thanks,
Tino
Thank you very much for your help. After setting it up, i can indeed turn off the two finger zoom function. Currently, the effect is that it is not possible to pan the drawing with two fingers on Android, but it can still be translated on iOS. However, there is a problem that the two fingers can still pan the drawing and capture the finger position. There is a probability that the center position of the drawing will be frequently changed during the two finger operation
I want to know which of the above situations is normal. Currently, I prefer the effect of Android fixed center position and how to avoid iOS issues
It sounds like what you want is to just have the orbit operator be active while disabling the pan and zoom operator. To do this, you can control what is in the operator stack via OperatorManager class.
Note that the Navigation
operator combines pan, zoom and orbit. So will need to replace Navigation
with Orbit
and make sure that Pan
and Zoom
are not in the operator stack.
Okay, thank you for your reply. I will try to readjust the configuration