disabled auto rotate
authorAeva Ntsc <aeva.ntsc@gmail.com>
Mon, 15 Oct 2012 15:10:04 +0000 (10:10 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 3 Dec 2012 20:40:47 +0000 (14:40 -0600)
mediagoblin/static/js/thingiview.js/thingiview.js

index 71511eb2595ada645be194794cf6c9f8b0e5993f..5eb30335e6148cb4df109ae3f77d5ba49987bc6d 100644 (file)
@@ -391,6 +391,13 @@ Thingiview = function(containerId) {
     return rotateTimer !== null;
   }
 
+  this.resetRotation = function () {
+      if (rotate) {
+          this.setRotation(false);
+          this.setRotation(true);
+      }
+  }
+
   this.setRotation = function(rotate) {
     rotation = rotate;
     
@@ -606,8 +613,7 @@ Thingiview = function(containerId) {
     log("loading array...");
     geometry = new STLGeometry(array);
     loadObjectGeometry();
-    scope.setRotation(false);
-    scope.setRotation(true);
+    scope.resetRotation();
     scope.centerCamera();
     log("finished loading " + geometry.faces.length + " faces.");
   }
@@ -626,8 +632,7 @@ Thingiview = function(containerId) {
         progressBar.innerHTML = '';
         progressBar.style.display = 'none';
 
-        scope.setRotation(false);
-        scope.setRotation(true);
+        scope.resetRotation();
         log("finished loading " + geometry.faces.length + " faces.");
         scope.centerCamera();
       } else if (event.data.status == "complete_points") {
@@ -657,8 +662,7 @@ Thingiview = function(containerId) {
         progressBar.innerHTML = '';
         progressBar.style.display = 'none';
 
-        scope.setRotation(false);
-        scope.setRotation(true);
+        scope.resetRotation();
         log("finished loading " + event.data.content[0].length + " points.");
         // scope.centerCamera();
       } else if (event.data.status == "progress") {