Skip to content

Commit 686387b

Browse files
committed
fix: remove unused badge offset in position calculation for info badge
1 parent 6c78a39 commit 686387b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • src/view/frontend/web/js/inspector

src/view/frontend/web/js/inspector/ui.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,10 @@ export const uiMethods = {
217217
this.infoBadge.style.display = 'block';
218218

219219
const badgeRect = this.infoBadge.getBoundingClientRect();
220-
const badgeOffset = 0;
221220

222221
// Calculate initial position
223222
let x = rect.left + window.scrollX;
224-
let y = rect.bottom + window.scrollY + badgeOffset;
223+
let y = rect.bottom + window.scrollY;
225224

226225
// Validate coordinates
227226
if (!isFinite(x) || !isFinite(y) || x < 0 || y < 0) {
@@ -235,7 +234,7 @@ export const uiMethods = {
235234
// Check vertical space and adjust if needed
236235
const showAbove = this.shouldShowAbove(y, badgeRect.height);
237236
if (showAbove) {
238-
y = rect.top + window.scrollY - badgeRect.height - badgeOffset;
237+
y = rect.top + window.scrollY - badgeRect.height;
239238
if (y < window.scrollY + 10) {
240239
y = window.scrollY + 10;
241240
}

0 commit comments

Comments
 (0)