File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import Hammer from 'hammerjs';
22import { addListeners , computeDragRect , removeListeners } from './handlers' ;
33import { startHammer , stopHammer } from './hammer' ;
44import { doPan , doZoom , resetZoom } from './core' ;
5+ import { panFunctions , zoomFunctions } from './scale.types' ;
56import { getState , removeState } from './state' ;
67import { version } from '../package.json' ;
78
@@ -83,5 +84,9 @@ export default {
8384 stopHammer ( chart ) ;
8485 }
8586 removeState ( chart ) ;
86- }
87+ } ,
88+
89+ panFunctions,
90+
91+ zoomFunctions
8792} ;
Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ describe('module', function() {
77 expect ( window . ChartZoom . id ) . toBe ( 'zoom' ) ;
88 } ) ;
99
10+ it ( 'should expose zoomFunctions and panFunctions' , function ( ) {
11+ expect ( window . ChartZoom . zoomFunctions instanceof Object ) . toBe ( true ) ;
12+ expect ( window . ChartZoom . panFunctions instanceof Object ) . toBe ( true ) ;
13+ } ) ;
14+
1015 it ( 'should be globally registered' , function ( ) {
1116 const plugin = Chart . registry . getPlugin ( 'zoom' ) ;
1217 expect ( plugin ) . toBe ( window . ChartZoom ) ;
You can’t perform that action at this time.
0 commit comments