From 0899afa1c9a17767e76ad49d4fd14b082c4c6434 Mon Sep 17 00:00:00 2001 From: sunhao Date: Mon, 26 Aug 2024 13:23:16 +0800 Subject: [PATCH] * [misc] fix tutorial-light-box rect. --- module/tutorial/js/index.ui.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/tutorial/js/index.ui.js b/module/tutorial/js/index.ui.js index e94d4aafb7..2c7315f138 100644 --- a/module/tutorial/js/index.ui.js +++ b/module/tutorial/js/index.ui.js @@ -309,10 +309,10 @@ function highlightStepTarget($target, step, popoverOptions) height : rect.height, borderRadius: $trigger.css('borderRadius'), }); - $lightElement.find('.is-left').css({left: -rect.left, width: rect.left}); - $lightElement.find('.is-right').css({width: window.innerWidth - rect.right}); - $lightElement.find('.is-top').css({top: -rect.top, height: rect.top, left: -rect.left, right: rect.right - window.innerWidth}); - $lightElement.find('.is-bottom').css({height: window.innerHeight - rect.bottom, left: -rect.left, right: rect.right - window.innerWidth}); + $lightElement.find('.is-left').css({left: -rect.left, width: Math.round(rect.left)}); + $lightElement.find('.is-right').css({width: Math.round(window.innerWidth - rect.right)}); + $lightElement.find('.is-top').css({top: -rect.top, height: Math.round(rect.top), left: -rect.left, right: rect.right - window.innerWidth}); + $lightElement.find('.is-bottom').css({height: Math.round(window.innerHeight - rect.bottom), left: -rect.left, right: rect.right - window.innerWidth}); } }, step.popover, popoverOptions); if(popoverOptions.title === null)