Premium support for our pure JavaScript UI components


Post by gorakh.nath »

Hi team,

We have a use-case where on pinch zoom we have to shift the zoom level from one to another which is not a steady increment(+1 increment).
The presets that we are using:
presetIdList = ['dayAndMonth', 'weekAndDay', 'hourAndDay-100by40', 'hourAndDay-64by40-2', 'hourAndDay']. And we have two views that we are showing to the users which are Week View and Month View.

In Week View, we show only the ['weekAndDay', 'hourAndDay-100by40', 'hourAndDay-64by40-2', 'hourAndDay'] presets to the user and pinch-zoom in and zoom out is working as expected as it is a steady increment as per the preset list.

In Month View, we show ['dayAndMonth', 'hourAndDay-100by40', 'hourAndDay-64by40-2', 'hourAndDay'] presets to the user. As you can see, we don't want to show the 'weekAndDay' preset in the month view. Now with zoom in/zoom out buttons we are able to easily traverse the required presets but not do the same with pinch zoom in/out and zoom with mouse wheel scroll. How can we achieve this? (Enabled zoomOnMouseWheel: true for enabling the pinch zoom and mouse wheel scroll).


Post by marcio »

Hey gorakh.nath,

Are you getting an error in the console? Could you provide a sample for us to check your configuration? Also, zoomOnMouseWheel is enabled by default for using CTRL-key + mouse wheel (just a confirmation).

Best regards,
Márcio


Post by gorakh.nath »

Hi Marcio,

No, I am not getting any errors. We want to achieve the above mentioned functionality. The zoom for pinch zoom or zoomOnMouseWheel works based on the order of the viewPresets defined in the presets, right? For our use case, we don't want to follow that order. We want to jump around the viewPresets when we are zooming with zoomOnMouseWheel. How can we achieve that?

In Month View, we show ['dayAndMonth', 'hourAndDay-100by40', 'hourAndDay-64by40-2', 'hourAndDay'] presets to the user. As you can see, we don't want to show the 'weekAndDay' preset in the month view.

As I mentioned earlier, for a particular view we want to show only the preset.records[0],preset.records[2],preset.records[3],preset.records[4] while zooming with zoomOnMouseWheel. We don't want to show the preset.records[1]. How can achieve this?


Post by alex.l »

All the best,
Alex


Post Reply