File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @equinor/amplify-component-lib" ,
3
- "version" : " 9.8.3 " ,
3
+ "version" : " 9.8.4 " ,
4
4
"description" : " Frontend Typescript components for the Amplify team" ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -36,11 +36,21 @@ export const exportComponent = (
36
36
}
37
37
38
38
const element = node . current ;
39
+
40
+ const scrollWidth = element . scrollWidth ;
41
+ const scrollHeight = element . scrollHeight ;
42
+
43
+ element . setAttribute ( 'style' , 'box-shadow: none' ) ;
44
+ element . setAttribute ( 'style' , 'overflow: visible' ) ;
45
+
39
46
return html2canvas ( element , {
40
47
scrollY : - window . scrollY ,
41
48
useCORS : true ,
42
49
backgroundColor : backgroundColor ? backgroundColor : '#FFFFFF' ,
50
+ width : scrollWidth ,
51
+ height : scrollHeight ,
43
52
} ) . then ( ( canvas ) => {
53
+ element . removeAttribute ( 'style' ) ;
44
54
return dataURItoBlob ( canvas . toDataURL ( 'image/png' , 1.0 ) ) ;
45
55
} ) ;
46
56
} ;
You can’t perform that action at this time.
0 commit comments