disabled animation on the beggining of the presentation
applied fix as shown in pull request #30 (that couldn't be merged automatically)
This commit is contained in:
@@ -127,7 +127,7 @@
|
|||||||
var props = {
|
var props = {
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
transformOrigin: "top left",
|
transformOrigin: "top left",
|
||||||
transition: "all 1s ease-in-out",
|
transition: "all 0s ease-in-out",
|
||||||
transformStyle: "preserve-3d"
|
transformStyle: "preserve-3d"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,18 +232,25 @@
|
|||||||
scale: 1 / parseFloat(step.scale)
|
scale: 1 / parseFloat(step.scale)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// check if the transition is zooming in or not
|
||||||
var zoomin = target.scale >= current.scale;
|
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, {
|
css(impress, {
|
||||||
// to keep the perspective look similar for different scales
|
// to keep the perspective look similar for different scales
|
||||||
// we need to 'scale' the perspective, too
|
// we need to 'scale' the perspective, too
|
||||||
perspective: step.scale * 1000 + "px",
|
perspective: step.scale * 1000 + "px",
|
||||||
transform: scale(target.scale),
|
transform: scale(target.scale),
|
||||||
|
transitionDuration: duration,
|
||||||
transitionDelay: (zoomin ? "500ms" : "0ms")
|
transitionDelay: (zoomin ? "500ms" : "0ms")
|
||||||
});
|
});
|
||||||
|
|
||||||
css(canvas, {
|
css(canvas, {
|
||||||
transform: rotate(target.rotate, true) + translate(target.translate),
|
transform: rotate(target.rotate, true) + translate(target.translate),
|
||||||
|
transitionDuration: duration,
|
||||||
transitionDelay: (zoomin ? "0ms" : "500ms")
|
transitionDelay: (zoomin ? "0ms" : "500ms")
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user