mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 10:31:20 -08:00
Update volume.js
This commit is contained in:
1 parent
75bd703790
commit
1b69b28ba1
1 file changed
+1
-1
@@ -37,7 +37,7 @@ export default function volume(controlOption) {
|
|||||||
// TODO...
|
// TODO...
|
||||||
const panelWidth = getStyle($volumePanel, 'width') || 60;
|
const panelWidth = getStyle($volumePanel, 'width') || 60;
|
||||||
const handleWidth = getStyle($volumeHandle, 'width');
|
const handleWidth = getStyle($volumeHandle, 'width');
|
||||||
const width = handleWidth / 2 + (panelWidth - handleWidth) * percentage - handleWidth / 2;
|
const width = (panelWidth - handleWidth) * percentage;
|
||||||
setStyle($volume, 'display', 'flex');
|
setStyle($volume, 'display', 'flex');
|
||||||
setStyle($volumeClose, 'display', 'none');
|
setStyle($volumeClose, 'display', 'none');
|
||||||
setStyle($volumeHandle, 'left', `${width}px`);
|
setStyle($volumeHandle, 'left', `${width}px`);
|
||||||
|
|||||||
Reference in new issue
Block a user