Icard/angular-clarity-master(work.../node_modules/highcharts/modules/mouse-wheel-zoom.js

9 lines
2.7 KiB
JavaScript

!/**
* Highcharts JS v11.4.1 (2024-04-04)
*
* Mousewheel zoom module
*
* (c) 2023 Askel Eirik Johansson
*
* License: www.highcharts.com/license
*/function(e){"object"==typeof module&&module.exports?(e.default=e,module.exports=e):"function"==typeof define&&define.amd?define("highcharts/modules/mouse-wheel-zoom",["highcharts"],function(t){return e(t),e.Highcharts=t,e}):e("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(e){"use strict";var t=e?e._modules:{};function i(e,t,i,o){e.hasOwnProperty(t)||(e[t]=o.apply(null,i),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:t,module:e[t]}})))}i(t,"Extensions/Annotations/NavigationBindingsUtilities.js",[t["Core/Utilities.js"]],function(e){let{defined:t,isNumber:i,pick:o}=e,n={backgroundColor:"string",borderColor:"string",borderRadius:"string",color:"string",fill:"string",fontSize:"string",labels:"string",name:"string",stroke:"string",title:"string"};return{annotationsFieldsTypes:n,getAssignedAxis:function(e){return e.filter(e=>{let t=e.axis.getExtremes(),n=t.min,s=t.max,r=o(e.axis.minPointOffset,0);return i(n)&&i(s)&&e.value>=n-r&&e.value<=s+r&&!e.axis.options.isInternal})[0]},getFieldType:function(e,i){let o=n[e],s=typeof i;return t(o)&&(s=o),({string:"text",number:"number",boolean:"checkbox"})[s]}}}),i(t,"Extensions/MouseWheelZoom/MouseWheelZoom.js",[t["Core/Utilities.js"],t["Extensions/Annotations/NavigationBindingsUtilities.js"]],function(e,t){let i;let{addEvent:o,isObject:n,pick:s,defined:r,merge:l}=e,{getAssignedAxis:a}=t,u=[],h={enabled:!0,sensitivity:1.1},d=e=>(n(e)||(e={enabled:e??!0}),l(h,e)),m=function(e,t,o,n,l,a,u){let h=s(u.type,e.zooming.type,""),d=[];"x"===h?d=o:"y"===h?d=n:"xy"===h&&(d=e.axes);let m=e.transform({axes:d,to:{x:l-5,y:a-5,width:10,height:10},from:{x:l-5*t,y:a-5*t,width:10*t,height:10*t},trigger:"mousewheel"});return m&&(r(i)&&clearTimeout(i),i=setTimeout(()=>{e.pointer?.drop()},400)),m};function c(){let e=d(this.zooming.mouseWheel);e.enabled&&o(this.container,"wheel",t=>{t=this.pointer?.normalize(t)||t;let{pointer:i}=this,o=i&&!i.inClass(t.target,"highcharts-no-mousewheel");if(this.isInsidePlot(t.chartX-this.plotLeft,t.chartY-this.plotTop)&&o){let o=e.sensitivity||1.1,n=t.detail||(t.deltaY||0)/120,s=a(i.getCoordinates(t).xAxis),r=a(i.getCoordinates(t).yAxis);m(this,Math.pow(o,n),s?[s.axis]:this.xAxis,r?[r.axis]:this.yAxis,t.chartX,t.chartY,e)&&t.preventDefault?.()}})}return{compose:function(e){-1===u.indexOf(e)&&(u.push(e),o(e,"afterGetContainer",c))}}}),i(t,"masters/modules/mouse-wheel-zoom.src.js",[t["Core/Globals.js"],t["Extensions/MouseWheelZoom/MouseWheelZoom.js"]],function(e,t){return e.MouseWheelZoom=e.MouseWheelZoom||t,e.MouseWheelZoom.compose(e.Chart),e})});