Skip to content

Commit 940b98e

Browse files
authored
scroll
1 parent a2400f0 commit 940b98e

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
@@ -123,8 +123,8 @@
123123
const bodyBorderLeft = parseFloat(bodyStyle.borderLeftWidth);
124124
const bodyBorderTop = parseFloat(bodyStyle.borderTopWidth);
125125
Object.assign(divInf.style, {
126-
left: `${(convertedP1.x + convertedP2.x) / 2 - bodyRect.left - bodyBorderLeft}px`,
127-
top: `${convertedP1.y - bodyRect.top - bodyBorderTop}px`,
126+
left: `${(convertedP1.x + convertedP2.x) / 2 - (bodyRect.left + document.documentElement.scrollLeft) - bodyBorderLeft}px`,
127+
top: `${convertedP1.y - (bodyRect.top + document.documentElement.scrollTop) - bodyBorderTop}px`,
128128
});
129129
}
130130
divInf.innerText = result.barcodeText;

0 commit comments

Comments
 (0)