Skip to content

Commit

Permalink
Merge pull request ksky521#150 from daviscai/master
Browse files Browse the repository at this point in the history
fixed ksky521#148 magic多个子页面列表动效失效bug
  • Loading branch information
ksky521 authored Mar 23, 2017
2 parents 1a664a3 + feaff81 commit 367dfe7
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions assets/js/nodeppt.js
Original file line number Diff line number Diff line change
@@ -1223,7 +1223,21 @@
$cur.dataset.status = 'wait';
return;
} else {
e.stop();
//e.stop();
//fixed #148 magic多个子页面列表动效失效bug
var $willgoneSlide = $slides[index + 1];
var buildItems = toArray($('.building', $willgoneSlide));
var buildedItems = toArray($('.builded', $willgoneSlide));
if (buildItems.length > 0 || buildedItems.length > 0) {
var willgoneSlideEvent = dispatchEvent($willgoneSlide, 'Build', {
direction: 'prev',
container: $willgoneSlide
});
willgoneSlideEvent.stop();
return;
} else {
e.stop();
}
}
} else {
index++;
@@ -1234,7 +1248,20 @@
$cur.dataset.status = 'done';
return;
} else {
e.stop();
//e.stop();
//fixed #148 magic多个子页面列表动效失效bug
var $willgoneSlide = $slides[index-1];
var toBuildItems = toArray($('.tobuild', $willgoneSlide));
if(toBuildItems.length>0){
var willgoneSlideEvent = dispatchEvent($willgoneSlide, 'Build', {
direction: 'next',
container: $willgoneSlide
});
willgoneSlideEvent.stop();
return;
}else{
e.stop();
}
}
}
$cur.dataset.index = index;

0 comments on commit 367dfe7

Please sign in to comment.