mirror of https://gitee.com/antv-l7/antv-l7
Merge pull request #418 from antvis/fix-source
fix(source): 获取选中数据数据被修改的bug
This commit is contained in:
commit
4f49a88470
|
@ -128,13 +128,14 @@ export default class Source extends EventEmitter {
|
|||
id < this.originData.features.length
|
||||
? this.originData.features[id]
|
||||
: 'null';
|
||||
const newFeature = cloneDeep(feature);
|
||||
if (this.transforms.length !== 0) {
|
||||
const item = this.data.dataArray.find((dataItem: IParseDataItem) => {
|
||||
return dataItem._id === id;
|
||||
});
|
||||
feature.properties = item;
|
||||
newFeature.properties = item;
|
||||
}
|
||||
return feature;
|
||||
return newFeature;
|
||||
} else {
|
||||
return id < this.data.dataArray.length ? this.data.dataArray[id] : 'null';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue