fix(filmstrip): set SmallVideo styles instead of using animate

jquery animate during animations sets an element's overflow to
hidden and then back to the overflow declared before the start
of the animation. If multiple animations are fired, then the
overflow could be set to hidden permanently. No calls
to Filmstrip#resizeThumbnails have animate set to true, so the
animate call is not even needed.
This commit is contained in:
Leonard Kim 2018-04-10 12:47:27 -07:00 committed by Дамян Минков
parent f34686afee
commit f8537dde6b
1 changed files with 15 additions and 17 deletions

View File

@ -450,25 +450,23 @@ const Filmstrip = {
if (thumbs.localThumb) {
// eslint-disable-next-line no-shadow
promises.push(new Promise(resolve => {
thumbs.localThumb.animate({
height: local.thumbHeight,
'min-height': local.thumbHeight,
'min-width': local.thumbWidth,
width: local.thumbWidth
}, this._getAnimateOptions(animate, resolve));
}));
thumbs.localThumb.css({
display: 'inline-block',
height: `${local.thumbHeight}px`,
'min-height': `${local.thumbHeight}px`,
'min-width': `${local.thumbWidth}px`,
width: `${local.thumbWidth}px`
});
}
if (thumbs.remoteThumbs) {
// eslint-disable-next-line no-shadow
promises.push(new Promise(resolve => {
thumbs.remoteThumbs.animate({
height: remote.thumbHeight,
'min-height': remote.thumbHeight,
'min-width': remote.thumbWidth,
width: remote.thumbWidth
}, this._getAnimateOptions(animate, resolve));
}));
thumbs.remoteThumbs.css({
display: 'inline-block',
height: `${remote.thumbHeight}px`,
'min-height': `${remote.thumbHeight}px`,
'min-width': `${remote.thumbWidth}px`,
width: `${remote.thumbWidth}px`
});
}
// eslint-disable-next-line no-shadow
promises.push(new Promise(resolve => {