From 7df0f85d644b2aa2f0c59df1e0b64607d26f042d Mon Sep 17 00:00:00 2001 From: Burak Civan Date: Tue, 15 Nov 2022 10:39:07 +0300 Subject: [PATCH] code refactoring --- public/akaunting-js/generalAction.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/akaunting-js/generalAction.js b/public/akaunting-js/generalAction.js index cbf0431bc..9129c8ba0 100644 --- a/public/akaunting-js/generalAction.js +++ b/public/akaunting-js/generalAction.js @@ -368,7 +368,7 @@ function marqueeAnimation(truncate) { // offsetwidth = width of the text, clientWidth = width of parent text (div) // because some index page has icons, we use two time parent element - if (truncate.children.length < 1 && truncate.offsetWidth > truncate.parentElement.clientWidth || truncate.offsetWidth > truncate.parentElement.parentElement.parentElement.clientWidth) { + if (truncate.children.length < 1 && truncate.offsetWidth > truncate.parentElement.clientWidth || truncate.offsetWidth > truncate.parentElement.parentElement.parentElement.clientWidth) { truncate.addEventListener('mouseover', function () { truncate.parentElement.style.animationPlayState = 'running'; @@ -429,6 +429,7 @@ document.querySelectorAll('[data-index-icon]').forEach((defaultText) => { if (icon_parents_element.classList.contains('flex')) { icon_parents_element.appendChild(defaultText); + icon_parents_element.classList.remove('truncate'); } else { if (icon_parents_element.classList.contains('overflow-x-hidden')) { icon_parents_element.parentElement.appendChild(defaultText);