Skip to content

Commit

Permalink
Merge pull request #156 from twitwi/make-slide-list-also-before-preinit
Browse files Browse the repository at this point in the history
Fill slides array before preInit event, fill again on init
  • Loading branch information
imakewebthings committed Dec 1, 2013
2 parents b37c6c4 + 7bb431b commit f8fc230
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/deck.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,12 @@ that use the API provided by core.
// Hide the deck while states are being applied to kill transitions
$container.addClass(options.classes.loading);

// populate the array of slides for pre-init
initSlidesArray(elements);
// Pre init event for preprocessing hooks
beforeInitEvent.done = function() {
// re-populate the array of slides
slides = [];
initSlidesArray(elements);
bindKeyEvents();
bindTouchEvents();
Expand Down

0 comments on commit f8fc230

Please sign in to comment.