File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -115,11 +115,16 @@ const updateCssProperties = (element, opts) => {
115
115
removeInlineTransition ( element ) ;
116
116
CUSTOM_CSS_PROPERTIES . forEach ( prop => {
117
117
if ( typeof opts [ prop ] === 'string' || typeof opts [ prop ] === 'number' ) {
118
- if (
119
- [ 'delay' , 'duration' ] . includes ( prop ) &&
120
- typeof opts [ prop ] === 'number'
121
- ) {
122
- opts [ prop ] = `${ opts [ prop ] } ms` ;
118
+ if ( typeof opts [ prop ] === 'number' ) {
119
+ const unit = {
120
+ duration : 'ms' ,
121
+ angle : 'deg' ,
122
+ blur : 'px' ,
123
+ iteration : '' ,
124
+ } ;
125
+ unit . delay = unit . duration ;
126
+
127
+ opts [ prop ] = `${ opts [ prop ] } ` + unit [ prop ] ;
123
128
}
124
129
setCssProperty ( element , prop , opts [ prop ] ) ;
125
130
}
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ jsCssAnimations.init.collapse({
66
66
67
67
jsCssAnimations . init . fade ( {
68
68
trigger : '.fade--btn' ,
69
- blur : '2px' ,
69
+ blur : 12 ,
70
70
keepSpace : true ,
71
71
} ) ;
72
72
@@ -97,7 +97,7 @@ jsCssAnimations.init.rotate({
97
97
start : ( ) => {
98
98
if ( validateInput ( document . querySelector ( '#rotation-angle' ) ) ) {
99
99
// @ts -ignore
100
- const angle = ` ${ document . getElementById ( 'rotation-angle' ) ?. value } deg` ;
100
+ const angle = Number ( document . getElementById ( 'rotation-angle' ) ?. value ) ;
101
101
jsCssAnimations . rotate ( '.rotation-area' , { angle : angle } ) ;
102
102
}
103
103
} ,
@@ -107,7 +107,7 @@ jsCssAnimations.init.rotate({
107
107
} ) ;
108
108
109
109
jsCssAnimations . show . fade ( '#anchor img' , {
110
- iteration : 'infinite' ,
110
+ iteration : 10 ,
111
111
duration : '1s' ,
112
112
direction : 'alternate' ,
113
113
} ) ;
You can’t perform that action at this time.
0 commit comments