You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to apply the wheelSensitivity and wheelDuration properties to the MapChart, but it seemed to have no effect. Then, I found the following code in the amcharts5 repository.
...
this._wheelDp=chartContainer.events.on("wheel",(event)=>{constwheelEasing=this.get("wheelEasing")!;constwheelSensitivity=this.get("wheelSensitivity",1);constwheelDuration=this.get("wheelDuration",0);constwheelEvent=event.originalEvent;// Ignore wheel event if it is happening on a non-chart element, e.g. if// some page element is over the chart.if($utils.isLocalEvent(wheelEvent,this)){wheelEvent.preventDefault();}else{return;}constpoint=chartContainer._display.toLocal(event.point);if((wheelY=="zoom")){this._handleWheelZoom(wheelEvent.deltaY,point);}elseif(wheelY=="rotateY"){this._handleWheelRotateY(wheelEvent.deltaY/5*wheelSensitivity,wheelDuration,wheelEasing);}elseif(wheelY=="rotateX"){this._handleWheelRotateX(wheelEvent.deltaY/5*wheelSensitivity,wheelDuration,wheelEasing);}if((wheelX=="zoom")){this._handleWheelZoom(wheelEvent.deltaX,point);}elseif(wheelX=="rotateY"){this._handleWheelRotateY(wheelEvent.deltaX/5*wheelSensitivity,wheelDuration,wheelEasing);}elseif(wheelX=="rotateX"){this._handleWheelRotateX(wheelEvent.deltaX/5*wheelSensitivity,wheelDuration,wheelEasing);}
...
I'm curious why wheelSensitivity and wheelDuration properties are missing only when wheelY is set to "zoom".
The text was updated successfully, but these errors were encountered:
Thank you. I will use zoomStep.
In my opinion, it would be better if the documentation explicitly stated that wheelSensitivity and wheelDuration cannot be used when wheelY is set to "zoom", or if the same action is performed regardless of the value of wheelY.
Question
I tried to apply the wheelSensitivity and wheelDuration properties to the MapChart, but it seemed to have no effect. Then, I found the following code in the amcharts5 repository.
amcharts5/src/.internal/charts/map/MapChart.ts
346-382I'm curious why wheelSensitivity and wheelDuration properties are missing only when wheelY is set to "zoom".
The text was updated successfully, but these errors were encountered: