Commit c9edfee6 authored by legoc's avatar legoc
Browse files

Delete line by removing from parent

parent f01f38db
......@@ -137,6 +137,8 @@ class EnergyLine extends TrajectoryLine {
* Remove this trajectory properly.
*/
destroy() {
this._parent.remove(this._group);
this._line.destroy();
for (let d of this._deltaSphereGroup.children) {
......
......@@ -128,11 +128,12 @@ class HKLLine extends TrajectoryLine {
* Remove this trajectory properly.
*/
destroy() {
this._parent.remove(this._group);
this._lineSphereGeometry.dispose();
this._lineMaterial.dispose();
this._sphereGeometry.dispose();
this._sphereMaterial.dispose();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment