From 4ed9cf07b8ee6cb2ad5ed2258287d988252bfa8d Mon Sep 17 00:00:00 2001 From: Harel M Date: Thu, 25 Jan 2024 20:49:39 +0200 Subject: [PATCH] Added MapMouseEvent type to export (#3622) * Added missing types to export * Was missing in the event group * Fix lint --- src/index.ts | 7 ++++--- src/ui/events.ts | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 9895ccc29c..8c5eaf5125 100644 --- a/src/index.ts +++ b/src/index.ts @@ -32,7 +32,7 @@ import {addProtocol, removeProtocol} from './source/protocol_crud'; import {getGlobalDispatcher} from './util/dispatcher'; import {IControl} from './ui/control/control'; import {EdgeInsets, PaddingOptions} from './geo/edge_insets'; -import {MapTerrainEvent, MapStyleImageMissingEvent, MapStyleDataEvent, MapSourceDataEvent, MapLibreZoomEvent, MapLibreEvent, MapLayerTouchEvent, MapLayerMouseEvent, MapLayerEventType, MapEventType, MapDataEvent, MapContextEvent, MapWheelEvent, MapTouchEvent} from './ui/events'; +import {MapTerrainEvent, MapStyleImageMissingEvent, MapStyleDataEvent, MapSourceDataEvent, MapLibreZoomEvent, MapLibreEvent, MapLayerTouchEvent, MapLayerMouseEvent, MapLayerEventType, MapEventType, MapDataEvent, MapContextEvent, MapWheelEvent, MapTouchEvent, MapMouseEvent} from './ui/events'; import {BoxZoomHandler} from './ui/handler/box_zoom'; import {DragRotateHandler} from './ui/handler/shim/drag_rotate'; import {DragPanHandler} from './ui/handler/shim/drag_pan'; @@ -204,6 +204,9 @@ export { TwoFingersTouchZoomHandler, TwoFingersTouchRotateHandler, TwoFingersTouchPitchHandler, + MapWheelEvent, + MapTouchEvent, + MapMouseEvent, type IControl, type CustomLayerInterface, type CanvasSourceSpecification, @@ -224,8 +227,6 @@ export { type MapEventType, type MapDataEvent, type MapContextEvent, - type MapWheelEvent, - type MapTouchEvent, setRTLTextPlugin, getRTLTextPluginStatus, prewarm, diff --git a/src/ui/events.ts b/src/ui/events.ts index 3593b804e3..573f932cb5 100644 --- a/src/ui/events.ts +++ b/src/ui/events.ts @@ -458,6 +458,9 @@ export type MapSourceDataEvent = MapLibreEvent & { } /** * `MapMouseEvent` is the event type for mouse-related map events. + * + * @group Event Related + * * @example * ```ts * // The `click` event is an example of a `MapMouseEvent`.