diff options
author | Aeva Ntsc <aeva.ntsc@gmail.com> | 2012-10-15 10:10:04 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2012-12-03 14:40:47 -0600 |
commit | 171dcbe3a80e13f4114a969f271dae1a1a5b3d7e (patch) | |
tree | 3bb9f8093271fda461735119c4fdbe23b4c7b676 /mediagoblin/static/js/thingiview.js | |
parent | 76918e52e078a1b313ce650b4b11e4178dfa8453 (diff) | |
download | mediagoblin-171dcbe3a80e13f4114a969f271dae1a1a5b3d7e.tar.lz mediagoblin-171dcbe3a80e13f4114a969f271dae1a1a5b3d7e.tar.xz mediagoblin-171dcbe3a80e13f4114a969f271dae1a1a5b3d7e.zip |
disabled auto rotate
Diffstat (limited to 'mediagoblin/static/js/thingiview.js')
-rw-r--r-- | mediagoblin/static/js/thingiview.js/thingiview.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/mediagoblin/static/js/thingiview.js/thingiview.js b/mediagoblin/static/js/thingiview.js/thingiview.js index 71511eb2..5eb30335 100644 --- a/mediagoblin/static/js/thingiview.js/thingiview.js +++ b/mediagoblin/static/js/thingiview.js/thingiview.js @@ -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") { |