update event.button === 0

This commit is contained in:
Harvey Zack committed 2023-04-17 18:54:16 +08:00
1 parent e9e1e08de5
commit d531c41735
4 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -171,8 +171,8 @@ export default function progress(options) {
setStyle($hover, 'display', 'none');
});
proxy($control, 'mousedown', () => {
isDroging = true;
proxy($control, 'mousedown', (event) => {
isDroging = event.button === 0;
});
proxy(document, 'mousemove', (event) => {
+1 -1
View File
@@ -55,7 +55,7 @@ export default function volume(option) {
let isDroging = false;
proxy($slider, 'mousedown', (event) => {
isDroging = true;
isDroging = event.button === 0;
art.volume = getVolumeFromEvent(event);
});