mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-19 19:51:20 -08:00
chore: Bump version to 5.1.4 and update resize method in danmuku plugin
This commit is contained in:
1 parent
ef3a1f7064
commit
685241de57
4 files changed
+13
-6
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"license": "MIT",
|
||||
"version": "5.1.3",
|
||||
"version": "5.1.4",
|
||||
"name": "artplayer-plugin-danmuku",
|
||||
"types": "types/artplayer-plugin-danmuku.d.ts",
|
||||
"description": "Danmuku plugin for ArtPlayer",
|
||||
|
||||
@@ -63,7 +63,7 @@ export default class Setting {
|
||||
|
||||
this.mount(this.option.mount);
|
||||
|
||||
art.on('resize', () => this.onResize());
|
||||
art.on('resize', () => this.resize());
|
||||
art.on('fullscreen', (state) => this.onFullscreen(state));
|
||||
art.on('fullscreenWeb', (state) => this.onFullscreen(state));
|
||||
|
||||
@@ -652,7 +652,7 @@ export default class Setting {
|
||||
removeClass($send, 'apd-lock');
|
||||
}
|
||||
|
||||
onResize() {
|
||||
resize() {
|
||||
if (this.outside) return;
|
||||
if (this.art.fullscreen) return;
|
||||
if (this.art.fullscreenWeb) return;
|
||||
@@ -690,10 +690,14 @@ export default class Setting {
|
||||
$color && inverseClass($color, 'apd-active');
|
||||
|
||||
tooltip($toggle, this.option.visible ? '关闭弹幕' : '打开弹幕');
|
||||
|
||||
this.resize();
|
||||
}
|
||||
|
||||
mount(target) {
|
||||
const { errorHandle } = this.utils;
|
||||
const $el = typeof target === 'string' ? document.querySelector(target) : target;
|
||||
errorHandle($el, `Can not find the mount point: ${target}`);
|
||||
this.append($el, this.template.$danmuku);
|
||||
this.template.$mount = $el;
|
||||
this.reset();
|
||||
|
||||
Reference in new issue
Block a user