File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,8 @@ const FlowHeader: FC = () => {
204204 . querySelectorAll ( '[data-download-hide]' )
205205 . forEach ( d => ( d . style . display = 'block' ) )
206206 } ,
207+ // Enable map background
208+ useCORS : true ,
207209 }
208210
209211 const handleDownloadAsPNG = ( ) => {
Original file line number Diff line number Diff line change @@ -35,10 +35,15 @@ import {downloadImage} from 'src/shared/utils/download'
3535import { isFlagEnabled } from 'src/shared/utils/featureFlag'
3636import ErrorBoundary from 'src/shared/components/ErrorBoundary'
3737
38+ // Enable map background
39+ const canvasOption = {
40+ useCORS : true ,
41+ }
42+
3843const downloadAsImage = ( pipeID : string ) => {
3944 const canvas = document . getElementById ( pipeID )
4045 import ( 'html2canvas' ) . then ( ( module : any ) =>
41- module . default ( canvas as HTMLDivElement ) . then ( result => {
46+ module . default ( canvas as HTMLDivElement , canvasOption ) . then ( result => {
4247 downloadImage ( result . toDataURL ( ) , 'visualization.png' )
4348 } )
4449 )
@@ -47,7 +52,7 @@ const downloadAsImage = (pipeID: string) => {
4752const downloadAsPDF = ( pipeID : string ) => {
4853 const canvas = document . getElementById ( pipeID )
4954 import ( 'html2canvas' ) . then ( ( module : any ) =>
50- module . default ( canvas as HTMLDivElement ) . then ( result => {
55+ module . default ( canvas as HTMLDivElement , canvasOption ) . then ( result => {
5156 import ( 'jspdf' ) . then ( ( jsPDF : any ) => {
5257 const doc = new jsPDF . default ( {
5358 orientation : 'l' ,
You can’t perform that action at this time.
0 commit comments