From 6dcdfc8b60c056191fd5fe94c256fd2e1fb04453 Mon Sep 17 00:00:00 2001 From: wenlele Date: Fri, 9 Dec 2022 09:37:30 +0800 Subject: [PATCH] ceshi --- .../web/client/src/components/textScroll.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/VideoAccess-VCMP/web/client/src/components/textScroll.jsx b/code/VideoAccess-VCMP/web/client/src/components/textScroll.jsx index d5e4fd8..4e50625 100644 --- a/code/VideoAccess-VCMP/web/client/src/components/textScroll.jsx +++ b/code/VideoAccess-VCMP/web/client/src/components/textScroll.jsx @@ -12,6 +12,7 @@ function TextScroll (props) { useEffect(() => { if (content.length) { if (roll) { + console.log(11111); let contentParent = document.getElementById("marquee_box" + videoObjId) if (document.getElementById('contentPMakeUp' + videoObjId)) { document.getElementById('contentPMakeUp' + videoObjId).style.width = contentParent?.clientWidth + 'px' @@ -27,8 +28,10 @@ function TextScroll (props) { } initialization.current = false showIndex.current = 0 + console.log(22222); } else { + console.log(33333); let repeatTime = moment() let refreshTime = moment() let scroll = () => { @@ -75,6 +78,8 @@ function TextScroll (props) { text = window.requestAnimationFrame(scroll) cancel.current = text } + console.log(44444); + window.requestAnimationFrame(scroll) } }