refactor: layer proxy mutation
This commit is contained in:
parent
9f33e4df8a
commit
532792595a
|
@ -13,6 +13,13 @@ class LayerProxy {
|
|||
get area() {
|
||||
return this.layer.area;
|
||||
}
|
||||
clone() {
|
||||
const {$$sourceJson} = this.instance.$$layersProxies[this.index];
|
||||
const proxy = new LayerProxy(this.instance, this.Component, this.index);
|
||||
proxy.$$sourceJson = $$sourceJson;
|
||||
return proxy;
|
||||
|
||||
}
|
||||
get data() {
|
||||
return this.layer.data;
|
||||
}
|
||||
|
@ -130,8 +137,7 @@ export default class TileLayers extends Component {
|
|||
layers[layerIndex].data[calculated] = tile;
|
||||
}
|
||||
layers[layerIndex] = {...layers[layerIndex]};
|
||||
component.$$layersProxies[layerIndex] = new LayerProxy(component, this, layerIndex);
|
||||
await component.$$layersProxies[layerIndex].load();
|
||||
component.$$layersProxies[layerIndex] = component.$$layersProxies[layerIndex].clone();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user