Skip to content

Commit

Permalink
no need to hold disabled interactions because all are disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoholic committed Jul 31, 2024
1 parent 81fddfb commit 4113b37
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/plugins/Export/src/store/actions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { jsPDF } from 'jspdf'
import { PolarActionTree } from '@polar/lib-custom-types'
import { Interaction } from 'ol/interaction'
import { ExportFormat, ExportGetters, ExportState } from '../types'

const actions: PolarActionTree<ExportState, ExportGetters> = {
Expand All @@ -26,10 +25,7 @@ const actions: PolarActionTree<ExportState, ExportGetters> = {
// Screenshot canvas
const CANVAS_ID = 'export-canvas'

const disabledInteractions: Array<Interaction> = []

map.getInteractions().forEach((interaction) => {
disabledInteractions.push(interaction)
interaction.setActive(false)
})

Expand Down Expand Up @@ -110,7 +106,7 @@ const actions: PolarActionTree<ExportState, ExportGetters> = {
}
}

disabledInteractions.forEach((interaction) => {
map.getInteractions().forEach((interaction) => {
interaction.setActive(true)
})

Expand Down

0 comments on commit 4113b37

Please sign in to comment.