diff options
author | Bartek Szopka <bartek.szopka+github@gmail.com> | 2012-01-12 21:50:21 +0100 |
---|---|---|
committer | Bartek Szopka <bartek.szopka+github@gmail.com> | 2012-01-12 21:50:21 +0100 |
commit | 995c47248878e1822f80df723a49b36f17741e87 (patch) | |
tree | 53b7ae7a4cdfe0006c283607908e64903b70ad75 | |
parent | 8cd464a92660b311d9d40894f0b43b2ef191e0a1 (diff) | |
download | impress.js-995c47248878e1822f80df723a49b36f17741e87.tar.gz |
am I removing features? yes, it was a bad idea after all and I really hope that noone will notice ;)
-rw-r--r-- | js/impress.js | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/js/impress.js b/js/impress.js index 913504c..f817ecc 100644 --- a/js/impress.js +++ b/js/impress.js @@ -84,7 +84,7 @@ }; var scale = function ( s ) { - return " scaleX(" + s.x + ") scaleY(" + s.y + ") scaleZ(" + s.z + ") "; + return " scale(" + s + ") "; } // CHECK SUPPORT @@ -142,7 +142,7 @@ var current = { translate: { x: 0, y: 0, z: 0 }, rotate: { x: 0, y: 0, z: 0 }, - scale: { x: 1, y: 1, z: 1 } + scale: 1 }; steps.forEach(function ( el, idx ) { @@ -158,11 +158,7 @@ y: data.rotateY || 0, z: data.rotateZ || data.rotate || 0 }, - scale: { - x: data.scaleX || data.scale || 1, - y: data.scaleY || data.scale || 1, - z: data.scaleZ || 1 - } + scale: data.scale || 1 }; el.stepData = step; @@ -228,24 +224,20 @@ y: -parseInt(step.rotate.y, 10), z: -parseInt(step.rotate.z, 10) }, - scale: { - x: 1 / parseFloat(step.scale.x), - y: 1 / parseFloat(step.scale.y), - z: 1 / parseFloat(step.scale.z) - }, translate: { x: -step.translate.x, y: -step.translate.y, z: -step.translate.z - } + }, + scale: 1 / parseFloat(step.scale) }; - var zoomin = target.scale.x >= current.scale.x; + var zoomin = target.scale >= current.scale; css(impress, { // to keep the perspective look similar for different scales // we need to 'scale' the perspective, too - perspective: step.scale.x * 1000 + "px", + perspective: step.scale * 1000 + "px", transform: scale(target.scale), transitionDelay: (zoomin ? "500ms" : "0ms") }); |