Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/threesixty.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions src/threesixty.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,19 +162,22 @@
});
};
/**
* @method loadImages
* @method imageLoaded
* @private
* The function gets triggers once the image is loaded. We also update
* the progress percentage in this function.
*/
base.imageLoaded = function () {
AppCongif.loadedImages += 1;
$(AppCongif.progress + ' span').text(Math.floor(AppCongif.loadedImages / AppCongif.totalFrames * 100) + '%');

var $progress = base.$el.find(AppCongif.progress);

$progress.find('span').text(Math.floor(AppCongif.loadedImages / AppCongif.totalFrames * 100) + '%');
if (AppCongif.loadedImages >= AppCongif.totalFrames) {
if(AppCongif.disableSpin) {
frames[0].removeClass('previous-image').addClass('current-image');
}
$(AppCongif.progress).fadeOut('slow', function () {
$progress.fadeOut('slow', function () {
$(this).hide();
base.showImages();
base.showNavigation();
Expand Down