Change zoom-speed for two-finger-pinch?

157 views
Skip to first unread message

goo...@heiner-lamprecht.com

unread,
Jun 6, 2019, 9:15:39 AM6/6/19
to cesium-dev
Hi,

when using a Cesium Viewport in a mobile browser, one can zoom in and out with the two-finger-pinch. Is there any way to change the amount of zooming? At the moment, it feels a bit slow. This is not a performance issue, it is just the translation of the "pinch-amount" to the zoom-amount.

Thanks,

Heiner

Omar Shehata

unread,
Jun 12, 2019, 2:33:06 PM6/12/19
to cesium-dev
I think you can configure this with the defaultZoomAmount:


Let me know if that works. For reference, this is the class that handles the camera user input logic:

goo...@heiner-lamprecht.com

unread,
Jun 13, 2019, 6:13:13 AM6/13/19
to cesium-dev
I tried different values but could not see any difference in the behaviour.

Omar Shehata

unread,
Jul 2, 2019, 4:41:57 PM7/2/19
to cesium-dev
I was wrong - looks like it's a private property you need to change:

viewer.scene.screenSpaceCameraController._zoomFactor = 8; // defaults to 5

It's defined in the top of the class here:


Thanks for bringing this up!

goo...@heiner-lamprecht.com

unread,
Jul 4, 2019, 3:34:48 AM7/4/19
to cesium-dev
Am Dienstag, 2. Juli 2019 22:41:57 UTC+2 schrieb Omar Shehata:
> I was wrong - looks like it's a private property you need to change:
>
> viewer.scene.screenSpaceCameraController._zoomFactor = 8; // defaults to 5

Yeah, this fixes the issue :-)


Thanks,


Heiner

Reply all
Reply to author
Forward
0 new messages