Permalink
Browse files

fix #2

  • Loading branch information...
1 parent d744ac6 commit 6917848e7acb49a81b08ea67984d0fc4380804b2 @lautr3k committed Mar 31, 2016
Showing with 23 additions and 23 deletions.
  1. +23 −23 js/main.js
View
@@ -718,31 +718,31 @@ function updateTransformValues() {
var current = transformations[transformAction];
var uniform = $('#transform input[type=radio]:checked').val() == 'yes';
- if (uniform) {
- if (input.x != current.x) {
- var ratio = current.x / input.x;
- input.y = (current.y / ratio).toFixed(2);
- input.z = (current.z / ratio).toFixed(2);
- $transformY.val(input.y);
- $transformZ.val(input.z);
- }
- else if (input.y != current.y) {
- var ratio = current.y / input.y;
- input.x = (current.x / ratio).toFixed(2);
- input.z = (current.z / ratio).toFixed(2);
- $transformX.val(input.x);
- $transformZ.val(input.z);
- }
- else if (input.z != current.z) {
- var ratio = current.z / input.z;
- input.x = (current.x / ratio).toFixed(2);
- input.y = (current.y / ratio).toFixed(2);
- $transformX.val(input.x);
- $transformY.val(input.y);
+ if (transformAction == 'scale') {
+ if (uniform) {
+ if (input.x != current.x) {
+ var ratio = current.x / input.x;
+ input.y = (current.y / ratio).toFixed(2);
+ input.z = (current.z / ratio).toFixed(2);
+ $transformY.val(input.y);
+ $transformZ.val(input.z);
+ }
+ else if (input.y != current.y) {
+ var ratio = current.y / input.y;
+ input.x = (current.x / ratio).toFixed(2);
+ input.z = (current.z / ratio).toFixed(2);
+ $transformX.val(input.x);
+ $transformZ.val(input.z);
+ }
+ else if (input.z != current.z) {
+ var ratio = current.z / input.z;
+ input.x = (current.x / ratio).toFixed(2);
+ input.y = (current.y / ratio).toFixed(2);
+ $transformX.val(input.x);
+ $transformY.val(input.y);
+ }
}
- }
- if (transformAction == 'scale') {
input.x <= 0 && (input.x = 1);
input.y <= 0 && (input.y = 1);
input.z <= 0 && (input.z = 1);

0 comments on commit 6917848

Please sign in to comment.