Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [BUG] 关闭圆绘制时导致mapbox的双击放大打开 #152

Open
glimpse-0201 opened this issue Nov 7, 2023 · 3 comments
Open

Comments

@glimpse-0201
Copy link

🐛 Bug description [Please make everyone to understand it]

📷 Step to reproduce

// 控制台调用
window._circle.disable()

🏞 Expected result

正常关闭圆形绘制或无任何反馈

🚑 Any additional [like screenshots]

当我调用此方法会导致mapbox的双击方法开启
image

  • L7Draw Version: "@antv/l7-draw": "^3.0.34",
  • Platform: macos(14.1 (23B74)), chrome(118.0.5993.117)
@heiyexing
Copy link
Contributor

未复现,请提供更详细的复现流程

@glimpse-0201
Copy link
Author

未复现,请提供更详细的复现流程

在我提供的那个例子中打开控制台输入window._scene.map.doubleClickZoom 查看_clickZoom._enabled初始的状态是false也就是地图禁用了双击放大的功能的,当我调用window._circle.disable()这个方法就是禁用图形绘制后再次观察_clickZoom._enabled会发现他被开启了,这个时候双击缩放地图的功能被打开,我给的例子里面没有引入地图所以看不到,只能通过查看_clickZoom._enabled的值

@glimpse-0201
Copy link
Author

未复现,请提供更详细的复现流程

我找到了他的错误原因当我调用disable时他没有去判断原始的状态而是直接将双击放大打开了
image
image
他在这里
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants