From a3b5a3ce6d95aa0f602715173774d90a81bb8bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Beli=C3=ABn?= Date: Fri, 7 May 2021 09:36:52 +0200 Subject: [PATCH 1/2] Add missing properties to Options - Missing `modifierKey` to `PanOptions` - Missing `wheelModifierKey` to `ZoomOptions` --- types/options.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/types/options.d.ts b/types/options.d.ts index 8d12f2aa..470a7c27 100644 --- a/types/options.d.ts +++ b/types/options.d.ts @@ -2,6 +2,7 @@ import { Chart, Color, Point } from 'chart.js'; type Mode = 'x' | 'y' | 'xy'; +type Key = 'ctrl' | 'alt' | 'shift' | 'meta'; export interface DragEffectOptions { borderColor?: Color; @@ -47,6 +48,11 @@ export interface ZoomOptions { * Minimal zoom distance required before actually applying zoom */ threshold?: number; + + /** + * Modifier key required for zooming with mouse + */ + wheelModifierKey?: Key; /** * Function called while the user is zooming @@ -87,6 +93,11 @@ export interface PanOptions { */ mode?: Mode | { (char: Chart): Mode }; + /** + * Modifier key required for panning with mouse + */ + modifierKey?: Key; + overScaleMode?: Mode | { (char: Chart): Mode }; /** From 51bea76aa8d3d65bef993ff816735c7a7877611a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Beli=C3=ABn?= Date: Fri, 7 May 2021 09:45:16 +0200 Subject: [PATCH 2/2] Update options.d.ts Apply lint fix (remove trailing spaces). --- types/options.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/options.d.ts b/types/options.d.ts index 470a7c27..1ecac965 100644 --- a/types/options.d.ts +++ b/types/options.d.ts @@ -48,7 +48,7 @@ export interface ZoomOptions { * Minimal zoom distance required before actually applying zoom */ threshold?: number; - + /** * Modifier key required for zooming with mouse */