diff --git a/js/API/LatticeAPI.js b/js/API/LatticeAPI.js index c274a65d15cea3b1b69d8356ea6e7b4b1abc8ad9..ff9b219e2f210e6e732711f5e0ef3a1339340d60 100644 --- a/js/API/LatticeAPI.js +++ b/js/API/LatticeAPI.js @@ -10,8 +10,7 @@ define(['lattice', 'plist'], function(lattice, plist){ //getters getSize: function(){ - var bBox = lattice.calculateBoundingBox(); - return bBox.max.sub(bBox.min); + return lattice.getSize(); }, getBoundingBox: function(){ @@ -19,23 +18,23 @@ define(['lattice', 'plist'], function(lattice, plist){ }, getAspectRatio: function(){ - return lattice.get("aspectRatio").clone(); + return lattice.getAspectRatio(); }, getCellType: function(){ - return lattice.get("cellType"); + return lattice.getCellType(); }, getConnectionType: function(){ - return lattice.get("connectionType"); + return lattice.getConnectionType(); }, getApplicationType: function(){ - return lattice.get("applicationType"); + return lattice.getApplicationType(); }, getPartType: function(){ - return lattice.get("partType"); + return lattice.getPartType(); }, diff --git a/js/lattice/LatticeBase.js b/js/lattice/LatticeBase.js index 757fc4e4803750de2b737554c6f930f6d74e8156..bf91f278ed540c9213b95a665e2c8703d66dc413 100644 --- a/js/lattice/LatticeBase.js +++ b/js/lattice/LatticeBase.js @@ -34,6 +34,38 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre + //getters + + getSize: function(){ + var bBox = this.calculateBoundingBox(); + return bBox.max.sub(bBox.min).add(new THREE.Vector3(1,1,1)); + }, + + getBoundingBox: function(){ + return this.calculateBoundingBox(); + }, + + getAspectRatio: function(){ + return this.get("aspectRatio").clone(); + }, + + getCellType: function(){ + return this.get("cellType"); + }, + + getConnectionType: function(){ + return this.get("connectionType"); + }, + + getApplicationType: function(){ + return this.get("applicationType"); + }, + + getPartType: function(){ + return this.get("partType"); + }, + + //setters