forked from blallo/talk-hm-0x15
fix current fragment index check when multiple fragments have same index
This commit is contained in:
parent
2cd988a7a3
commit
cbef64b860
1 changed files with 7 additions and 2 deletions
|
@ -2871,8 +2871,13 @@
|
||||||
if( !slide && currentSlide ) {
|
if( !slide && currentSlide ) {
|
||||||
var hasFragments = currentSlide.querySelectorAll( '.fragment' ).length > 0;
|
var hasFragments = currentSlide.querySelectorAll( '.fragment' ).length > 0;
|
||||||
if( hasFragments ) {
|
if( hasFragments ) {
|
||||||
var visibleFragments = currentSlide.querySelectorAll( '.fragment.visible' );
|
var currentFragment = currentSlide.querySelector( '.current-fragment' );
|
||||||
f = visibleFragments.length - 1;
|
if( currentFragment && currentFragment.hasAttribute( 'data-fragment-index' ) ) {
|
||||||
|
f = parseInt( currentFragment.getAttribute( 'data-fragment-index' ), 10 );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
f = currentSlide.querySelectorAll( '.fragment.visible' ).length - 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue