Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Needed to reset the preso. #158

Open
wants to merge 1 commit into from

4 participants

@kschroeder

Needed the ability to restart and reset the animation. Don't know if this is the best way, but it worked for me.

@Tanner963

How it works? Because when I changed impress.js in my presentation and "reseted it" with

impress('impress', 1).init();

viewport of my browser moved right and bottom.
http://img543.imageshack.us/img543/5346/przechwytywanieeu.png

How it works? Because when I changed impress.js in my presentation and "reseted it" with

impress('impress', 1).init();

viewport of my browser moved right and bottom.
http://img543.imageshack.us/img543/5346/przechwytywanieeu.png

@kyleshay

How does this differ from calling impress().goto(0)?

For individual slides, you can reset each animation using #divname.past.present and .future

@kschroeder

It allowed me to dynamically change the presentation whereas these don't seem to do that.

@ariefbayu

hi, is there any update to this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 14, 2012
  1. @kschroeder

    Needed the ability to restart and reset the animation. Don't know if …

    kschroeder authored
    …this is the best way, but it worked for me.
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +4 −1 js/impress.js
View
5 js/impress.js
@@ -217,7 +217,7 @@
// It's the core `impress` function that returns the impress.js API
// for a presentation based on the element with given id ('impress'
// by default).
- var impress = window.impress = function ( rootId ) {
+ var impress = window.impress = function ( rootId, reset ) {
// If impress.js is not supported by the browser return a dummy API
// it may not be a perfect solution but we return early and avoid
@@ -231,6 +231,9 @@
};
}
+ if (reset) {
+ roots = {};
+ }
rootId = rootId || "impress";
// if given root is already initialized just return the API
Something went wrong with that request. Please try again.