Skip to content

使用绘制组件添加的图形,如何在点击时获取到绘制的数据或者图形对象 #177

Answered by zouyaoji
webdq asked this question in Q&A
Discussion options

You must be logged in to vote

下个版本 可以用 vc-selection-indicator 的 pickEvt 事件 或者 自己针对要编辑的绘制实例传事件进去。

在事件中获取索引的方式
e.pickedFeature.primitive._vcPolylineIndex || e.pickedFeature.primitive._vcParent._vcPolylineIndex

拿到索引后去对应的renderDatas里面去改就OK了

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@webdq
Comment options

@zouyaoji
Comment options

@webdq
Comment options

@zouyaoji
Comment options

Answer selected by webdq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants