From b0faf1b5c480b992cc0778eb7592d8cd578ec4d8 Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Mon, 9 Mar 2015 02:52:18 -0400 Subject: [PATCH] fixes --- js/fea/DmaBeam.js | 1 + js/fea/DmaCell.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/js/fea/DmaBeam.js b/js/fea/DmaBeam.js index ebe433b1..c1a0ecd2 100644 --- a/js/fea/DmaBeam.js +++ b/js/fea/DmaBeam.js @@ -31,6 +31,7 @@ DmaBeam.prototype._buildBeamMesh = function(){ var position = this.nodes[0].getPosition(); position.sub(this.nodes[1].getPosition()); position.multiplyScalar(0.5); + position.add(this.parentCell.getPosition()); mesh.position.set(position.x, position.y, position.z); var scale = this.parentCell.getScale(); mesh.scale.set(scale, scale, scale); diff --git a/js/fea/DmaCell.js b/js/fea/DmaCell.js index dda72d77..556e05e1 100644 --- a/js/fea/DmaCell.js +++ b/js/fea/DmaCell.js @@ -32,7 +32,7 @@ DMACell.prototype.drawForMode = function(scale, cellMode, inverseMode, beamMode) if (part) part.setVisibility(cellMode == "part" && !beamMode); }); _.each(this.beams, function(beam){ - beam.setVisibility(beamMode); + beam.setVisibility(beamMode && cellMode == "part"); }); }; -- GitLab