Skip to content

Commit 80a398c

Browse files
authored
Fix hook parameters (#472)
1 parent 4b7c818 commit 80a398c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function doZoom(chart, zoom, options = {}, useTransition) {
5757

5858
chart.update(useTransition ? 'zoom' : 'none');
5959

60-
call(options.onZoom, [chart]);
60+
call(options.onZoom, [{chart}]);
6161
}
6262

6363
export function resetZoom(chart) {
@@ -100,6 +100,6 @@ export function doPan(chart, pan, options = {}, enabledScales) {
100100

101101
chart.update('none');
102102

103-
call(onPan, [chart]);
103+
call(onPan, [{chart}]);
104104
}
105105

src/hammer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function endPinch(chart, state, e) {
7777
if (state.scale) {
7878
handlePinch(chart, state, e);
7979
state.scale = null; // reset
80-
call(state.options.zoom.onZoomComplete, [chart]);
80+
call(state.options.zoom.onZoomComplete, [{chart}]);
8181
}
8282
}
8383

@@ -111,7 +111,7 @@ function endPan(chart, state) {
111111
state.delta = null;
112112
if (state.panning) {
113113
setTimeout(() => (state.panning = false), 500);
114-
call(state.options.pan.onPanComplete, [chart]);
114+
call(state.options.pan.onPanComplete, [{chart}]);
115115
}
116116
}
117117

0 commit comments

Comments
 (0)