diff --git a/js/cells/supercells/DMASuperCell.js b/js/cells/supercells/DMASuperCell.js index 7572fa303d92ed3fa11fa8153b02b896c638d32f..c75708fa0f106870457093e5800f213cb6ac12e7 100644 --- a/js/cells/supercells/DMASuperCell.js +++ b/js/cells/supercells/DMASuperCell.js @@ -15,7 +15,7 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'cell'], var material = this.getMaterial(); var range = appState.get("superCellRange"); - if (material.cellsMax) (new THREE.Vector3(1,1,1)).add(material.cellsMax).sub(material.cellsMin); + if (material.cellsMax) range = (new THREE.Vector3(1,1,1)).add(material.cellsMax).sub(material.cellsMin); this.cells = this._makeChildCells(range, material); DMACell.prototype.setMode.call(this, null, function(){