aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Szopka <bartek.szopka+github@gmail.com>2012-01-20 16:06:23 +0100
committerBartek Szopka <bartek.szopka+github@gmail.com>2012-01-20 16:06:23 +0100
commitbb0113e5be76fabde364363e2e6a72784b641dfe (patch)
treebc8cbc383ba22524761c0e0f7c54492248ee198e
parent5fc00a1cf637ea9e82f9d4bfc6d89b84addd6b3a (diff)
downloadimpress.js-bb0113e5be76fabde364363e2e6a72784b641dfe.tar.gz
disabled animation on the beggining of the presentation
applied fix as shown in pull request #30 (that couldn't be merged automatically)
-rw-r--r--js/impress.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/js/impress.js b/js/impress.js
index 8edcad0..231609d 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")
});