|
@@ -574,11 +574,11 @@ export default class Player {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- deleteItemByType(type, pos) {
|
|
|
+ deleteItemByType(type, data) {
|
|
|
if (type === 1) {
|
|
|
const index = this.renderMarkers.findIndex((mk) => {
|
|
|
const p = new THREE.Vector3().fromArray(mk.point);
|
|
|
- const v = new THREE.Vector3().fromArray(pos);
|
|
|
+ const v = new THREE.Vector3().fromArray(data);
|
|
|
return p.equals(v);
|
|
|
});
|
|
|
this.renderMarkers.splice(index, 1);
|
|
@@ -588,12 +588,16 @@ export default class Player {
|
|
|
if (type === 3) {
|
|
|
const index = this.renderSymbols.findIndex((syb) => {
|
|
|
const p = new THREE.Vector3().fromArray(syb.point);
|
|
|
- const v = new THREE.Vector3().fromArray(pos);
|
|
|
+ const v = new THREE.Vector3().fromArray(data);
|
|
|
return p.equals(v);
|
|
|
});
|
|
|
this.renderSymbols.splice(index, 1);
|
|
|
}
|
|
|
if (type === 4) {
|
|
|
+ const { id } = data;
|
|
|
+ const index = this.renderTexts.findIndex((item) => item.id === id);
|
|
|
+ debugger;
|
|
|
+ this.renderTexts.splice(index, 1);
|
|
|
}
|
|
|
}
|
|
|
editing(item) {
|