diff --git a/js/fea/DmaCell.js b/js/fea/DmaCell.js index 8e2ae2a1bb12cd00a34aecf7f1ee99da94254ed6..709d0ff693fb13d29965be4adea1165659bac240 100644 --- a/js/fea/DmaCell.js +++ b/js/fea/DmaCell.js @@ -76,6 +76,8 @@ DMACell.prototype.updateForScale = function(scale, cellMode, partType){ this._setMeshPosition(this.cellMesh, position); this.cellMesh.scale.set(scale, scale, scale);//must do this so highlighting works properly in part mode + if (this.superCell && this.superCellIndex == 0) this.superCell.setScale(scale); + //only update visible object to scale if (!cellMode) cellMode = dmaGlobals.appState.get("cellMode"); if (!partType) partType = dmaGlobals.lattice.get("partType"); @@ -249,6 +251,9 @@ DMACell.prototype.destroy = function(){ this.indices = null; this.nodes = null; this.beams = null; + this.superCell = null; + this.superCellIndex = null; + this.superCellLength = null; }; DMACell.prototype.toJSON = function(){ diff --git a/js/fea/DmaCellOther.js b/js/fea/DmaCellOther.js index adcd7cae4950ed8a55278bf8f7bae826aae3a273..44c56035f75222cd395fc49c5bcc4f2851899d79 100644 --- a/js/fea/DmaCellOther.js +++ b/js/fea/DmaCellOther.js @@ -78,6 +78,7 @@ var cellMaterial = [new THREE.MeshNormalMaterial()]; }; DMAGIKCell.prototype.setSuperCell = function(superCell, index, length){ + this.superCell = superCell; this.superCellIndex = index; this.superCellLength = length; };