Commit 320f600a authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

error from stock highlighting

parent 1ce7abbb
......@@ -21,7 +21,7 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'globals', '
if (this.superCell) this.superCell.addChildren(this.object3D);//add as child of supercell
if (this.index){//todo gik supcells in stock have index but no highlight
if (this.getAbsoluteIndex()){
if (!this.cells) lattice.getUItarget().addHighlightableCell(this.object3D.children[0]);//add mesh as highlightable object, only for lowest level of hierarchy
if (!superCell || superCell === undefined) three.sceneAdd(this.object3D);//add object3d as child of scene if top level of hierarchy
} else this.hide();//stock cell
......@@ -102,7 +102,9 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'globals', '
return null;
if (!this.superCell) return this.getIndex();
return this.superCell.getAbsoluteIndex().add(this.superCell.applyRotation(this.getIndex()).round());
var superCellIndex = this.superCell.getAbsoluteIndex();
if (!superCellIndex) return null;
return superCellIndex.add(this.superCell.applyRotation(this.getIndex()).round());
DMACell.prototype.getPosition = function(){
Supports Markdown
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