File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed
Draw/src/store/createInteractions Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ export default function (
2525 type : 'Point' ,
2626 style : textStyle ,
2727 } )
28+ // @ts -expect-error | internal hack to detect it in @polar/plugin-pins and @polar/plugin-gfi
29+ draw . _isDrawPlugin = true
2830 draw . on ( 'drawend' , function ( e ) {
2931 e . feature . setStyle ( textStyle )
3032 e . feature . set ( 'text' , textInput )
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ export default function (
4040 type : drawMode ,
4141 style,
4242 } )
43+ // @ts -expect-error | internal hack to detect it in @polar/plugin-pins and @polar/plugin-gfi
44+ draw . _isDrawPlugin = true
4345 draw . on ( 'drawend' , ( e ) => e . feature . setStyle ( style ) )
4446
4547 return [ draw , new Snap ( { source : drawSource } ) ]
Original file line number Diff line number Diff line change @@ -24,8 +24,9 @@ const isDrawing = (map: Map) =>
2424 . getArray ( )
2525 . some (
2626 ( interaction ) =>
27- // @ts -expect-error | internal hack to detect it from @polar/plugin-gfi
28- ( interaction instanceof Draw && interaction . _isMultiSelect ) ||
27+ ( interaction instanceof Draw &&
28+ // @ts -expect-error | internal hack to detect it from @polar/plugin-gfi and @polar/plugin-draw
29+ ( interaction . _isMultiSelect || interaction . _isDrawPlugin ) ) ||
2930 interaction instanceof Modify ||
3031 // @ts -expect-error | internal hack to detect it from @polar/plugin-draw
3132 interaction . _isDeleteSelect ||
Original file line number Diff line number Diff line change @@ -53,8 +53,9 @@ export const makeStoreModule = () => {
5353 rootGetters . map . on ( 'singleclick' , async ( { coordinate } ) => {
5454 const isDrawing = interactions . getArray ( ) . some (
5555 ( interaction ) =>
56- // @ts -expect-error | internal hack to detect it from @polar/plugin-gfi
57- ( interaction instanceof Draw && interaction . _isMultiSelect ) ||
56+ ( interaction instanceof Draw &&
57+ // @ts -expect-error | internal hack to detect it from @polar/plugin-gfi and @polar/plugin-draw
58+ ( interaction . _isMultiSelect || interaction . _isDrawPlugin ) ) ||
5859 interaction instanceof Modify ||
5960 // @ts -expect-error | internal hack to detect it from @polar/plugin-draw
6061 interaction . _isDeleteSelect ||
You can’t perform that action at this time.
0 commit comments