Permalink
Browse files

Merge remote-tracking branch 'refs/remotes/origin/dev' into gh-pages

2 parents ff1001e + 6917848 commit e32bff948184cf21ae38e800d14dce719bad206e @lautr3k committed Mar 31, 2016
Showing with 24 additions and 24 deletions.
  1. +24 −24 js/main.js
View
@@ -718,31 +718,31 @@ function updateTransformValues() {
var current = transformations[transformAction]; var current = transformations[transformAction];
var uniform = $('#transform input[type=radio]:checked').val() == 'yes'; var uniform = $('#transform input[type=radio]:checked').val() == 'yes';
- if (uniform) { + if (transformAction == 'scale') {
- if (input.x != current.x) { + if (uniform) {
- var ratio = current.x / input.x; + if (input.x != current.x) {
- input.y = (current.y / ratio).toFixed(2); + var ratio = current.x / input.x;
- input.z = (current.z / ratio).toFixed(2); + input.y = (current.y / ratio).toFixed(2);
- $transformY.val(input.y); + input.z = (current.z / ratio).toFixed(2);
- $transformZ.val(input.z); + $transformY.val(input.y);
- } + $transformZ.val(input.z);
- else if (input.y != current.y) { + }
- var ratio = current.y / input.y; + else if (input.y != current.y) {
- input.x = (current.x / ratio).toFixed(2); + var ratio = current.y / input.y;
- input.z = (current.z / ratio).toFixed(2); + input.x = (current.x / ratio).toFixed(2);
- $transformX.val(input.x); + input.z = (current.z / ratio).toFixed(2);
- $transformZ.val(input.z); + $transformX.val(input.x);
- } + $transformZ.val(input.z);
- else if (input.z != current.z) { + }
- var ratio = current.z / input.z; + else if (input.z != current.z) {
- input.x = (current.x / ratio).toFixed(2); + var ratio = current.z / input.z;
- input.y = (current.y / ratio).toFixed(2); + input.x = (current.x / ratio).toFixed(2);
- $transformX.val(input.x); + input.y = (current.y / ratio).toFixed(2);
- $transformY.val(input.y); + $transformX.val(input.x);
+ $transformY.val(input.y);
+ }
} }
- }
- if (transformAction == 'scale') {
input.x <= 0 && (input.x = 1); input.x <= 0 && (input.x = 1);
input.y <= 0 && (input.y = 1); input.y <= 0 && (input.y = 1);
input.z <= 0 && (input.z = 1); input.z <= 0 && (input.z = 1);
@@ -855,7 +855,7 @@ loader.onError = errorHandler;
var stl = 'stl/StressTest.stl'; var stl = 'stl/StressTest.stl';
// File url // File url
-var url = 'https://' + window.location.hostname + window.location.pathname + stl; +var url = 'http://' + window.location.hostname + window.location.pathname + stl;
// Create http request object // Create http request object
var xmlhttp = new XMLHttpRequest(); var xmlhttp = new XMLHttpRequest();

0 comments on commit e32bff9

Please sign in to comment.