Skip to content

Commit

Permalink
fix: marker event type
Browse files Browse the repository at this point in the history
  • Loading branch information
andybuibui authored Jun 17, 2024
1 parent ac6b4de commit 5914201
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/Marker/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import type { ILngLat } from '@antv/l7';

/**
* 锚点事件类型
*/
export type MarkerEventType = {
data?: MarkerProps['extData'];
lngLat: ILngLat;
target: MouseEvent | TouchEvent;
};

/**
* 锚点相对位置
*/
Expand Down Expand Up @@ -44,7 +53,7 @@ export interface MarkerProps {
/** 用户自定义属性,支持任意数据类型,存储 marker 属性信息。*/
extData?: Record<string, any>;
/** 点击事件 */
onClick?: (e: MouseEvent) => void;
onClick?: (e: MarkerEventType) => void;
/** 子组件 */
children?: React.ReactNode;
}

0 comments on commit 5914201

Please sign in to comment.