Skip to content

Commit a2400f0

Browse files
authored
Update 3.show-result-texts-on-the-video.html
1 parent 69fa712 commit a2400f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

4.use-case/3.show-result-texts-on-the-video.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@
121121
} else { // if you set body `position` as `relative`, `absolute`, things can get complicated
122122
const bodyRect = document.body.getBoundingClientRect();
123123
const bodyBorderLeft = parseFloat(bodyStyle.borderLeftWidth);
124-
const bodyBorderBottom = parseFloat(bodyStyle.borderBottomWidth);
124+
const bodyBorderTop = parseFloat(bodyStyle.borderTopWidth);
125125
Object.assign(divInf.style, {
126126
left: `${(convertedP1.x + convertedP2.x) / 2 - bodyRect.left - bodyBorderLeft}px`,
127-
top: `${convertedP1.y - bodyRect.top - bodyBorderBottom}px`,
127+
top: `${convertedP1.y - bodyRect.top - bodyBorderTop}px`,
128128
});
129129
}
130130
divInf.innerText = result.barcodeText;

0 commit comments

Comments
 (0)