From 401d261a499030a5c63bfbc673e5cfa3302b072f Mon Sep 17 00:00:00 2001 From: Rainer Simon Date: Sat, 18 Sep 2021 10:19:39 +0200 Subject: [PATCH] Minor tweak --- src/editor/setPosition.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor/setPosition.js b/src/editor/setPosition.js index ebaee46..67e4e02 100644 --- a/src/editor/setPosition.js +++ b/src/editor/setPosition.js @@ -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) {