Skip to content

Commit

Permalink
share type
Browse files Browse the repository at this point in the history
  • Loading branch information
BSPR0002 committed Jan 8, 2025
1 parent 0939bb0 commit e803b9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/component/dataZoom/InsideZoomModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import DataZoomModel, {DataZoomOption} from './DataZoomModel';
import { inheritDefaultOption } from '../../util/component';
import { RoamKeysSetting } from '../helper/RoamController';

export interface InsideDataZoomOption extends DataZoomOption {

Expand All @@ -32,11 +33,11 @@ export interface InsideDataZoomOption extends DataZoomOption {
*/
zoomLock?: boolean

zoomOnMouseWheel?: boolean | 'shift' | 'ctrl' | 'alt'
zoomOnMouseWheel?: RoamKeysSetting

moveOnMouseMove?: boolean | 'shift' | 'ctrl' | 'alt'
moveOnMouseMove?: RoamKeysSetting

moveOnMouseWheel?: boolean | 'shift' | 'ctrl' | 'alt'
moveOnMouseWheel?: RoamKeysSetting

preventDefaultMouseMove?: boolean

Expand Down
2 changes: 1 addition & 1 deletion src/component/helper/RoamController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Group from 'zrender/src/graphic/Group';
// Can be null/undefined or true/false
// or 'pan/move' or 'zoom'/'scale'
export type RoamType = RoamOptionMixin['roam'];
type RoamKeysSetting = boolean | 'ctrl' | 'shift' | 'alt' | 'no-function-keys';
export type RoamKeysSetting = boolean | 'ctrl' | 'shift' | 'alt' | 'no-function-keys';

interface RoamOption {
zoomOnMouseWheel?: RoamKeysSetting
Expand Down

0 comments on commit e803b9f

Please sign in to comment.