Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added reset function #402

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Added reset function #402

wants to merge 2 commits into from

Conversation

vedmack
Copy link

@vedmack vedmack commented May 9, 2013

call reset function before populating timeline with new data (before calling my_timeline_obj.init(my_timeline_config);)

call reset function before populating timeline with new data (before calling my_timeline_obj.init(my_timeline_config);)

example 

make global:
var timeline_config, storyjs_embedjs;

//in your init function :
if (storyjs_embedjs === undefined) {
    storyjs_embedjs = new VMM.Timeline('my-timeline', '100%', '100%');
    storyjs_embedjs.init(timeline_config);
} else {
    storyjs_embedjs.reset();
    storyjs_embedjs.init(timeline_config);
}
better comment
@vedmack
Copy link
Author

vedmack commented May 9, 2013

b.t.w its the code that was posted by Keven Lefebvre in this thread : https://groups.google.com/forum/#!msg/verite-timeline/lMSKOYXybg4/txsqs79hCS8J

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant