diff --git a/components/発車時刻表/LED_vidion.js b/components/発車時刻表/LED_vidion.js index 9d52ca9..d25229b 100644 --- a/components/発車時刻表/LED_vidion.js +++ b/components/発車時刻表/LED_vidion.js @@ -280,7 +280,7 @@ const Footer = ({ setFinalSwitch, }) => { return ( - + { 6 ? 15 : 20, + fontSize: trainName.length > 6 ? parseInt("13%") : parseInt("18%"), color: getTrainType.color, fontWeight: "bold", }} @@ -422,7 +422,8 @@ const LastStation = ({ d }) => { 4 ? 15 : 20, + fontSize: + d.lastStation.length > 4 ? parseInt("13%") : parseInt("18%"), color: "white", fontWeight: "bold", }} @@ -437,7 +438,7 @@ const DependTime = ({ d }) => { { {status} @@ -512,7 +514,7 @@ const Description = ({ train }) => { { if (testButtonStatus) { - lottieRef.current.play(35, 7); const otherData = favoriteStation.filter((d) => { const compare = JSON.stringify(d); const current = JSON.stringify(currentStation); @@ -112,7 +111,6 @@ export default function Sign(props) { AS.setItem("favoriteStation", JSON.stringify(otherData)); setFavoriteStation(otherData); } else { - lottieRef.current.play(7, 35); let ret = favoriteStation; console.log(currentStation); ret.push(currentStation); @@ -122,12 +120,12 @@ export default function Sign(props) { setTestButtonStatus(!testButtonStatus); }} > - @@ -141,6 +139,37 @@ export default function Sign(props) { ); } +const LottieDelayView = ({ + progress, + speed, + style, + source, + lottieRef, + loop, +}) => { + const [progressState, setProgressState] = useState(undefined); + useEffect(() => { + if (progress == 0) { + lottieRef.current.play(progressState !== undefined ? 35 : 7, 7); + } else { + lottieRef.current.play(progressState !== undefined ? 7 : 35, 35); + } + }, [progress]); + return ( + { + console.log("finish"); + setProgressState(progress); + }} + /> + ); +}; const NexPreStationLine = ({ nexStation, preStation }) => { return ( @@ -313,6 +342,7 @@ const styleSheet = { flex: 1, flexDirection: "row", alignContent: "center", + alignItems: "center", }, 下枠左右マーク: { fontWeight: "bold",