From a318c92fd13dca0457b3201e74d90d05882f22a1 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 27 May 2024 13:17:23 +0300 Subject: [PATCH] Gutter calculation fixes --- components/lib/utils/DomHandler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lib/utils/DomHandler.js b/components/lib/utils/DomHandler.js index 4bf93e604..0a8e2a06c 100755 --- a/components/lib/utils/DomHandler.js +++ b/components/lib/utils/DomHandler.js @@ -328,7 +328,7 @@ export default { element.style.top = top + 'px'; element.style.left = left + 'px'; element.style.transformOrigin = origin; - gutter && (element.style.marginTop = origin === 'bottom' ? $dt('{anchor.gutter} * -1').variable : $dt('anchor.gutter').variable); + gutter && (element.style.marginTop = origin === 'bottom' ? `calc(${$dt('anchor.gutter', '2px').variable} * -1)` : $dt('anchor.gutter').variable); } }, @@ -367,7 +367,7 @@ export default { element.style.top = top + 'px'; element.style.left = left + 'px'; element.style.transformOrigin = origin; - gutter && (element.style.marginTop = origin === 'bottom' ? $dt('{anchor.gutter} * -1').variable : $dt('anchor.gutter').variable); + gutter && (element.style.marginTop = origin === 'bottom' ? `calc(${$dt('anchor.gutter', '2px').variable} * -1)` : $dt('anchor.gutter').variable); } },