Update InteractiveMap prop types (#1324)

This commit is contained in:
Xiaoji Chen 2021-02-02 10:42:43 -08:00 committed by GitHub
parent b7d641ba90
commit deb4303fcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 12 deletions

View File

@ -42,13 +42,13 @@ export type InteractiveMapProps = StaticMapProps & Partial<{
onTransitionInterrupt: Function,
onTransitionEnd: Function,
scrollZoom: boolean,
dragPan: boolean,
dragRotate: boolean,
scrollZoom: boolean | {speed?: number, smooth?: boolean},
dragPan: boolean | {inertia?: number},
dragRotate: boolean | {inertia?: number},
doubleClickZoom: boolean,
touchZoom: boolean,
touchRotate: boolean,
keyboard: boolean,
touchZoom: boolean | {inertia?: number},
touchRotate: boolean | {inertia?: number},
keyboard: boolean | {zoomSpeed?: number, moveSpeed?: number, rotateSpeedX?: number, rotateSpeedY?: number},
touchAction: string,
eventRecognizerOptions: any,
clickRadius: number,

View File

@ -48,19 +48,19 @@ const propTypes = Object.assign({}, StaticMap.propTypes, {
/** Enables control event handling */
// Scroll to zoom
scrollZoom: PropTypes.bool,
scrollZoom: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
// Drag to pan
dragPan: PropTypes.bool,
dragPan: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
// Drag to rotate
dragRotate: PropTypes.bool,
dragRotate: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
// Double click to zoom
doubleClickZoom: PropTypes.bool,
// Multitouch zoom
touchZoom: PropTypes.bool,
touchZoom: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
// Multitouch rotate
touchRotate: PropTypes.bool,
touchRotate: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
// Keyboard
keyboard: PropTypes.bool,
keyboard: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
/** Event callbacks */
onHover: PropTypes.func,