Browse Source

Prevents crashes...

I'm owrking on creating simple data filters for my timeline JS implementation.  so far it's been pretty easy I'm just filtering the data on my page and calling the reload method.  However, if you use the reload function and are on a slide the current slide will get jacked up and cause a crash.  This prevents the crash.
pull/736/head
Joe Motacek 10 years ago
parent
commit
2ffa4ef324
  1. 4
      build/js/timeline.js

4
build/js/timeline.js

@ -5265,6 +5265,10 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') {
VMM.Lib.width($slides_items, (slides.length * config.slider.content.width));
if(typeof current_slide == "undefined"){
current_slide = 0;
}
if (_from_start) {
VMM.Lib.css($slider_container, "left", slides[current_slide].leftpos());
}

Loading…
Cancel
Save