antvis / antvis/L7Draw

🤔 [QUESTION] 绘制enable时,如果点击点不是Map,而是map上的其他元素如 Marker,如何阻止呢?

Open
#188 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
52
Forks
35
PR merge metrics
No merged PRs in 30d

Description

### 🐛 Question description [Please make everyone to understand it]

绘制已经enable时,如果点击点不是Map,而是map上的其他元素如 Marker,如何阻止呢?

```typescript
import type { LarkMapProps } from '@antv/larkmap';
import { LarkMap, Marker } from '@antv/larkmap';
import { message } from 'antd';
import React from 'react';

const larkmapOptions: LarkMapProps = {
mapType: 'Gaode',
mapOptions: { center: [120.210792, 30.246026], zoom: 10 },
};

export default () => (

{
// event.target.stopPropagation() 无作用
message.success('Marker clicked!')
}}
>

杭州



);
```

### 💻 Link to minimal reproduction

Please provide a link by forking these links [L7 Draw](https://codesandbox.io/s/l7draw-issue-template-df75t7) or GitHub repo. What is a minimal reproduction, and why is it required?

### 🏞 Expected result

### 🚑 Any additional [like screenshots]

- **L7Draw Version**:
- **Platform**:

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Marker onClick handler and the draw-enabled interaction described in the issue. Check how click events are propagated between Marker and the map, then verify the expected behavior in the supplied LarkMap example; done means marker clicks no longer interfere with drawing while marker handling remains defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.