Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix issue with default slideshow
Default slideshow (outside gallery) doesn't handle livePhotos. A fake livePreview permits to handle this issue.

Signed-off-by: François Sylvestre <[email protected]>
  • Loading branch information
fefux committed Aug 20, 2018
commit c831a35dfb908768f28548af4db0046e52f641db
10 changes: 9 additions & 1 deletion js/slideshow.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@
// We need 6 hexas for comparison reasons
darkBackgroundColour: '#000000',
lightBackgroundColour: '#ffffff',
LivePreview: {
reset: function() {},
startLivePreview: function() {
var defer = $.Deferred();
defer.reject();
return defer.promise();
}
}

/**
* Initialises the slideshow
Expand All @@ -55,7 +63,7 @@
this.container = $('#slideshow');
this.zoomablePreviewContainer = this.container.find('.bigshotContainer');
this.zoomablePreview = new SlideShow.ZoomablePreview(this.container);
this.livePhotoPreview = new SlideShow.LivePreview(this.container);
this.livePhotoPreview = SlideShow.LivePreview ? new SlideShow.LivePreview(this.container) : fakeLivePreview;
this.controls =
new SlideShow.Controls(
this,
Expand Down