UNPKG

@polar/plugin-draw

Version:

Draw plugin for POLAR that adds draw interactions to the map, allowing users to place various shapes and texts.

20 lines (16 loc) 614 B
import Vue from 'vue' import { DrawConfiguration } from '@polar/lib-custom-types' import { Draw } from './components' import locales from './locales' import { makeStoreModule } from './store' export { getSnaps } from './store/createInteractions/getSnaps' export type { Mode } from './types' // NOTE: Currently no options are specified here, variable is kept for integrity until options are needed export default (options: DrawConfiguration) => (instance: Vue) => instance.$store.dispatch('addComponent', { name: 'draw', plugin: Draw, locales, storeModule: makeStoreModule(), options, })