From bb0113e5be76fabde364363e2e6a72784b641dfe Mon Sep 17 00:00:00 2001 From: Bartek Szopka Date: Fri, 20 Jan 2012 16:06:23 +0100 Subject: [PATCH] disabled animation on the beggining of the presentation applied fix as shown in pull request #30 (that couldn't be merged automatically) --- js/impress.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/impress.js b/js/impress.js index 8edcad024..231609d87 100644 --- a/js/impress.js +++ b/js/impress.js @@ -127,7 +127,7 @@ var props = { position: "absolute", transformOrigin: "top left", - transition: "all 1s ease-in-out", + transition: "all 0s ease-in-out", transformStyle: "preserve-3d" } @@ -232,18 +232,25 @@ scale: 1 / parseFloat(step.scale) }; + // check if the transition is zooming in or not var zoomin = target.scale >= current.scale; + // if presentation starts (nothing is active yet) + // don't animate (set duration to 0) + var duration = (active) ? "1s" : "0"; + css(impress, { // to keep the perspective look similar for different scales // we need to 'scale' the perspective, too perspective: step.scale * 1000 + "px", transform: scale(target.scale), + transitionDuration: duration, transitionDelay: (zoomin ? "500ms" : "0ms") }); css(canvas, { transform: rotate(target.rotate, true) + translate(target.translate), + transitionDuration: duration, transitionDelay: (zoomin ? "0ms" : "500ms") });