Skip to content
Snippets Groups Projects
Commit b150463c authored by legoc's avatar legoc
Browse files

Merge branch 'master' into energy-display

parents 4677ec8c 54d898b5
Branches
No related tags found
No related merge requests found
...@@ -25,6 +25,7 @@ class TrajectoryView3D extends View3D { ...@@ -25,6 +25,7 @@ class TrajectoryView3D extends View3D {
// Create a fake trajectory line to visualize. // Create a fake trajectory line to visualize.
this._visualLine = new TrajectoryLine(this._type, this._scene, new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3(), 11, matrix.bMatrix); this._visualLine = new TrajectoryLine(this._type, this._scene, new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3(), 11, matrix.bMatrix);
this._visualLine.setVisibility(false); this._visualLine.setVisibility(false);
this._drawLine = false;
dragControls.addEventListener('dragstart', (event) => { dragControls.addEventListener('dragstart', (event) => {
...@@ -73,8 +74,10 @@ class TrajectoryView3D extends View3D { ...@@ -73,8 +74,10 @@ class TrajectoryView3D extends View3D {
dragControls.addEventListener('drag', (event) => { dragControls.addEventListener('drag', (event) => {
// Use the point from the scattering view. if (this._drawLine) {
this._visualLine.end = this.getPoint(this._type); // Use the point from the scattering view.
this._visualLine.end = this.getPoint(this._type);
}
}); });
document.addEventListener('mousedown', (event) => { document.addEventListener('mousedown', (event) => {
...@@ -88,6 +91,10 @@ class TrajectoryView3D extends View3D { ...@@ -88,6 +91,10 @@ class TrajectoryView3D extends View3D {
this._visualLine.start = this._visualStart; this._visualLine.start = this._visualStart;
this._visualLine.end = this._visualStart; this._visualLine.end = this._visualStart;
this._visualLine.setVisibility(true); this._visualLine.setVisibility(true);
this._drawLine = true;
}
else {
this._drawLine = false;
} }
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment