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

maptalks.ui.UIMarker is Geometry or Control #619

Closed
deyihu opened this issue Feb 25, 2018 · 2 comments
Closed

maptalks.ui.UIMarker is Geometry or Control #619

deyihu opened this issue Feb 25, 2018 · 2 comments

Comments

@deyihu
Copy link
Collaborator

deyihu commented Feb 25, 2018

maptalks's version and what browser you use?
如果利用 UIMarker 自定义一个 marker ,UIMarker 会遮住map的鼠标事件(缩放,拖拽等),如果把 UIMarker 归为UI(Control)组件这个我可以理解,如果把UIMarker 归为Geometry (Marker/Point) ,其不应该影响map的操作;

我以为是 options 里 eventsToStop 设置成true的,好像不是的;

leafletjs 里也可以将dom做为 marker的icon的,其不会影响map的操作

http://maptalks.org/examples/en/style/html-marker/#style_html-marker

Issue description

Please provide a reproduction URL (on any jsfiddle like site)

@fuzhenn
Copy link
Member

fuzhenn commented Feb 25, 2018

目前UI和Control上的事件都会被map忽略掉

不过你说的有道理,UIMarker比较特殊,直觉上应该让事件传递给map

我会比较一下各种情况,看看能否放开

@fuzhenn
Copy link
Member

fuzhenn commented Feb 25, 2018

在UIComponent增加了eventsPropagation选项,用来设置是否阻止事件冒泡
UIMarker的eventsPropagation默认设置为true,即能让事件传递给map

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

No branches or pull requests

2 participants