Skip to content

Commit

Permalink
disabled animation on the beggining of the presentation
Browse files Browse the repository at this point in the history
applied fix as shown in pull request #30 (that couldn't be merged automatically)
  • Loading branch information
bartaz committed Jan 20, 2012
1 parent 5fc00a1 commit bb0113e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion js/impress.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down Expand Up @@ -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")
});

Expand Down

0 comments on commit bb0113e

Please sign in to comment.