Skip to content
Snippets Groups Projects
Commit 619c8b21 authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

fixed super cell highlighter defaults

parent f9850a29
No related branches found
No related tags found
No related merge requests found
......@@ -37,12 +37,15 @@ define(['underscore', 'backbone', 'threeModel', 'appState', 'lattice', 'cell', '
},
_setRotation: function(direction){
if (!this.highlightedObject) return;
var index = this.highlightedObject.getAbsoluteIndex();
if ((index.z%2 == 0 && Math.abs(direction.z) > 0.9) || (index.z%2 != 0 && Math.abs(direction.z) < 0.1))
this.mesh.rotation.set(0, 0, Math.PI/2);
else this.mesh.rotation.set(0,0,0);
if (lattice.connectionType == "gik"){
if (!this.highlightedObject) return;
var index = this.highlightedObject.getAbsoluteIndex();
if ((index.z%2 == 0 && Math.abs(direction.z) > 0.9) || (index.z%2 != 0 && Math.abs(direction.z) < 0.1))
this.mesh.rotation.set(0, 0, Math.PI/2);
else this.mesh.rotation.set(0,0,0);
}
var superCellIndex = appState.get("superCellIndex");
this.mesh.translateX(-(superCellIndex.x + 0.5 - this.mesh.scale.x/2)*lattice.xScale());
......
......@@ -195,7 +195,6 @@ define(['underscore', 'backbone', 'threeModel', 'three', 'plist'], function(_, B
}
break;
case 87://w - increase supercell index
console.log(this.get("superCellIndex"));
if (state) this.set("superCellIndex", this._incrementSuperCellIndex("x", this.get("superCellIndex").clone()));
break;
case 81://q - decrease supercell index
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment