Skip to content

Commit

Permalink
fix: export missing images bug on safari workaround (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikStreek authored Dec 4, 2023
1 parent ca58b40 commit f48821c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion teammapper-frontend/mmp/src/map/handlers/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ export default class Export {
if (typeof type === 'string') {
type = 'image/' + type
}

// Safari seems to have an issue with loading all included images on time during the download of the data url.
// This is a small workaround, as calling toBlob before seems to solve the problem most of the times.
canvas.toBlob(() => {})

callback(canvas.toDataURL(type))
this.map.events.call(Event.exportImage)
}
Expand Down

0 comments on commit f48821c

Please sign in to comment.