jsketcher/web/app/cad/dom/menu/menuUtils.js
2022-08-15 23:47:20 -07:00

9 lines
234 B
JavaScript

export const menuAboveElementHint = el => {
const {top, left, bottom} = el.getBoundingClientRect();
return ({
orientationUp: true,
flatBottom: true,
x: left,
y: document.documentElement.clientHeight - top
});
};