Browse Source

ceshi

dev_trial
wenlele 2 years ago
parent
commit
6dcdfc8b60
  1. 5
      code/VideoAccess-VCMP/web/client/src/components/textScroll.jsx

5
code/VideoAccess-VCMP/web/client/src/components/textScroll.jsx

@ -12,6 +12,7 @@ function TextScroll (props) {
useEffect(() => { useEffect(() => {
if (content.length) { if (content.length) {
if (roll) { if (roll) {
console.log(11111);
let contentParent = document.getElementById("marquee_box" + videoObjId) let contentParent = document.getElementById("marquee_box" + videoObjId)
if (document.getElementById('contentPMakeUp' + videoObjId)) { if (document.getElementById('contentPMakeUp' + videoObjId)) {
document.getElementById('contentPMakeUp' + videoObjId).style.width = contentParent?.clientWidth + 'px' document.getElementById('contentPMakeUp' + videoObjId).style.width = contentParent?.clientWidth + 'px'
@ -27,8 +28,10 @@ function TextScroll (props) {
} }
initialization.current = false initialization.current = false
showIndex.current = 0 showIndex.current = 0
console.log(22222);
} }
else { else {
console.log(33333);
let repeatTime = moment() let repeatTime = moment()
let refreshTime = moment() let refreshTime = moment()
let scroll = () => { let scroll = () => {
@ -75,6 +78,8 @@ function TextScroll (props) {
text = window.requestAnimationFrame(scroll) text = window.requestAnimationFrame(scroll)
cancel.current = text cancel.current = text
} }
console.log(44444);
window.requestAnimationFrame(scroll) window.requestAnimationFrame(scroll)
} }
} }

Loading…
Cancel
Save