This commit is contained in:
Harvey committed 2021-12-31 14:26:56 +08:00
1 parent b582142ade
commit 3523cb2149
6 files changed
+21 -16

No files matched your search

+8 -5
View File
@@ -2374,13 +2374,16 @@
var clientWidth = $container.clientWidth;
var videoHeight = $video.videoHeight,
videoWidth = $video.videoWidth;
var height = videoHeight * (clientWidth / videoWidth) + 'px';
setStyle($container, 'height', height);
addClass($container, 'art-auto-height');
art.emit('autoHeight', height);
var height = videoHeight * (clientWidth / videoWidth);
if (height) {
setStyle($container, 'height', height + 'px');
addClass($container, 'art-auto-height');
art.emit('autoHeight', height);
}
} else {
setStyle($container, 'height', null);
removeClass($container, 'art-auto-size');
removeClass($container, 'art-auto-height');
art.emit('autoHeight');
}
}