@@ -59,7 +59,7 @@ function rangeMinLimiter(zoomPanOptions, newMin) {
5959 return newMin ;
6060}
6161
62- function zoomIndexScale ( scale , zoom , center , zoomOptions ) {
62+ function zoomCategoryScale ( scale , zoom , center , zoomOptions ) {
6363 var labels = scale . chart . data . labels ;
6464 var minIndex = scale . minIndex ;
6565 var lastLabelIndex = labels . length - 1 ;
@@ -205,10 +205,10 @@ function doZoom(chart, percentZoomX, percentZoomY, focalPoint, whichAxes) {
205205 }
206206}
207207
208- function panIndexScale ( scale , delta , panOptions ) {
208+ function panCategoryScale ( scale , delta , panOptions ) {
209209 var labels = scale . chart . data . labels ;
210210 var lastLabelIndex = labels . length - 1 ;
211- var offsetAmt = Math . max ( ( scale . ticks . length - ( ( scale . options . gridLines . offsetGridLines ) ? 0 : 1 ) ) , 1 ) ;
211+ var offsetAmt = Math . max ( scale . ticks . length , 1 ) ;
212212 var panSpeed = panOptions . speed ;
213213 var minIndex = scale . minIndex ;
214214 var step = Math . round ( scale . width / ( offsetAmt * panSpeed ) ) ;
@@ -308,15 +308,15 @@ function getYAxis(chartInstance) {
308308}
309309
310310// Store these for later
311- zoomNS . zoomFunctions . category = zoomIndexScale ;
311+ zoomNS . zoomFunctions . category = zoomCategoryScale ;
312312zoomNS . zoomFunctions . time = zoomTimeScale ;
313313zoomNS . zoomFunctions . linear = zoomNumericalScale ;
314314zoomNS . zoomFunctions . logarithmic = zoomNumericalScale ;
315- zoomNS . panFunctions . category = panIndexScale ;
315+ zoomNS . panFunctions . category = panCategoryScale ;
316316zoomNS . panFunctions . time = panTimeScale ;
317317zoomNS . panFunctions . linear = panNumericalScale ;
318318zoomNS . panFunctions . logarithmic = panNumericalScale ;
319- // Globals for catergory pan and zoom
319+ // Globals for category pan and zoom
320320zoomNS . panCumulativeDelta = 0 ;
321321zoomNS . zoomCumulativeDelta = 0 ;
322322
0 commit comments