aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plugins
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2019-01-21 00:39:28 +1100
committerSam Potts <sam@potts.es>2019-01-21 00:39:28 +1100
commit263e88f6b3c752f6414a83717e81f7beee03319a (patch)
tree5da4a4b82fbda26a523441192cf5d0df69cef15a /src/js/plugins
parent4ab8a54a11285366bdeb1f7a13b10981dd1f7ab2 (diff)
downloadplyr-263e88f6b3c752f6414a83717e81f7beee03319a.tar.lz
plyr-263e88f6b3c752f6414a83717e81f7beee03319a.tar.xz
plyr-263e88f6b3c752f6414a83717e81f7beee03319a.zip
Comments
Diffstat (limited to 'src/js/plugins')
-rw-r--r--src/js/plugins/previewThumbnails.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/js/plugins/previewThumbnails.js b/src/js/plugins/previewThumbnails.js
index 9dd37e15..973e377c 100644
--- a/src/js/plugins/previewThumbnails.js
+++ b/src/js/plugins/previewThumbnails.js
@@ -336,7 +336,9 @@ class PreviewThumbnails {
this.loadingImage.onload = null;
}
- // We're building and adding a new image. In other implementations of similar functionality (Youtube), background image is instead used. But this causes issues with larger images in Firefox and Safari - switching between background images causes a flicker. Putting a new image over the top does not
+ // We're building and adding a new image. In other implementations of similar functionality (YouTube), background image
+ // is instead used. But this causes issues with larger images in Firefox and Safari - switching between background
+ // images causes a flicker. Putting a new image over the top does not
const previewImage = new Image();
previewImage.src = thumbUrl;
previewImage.dataset.index = thumbNum;
@@ -395,7 +397,8 @@ class PreviewThumbnails {
// Wait 200ms, as the new image can take some time to show on certain browsers (even though it was downloaded before showing). This will prevent flicker, and show some generosity towards slower clients
// First set attribute 'deleting' to prevent multi-handling of this on repeat firing of this function
image.dataset.deleting = true;
- const { currentImageContainer } = this; // This has to be set before the timeout - to prevent issues switching between hover and scrub
+ // This has to be set before the timeout - to prevent issues switching between hover and scrub
+ const { currentImageContainer } = this;
setTimeout(() => {
currentImageContainer.removeChild(image);