mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 11:11:20 -08:00
更新弹幕demo
This commit is contained in:
1 parent
3f4ceefbc7
commit
e8d721f92f
4 files changed
+95
-218
No files matched your search
@@ -85,12 +85,12 @@ export default class Danmuku {
|
||||
const { clientHeight } = this.$player;
|
||||
|
||||
if (typeof value === 'number') {
|
||||
return clamp(value, 0, clientHeight);
|
||||
return clamp(value, 10, clientHeight);
|
||||
}
|
||||
|
||||
if (typeof value === 'string' && value.endsWith('%')) {
|
||||
const ratio = parseFloat(value) / 100;
|
||||
return clamp(clientHeight * ratio, 0, clientHeight);
|
||||
return clamp(clientHeight * ratio, 10, clientHeight);
|
||||
}
|
||||
|
||||
return Danmuku.option.margin[0];
|
||||
@@ -102,12 +102,12 @@ export default class Danmuku {
|
||||
const { clientHeight } = this.$player;
|
||||
|
||||
if (typeof value === 'number') {
|
||||
return clamp(value, 0, clientHeight);
|
||||
return clamp(value, 10, clientHeight);
|
||||
}
|
||||
|
||||
if (typeof value === 'string' && value.endsWith('%')) {
|
||||
const ratio = parseFloat(value) / 100;
|
||||
return clamp(clientHeight * ratio, 0, clientHeight);
|
||||
return clamp(clientHeight * ratio, 10, clientHeight);
|
||||
}
|
||||
|
||||
return Danmuku.option.margin[1];
|
||||
|
||||
Reference in new issue
Block a user