diff --git a/packages/plugins/Export/CHANGELOG.md b/packages/plugins/Export/CHANGELOG.md index a2337037e..f15e833ea 100644 --- a/packages/plugins/Export/CHANGELOG.md +++ b/packages/plugins/Export/CHANGELOG.md @@ -4,6 +4,7 @@ - Fix: PDF export with download:false now works correctly. - Fix: Adjust documentation to properly describe optionality of configuration parameters. +- Fix: Disable map interactions during the export process so potential interaction features won't be exported. - Chore: Update dependencies to latest versions. ## 1.2.0 diff --git a/packages/plugins/Export/src/store/actions.ts b/packages/plugins/Export/src/store/actions.ts index fd8021a6e..465415657 100644 --- a/packages/plugins/Export/src/store/actions.ts +++ b/packages/plugins/Export/src/store/actions.ts @@ -25,6 +25,10 @@ const actions: PolarActionTree = { // Screenshot canvas const CANVAS_ID = 'export-canvas' + map.getInteractions().forEach((interaction) => { + interaction.setActive(false) + }) + map.once('postrender', function () { // Map properties const size = map.getSize() @@ -102,6 +106,10 @@ const actions: PolarActionTree = { } } + map.getInteractions().forEach((interaction) => { + interaction.setActive(true) + }) + commit('setExportedMap', src) }) map.renderSync()