mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Fix a bug due to non standard attribute.
This commit is contained in:
parent
5d55425e83
commit
0e676184a9
@ -47,8 +47,9 @@ const ToolManager = (() => {
|
|||||||
if (!EditorState.documentCreated || Dialogue.isOpen())
|
if (!EditorState.documentCreated || Dialogue.isOpen())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const isHoveringMenuElement = !!mouseEvent.path.find(n=>n.id && n.id.includes("-menu"));
|
// Hovering a menu element
|
||||||
if(isHoveringMenuElement)return;
|
const path = mouseEvent.composedPath && mouseEvent.composedPath();
|
||||||
|
if (path && !!path.find(n=>n.id && n.id.includes("-menu"))) return;
|
||||||
|
|
||||||
let mousePos = Input.getCursorPosition(mouseEvent);
|
let mousePos = Input.getCursorPosition(mouseEvent);
|
||||||
tools["zoom"].onMouseWheel(mousePos, mouseEvent.deltaY < 0 ? 'in' : 'out');
|
tools["zoom"].onMouseWheel(mousePos, mouseEvent.deltaY < 0 ? 'in' : 'out');
|
||||||
|
Loading…
Reference in New Issue
Block a user