Skip to content

Commit

Permalink
Add missing modifierKey properties to Options (#502)
Browse files Browse the repository at this point in the history
* Add missing properties to Options

- Missing `modifierKey` to `PanOptions`
- Missing `wheelModifierKey` to `ZoomOptions`

* Update options.d.ts

Apply lint fix (remove trailing spaces).
  • Loading branch information
jbelien committed May 7, 2021
1 parent 1e3b77f commit e0973e0
Showing 1 changed file with 11 additions and 0 deletions.
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 @@ -48,6 +49,11 @@ export interface ZoomOptions {
*/
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

0 comments on commit e0973e0

Please sign in to comment.