Skip to content

Commit e0973e0

Browse files
authored
Add missing modifierKey properties to Options (#502)
* Add missing properties to Options - Missing `modifierKey` to `PanOptions` - Missing `wheelModifierKey` to `ZoomOptions` * Update options.d.ts Apply lint fix (remove trailing spaces).
1 parent 1e3b77f commit e0973e0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

types/options.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Chart, Color, Point } from 'chart.js';
22

33

44
type Mode = 'x' | 'y' | 'xy';
5+
type Key = 'ctrl' | 'alt' | 'shift' | 'meta';
56

67
export interface DragEffectOptions {
78
borderColor?: Color;
@@ -48,6 +49,11 @@ export interface ZoomOptions {
4849
*/
4950
threshold?: number;
5051

52+
/**
53+
* Modifier key required for zooming with mouse
54+
*/
55+
wheelModifierKey?: Key;
56+
5157
/**
5258
* Function called while the user is zooming
5359
*/
@@ -87,6 +93,11 @@ export interface PanOptions {
8793
*/
8894
mode?: Mode | { (char: Chart): Mode };
8995

96+
/**
97+
* Modifier key required for panning with mouse
98+
*/
99+
modifierKey?: Key;
100+
90101
overScaleMode?: Mode | { (char: Chart): Mode };
91102

92103
/**

0 commit comments

Comments
 (0)