add normal mode

This commit is contained in:
Harvey committed 2020-05-15 19:11:03 +08:00
1 parent 72937ab1ed
commit 2650acc953
6 files changed
+33 -30

No files matched your search

@@ -1,5 +1,8 @@
import { def } from '../utils';
export default function exclusiveInit(art, player) {
const props = ['min', 'pip', 'fullscreen', 'fullscreenWeb', 'fullscreenRotate'];
props.forEach((name) => {
const event = `${name}Change`;
art.on(event, (state) => {
@@ -14,4 +17,10 @@ export default function exclusiveInit(art, player) {
}
});
});
def(player, 'normal', {
get() {
return props.every((name) => !player[name]);
},
});
}