|
|
@@ -403,12 +403,17 @@ class Panorama extends THREE.EventDispatcher{
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
+ dispose(){
|
|
|
+ this.dispatchEvent('dispose')
|
|
|
+ this.marker.parent.remove(this.marker);
|
|
|
+ this.label && this.label.parent.remove(this.label);
|
|
|
+ this.label2 && this.label2.parent.remove(this.label2);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
addLabel(){
|
|
|
- this.removeTextLabel()
|
|
|
+ this.label && this.label.parent.remove(this.label);
|
|
|
this.label = new TextSprite(Object.assign({},
|
|
|
labelProp, {text: this.id + "("+this.originID+")"}) //{text: `id:${this.id}, dataset:${this.pointcloud.name}, 4dkkId:${this.originID}`}
|
|
|
);
|
|
|
@@ -429,11 +434,6 @@ class Panorama extends THREE.EventDispatcher{
|
|
|
}
|
|
|
|
|
|
|
|
|
- removeTextLabel(){
|
|
|
- if(this.label){
|
|
|
- this.label.parent.remove(this.label);
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
|
|
|
|