increase input margin

This commit is contained in:
Mutasem 2021-11-03 17:08:38 +01:00
parent 9a9e554e9b
commit 79d47c1688

View file

@ -1485,9 +1485,10 @@ export default mixins(
return;
}
const inputMargin = 24;
const intersecting = nodes.find((element: Element) => {
const {top, left, right, bottom} = element.getBoundingClientRect();
if (top <= e.pageY && bottom >= e.pageY && left <= e.pageX && right >= e.pageX) {
if (top <= e.pageY && bottom >= e.pageY && (left - inputMargin) <= e.pageX && right >= e.pageX) {
const nodeName = (element as HTMLElement).dataset['name'];
const node = this.$store.getters.getNodeByName(nodeName) as INodeUi | null;
if (node) {