Skip to content

Commit b57cac4

Browse files
committed
fix set_env(output_animation=False) not work for image
1 parent ab4298b commit b57cac4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

pywebio/html/css/app.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ img {
127127
animation-duration: .6s
128128
}
129129

130+
.no-animation img {
131+
-webkit-animation-name: none;
132+
animation-name: none
133+
}
134+
130135
@-webkit-keyframes image-load-in {
131136
0% {
132137
-webkit-filter: blur(8px);

webiojs/src/handlers/env.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ export class EnvSettingHandler implements CommandHandler {
1919

2020
if (spec.output_animation !== undefined) {
2121
config.outputAnimation = spec.output_animation;
22+
if(!spec.output_animation){
23+
document.body.classList.add('no-animation');
24+
}else{
25+
document.body.classList.remove('no-animation');
26+
}
2227
}
2328

2429
if (spec.http_pull_interval !== undefined) {

0 commit comments

Comments
 (0)