Skip to content

Commit

Permalink
Merge pull request #455 from HSLdevcom/DT-6296
Browse files Browse the repository at this point in the history
DT-6296: Varoitukset ja hälytykset nykivät tietyillä näytöillä
  • Loading branch information
sharhio authored May 29, 2024
2 parents d5c11f7 + d56703c commit afcf80a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
34 changes: 14 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"suncalc": "1.8.0",
"url": "^0.11.0",
"uuid": "^8.3.2",
"nth-check": "^2.1.1"
"nth-check": "^2.1.1",
"react-animate-height": "^3.2.3"
},
"scripts": {
"start-prod": "cd server && npm start",
Expand Down Expand Up @@ -118,6 +119,7 @@
"not op_mini all"
],
"overrides": {
"nth-check": "$nth-check"
"nth-check": "$nth-check",
"react-animate-height": "$react-animate-height"
}
}
4 changes: 2 additions & 2 deletions src/ui/MonitorAlertRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const MonitorAlertRow: FC<IProps> = ({
const windowHeight = preview ? 370 : window.innerWidth;
setAnimationWidth(width);
alertOrientation === 'horizontal'
? setSpeed((width / windowWidth) * 10) // 10 means that it should take 10 seconds for a word appearing from the right to reach the left side of the screen
? setSpeed((width / windowWidth) * 8) // 10 means that it should take 10 seconds for a word appearing from the right to reach the left side of the screen
: setSpeed((width / (windowHeight / 6)) * 5);
setUpdate(true);
};
Expand Down Expand Up @@ -110,7 +110,7 @@ const MonitorAlertRow: FC<IProps> = ({
})}
onAnimationIteration={() => {
updateAnimation();
setTimeout(() => setUpdate(false), 100);
requestAnimationFrame(() => setUpdate(false));
}}
>
{alertElements}
Expand Down

0 comments on commit afcf80a

Please sign in to comment.