@@ -27,12 +27,19 @@ const FINAL_WIDTH = 300;
27
27
let attributeValue : string | null = null ;
28
28
let imageSRC : string ;
29
29
let imageHeight : number ;
30
- const sideBarSlide = [ { left : '100%' } , { left : '0%' } ] ;
30
+ const sideBarSlide = [
31
+ { left : '30%' , opacity : '0' } ,
32
+ { left : '0%' , opacity : '1' } ,
33
+ ] ;
34
+ const sideBarSlideOut = [
35
+ { left : '0%' , opacity : '1' } ,
36
+ { left : '30%' , opacity : '0' } ,
37
+ ] ;
31
38
32
39
const sideBarTiming = {
33
- duration : 500 ,
40
+ duration : 450 ,
34
41
iterations : 1 ,
35
- easing : 'ease-in ' ,
42
+ easing : 'ease' ,
36
43
} ;
37
44
38
45
// Elements
@@ -144,6 +151,7 @@ FilePond.create(getImageEntryElement, {
144
151
enableImgResultBtn ( ) ;
145
152
146
153
// disable btn also when close btn clicked on image display
154
+
147
155
const closeBtn = document . querySelector (
148
156
'.filepond--action-remove-item'
149
157
) as HTMLButtonElement ;
@@ -274,12 +282,11 @@ showResult(null);
274
282
275
283
// onClick event listener for the closebar icon
276
284
closeBar ?. addEventListener ( 'click' , ( ) => {
277
- const sideBarSlide = [ { left : '0%' } , { left : '100%' } ] ;
278
- sidebar . animate ( sideBarSlide , sideBarTiming ) ;
285
+ sidebar . animate ( sideBarSlideOut , sideBarTiming ) ;
279
286
sidebar . style . left = '100%' ;
280
287
showResult ( null ) ;
281
288
setTimeout ( ( ) => {
282
- sidebar . style . display = 'none'
289
+ sidebar . style . display = 'none' ;
283
290
} , 600 ) ;
284
291
} ) ;
285
292
0 commit comments