update aspectRatioReset

This commit is contained in:
Harvey Zack committed 2023-04-20 00:23:01 +08:00
1 parent 61cf68f0bc
commit ad8c50ddd7
9 files changed
+91 -93

No files matched your search

@@ -2,7 +2,6 @@ import { setStyle, addClass, removeClass, hasClass } from '../utils';
export default function autoOrientation(art) {
const {
option,
constructor,
template: { $player, $video },
} = art;
@@ -28,14 +27,8 @@ export default function autoOrientation(art) {
}
} else {
if (hasClass($player, 'art-auto-orientation')) {
setStyle($player, 'width', null);
setStyle($player, 'height', null);
setStyle($player, 'transform', null);
setStyle($player, 'transform-origin', null);
removeClass($player, 'art-auto-orientation');
art.isRotate = false;
art.aspectRatioReset = true;
art.autoSize = option.autoSize;
art.notice.show = '';
art.emit('resize');
}