Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing modifierKey properties to Options #502

Merged
merged 2 commits into from
May 7, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions types/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 };

/**
Expand Down