mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-15 21:05:22 +01:00
fix the menu button location
This commit is contained in:
parent
0926d2082d
commit
1ce3c7c8ac
1 changed files with 1 additions and 11 deletions
|
|
@ -1,6 +1,5 @@
|
|||
import React, {useContext} from 'react';
|
||||
import {AppContext} from "../dom/components/AppContext";
|
||||
import {isMenuAction} from "cad/dom/menu/menuPlugin";
|
||||
|
||||
export function ActionButtonBehavior({children, actionId}) {
|
||||
|
||||
|
|
@ -22,16 +21,7 @@ export function ActionButtonBehavior({children, actionId}) {
|
|||
'data-action-id': actionId,
|
||||
onClick: e => {
|
||||
canceled = true;
|
||||
let data;
|
||||
if (isMenuAction(actionId)) {
|
||||
data = {
|
||||
x: e.pageX,
|
||||
y: e.pageY
|
||||
}
|
||||
} else {
|
||||
data = e;
|
||||
}
|
||||
actionService.run(actionId, data);
|
||||
actionService.run(actionId, e);
|
||||
},
|
||||
onMouseEnter: e => {
|
||||
updateCoords(e);
|
||||
|
|
|
|||
Loading…
Reference in a new issue