Minor tweak

This commit is contained in:
Rainer Simon 2021-09-18 10:19:39 +02:00
parent d8af5664b0
commit 401d261a49
1 changed files with 2 additions and 2 deletions

View File

@ -10,8 +10,8 @@ const setPosition = (wrapperEl, editorEl, selectedEl, autoPosition) => {
editorEl.style.opacity = 1;
// Default orientation (upwards arrow, at bottom-left of shape)
const { left, top, right, height, bottom } = selectedEl.getBoundingClientRect();
editorEl.style.top = `${top + height - containerBounds.top}px`;
const { left, top, right, bottom } = selectedEl.getBoundingClientRect();
editorEl.style.top = `${bottom - containerBounds.top}px`;
editorEl.style.left = `${left - containerBounds.left}px`;
if (autoPosition) {