Update volume.js

This commit is contained in:
Harvey Zack authored and GitHub committed 2019-06-06 08:31:20 +08:00
1 parent 75bd703790
commit 1b69b28ba1
1 file changed
+1 -1
+1 -1
View File
@@ -37,7 +37,7 @@ export default function volume(controlOption) {
// TODO...
const panelWidth = getStyle($volumePanel, 'width') || 60;
const handleWidth = getStyle($volumeHandle, 'width');
const width = handleWidth / 2 + (panelWidth - handleWidth) * percentage - handleWidth / 2;
const width = (panelWidth - handleWidth) * percentage;
setStyle($volume, 'display', 'flex');
setStyle($volumeClose, 'display', 'none');
setStyle($volumeHandle, 'left', `${width}px`);