Commit 164a1f02 authored by legoc's avatar legoc
Browse files

Moved sphere position change in HKLLine

parent ac4c054e
...@@ -45,10 +45,6 @@ class HKLLine extends TrajectoryLine { ...@@ -45,10 +45,6 @@ class HKLLine extends TrajectoryLine {
* Update line position and delta spheres. * Update line position and delta spheres.
*/ */
updateLine() { updateLine() {
// First copy the start and end position if they changed.
this._startSphere.position.copy(this._start.clone());
this._endSphere.position.copy(this._end.clone());
// Define the iterator. // Define the iterator.
let iterator = null; let iterator = null;
...@@ -77,6 +73,10 @@ class HKLLine extends TrajectoryLine { ...@@ -77,6 +73,10 @@ class HKLLine extends TrajectoryLine {
this._deltaSphereGroup.remove(this._deltaSphereGroup.children[i]); this._deltaSphereGroup.remove(this._deltaSphereGroup.children[i]);
} }
// Copy the start and end position if they changed.
this._startSphere.position.copy(this._start.clone());
this._endSphere.position.copy(this._end.clone());
// Define the previous point for the line segments. // Define the previous point for the line segments.
let previousPoint = null; let previousPoint = null;
......
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