File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,11 @@ import { useGraphicManager } from '@ugrc/utilities/hooks';
4
4
import PropTypes from 'prop-types' ;
5
5
import { createContext , ReactNode , useState } from 'react' ;
6
6
7
+ type GraphicOptions = Graphic | Graphic [ ] | null ;
7
8
export const MapContext = createContext < {
8
9
mapView : MapView | null ;
9
- setMapView : ( mapView : MapView ) => void ;
10
- placeGraphic : ( graphic : Graphic | Graphic [ ] | null ) => void ;
10
+ setMapView : ( mapView : MapView | null ) => void ;
11
+ placeGraphic : ( graphic : GraphicOptions ) => void ;
11
12
zoom : ( geometry : __esri . GoToTarget2D ) => void ;
12
13
} | null > ( null ) ;
13
14
@@ -25,7 +26,7 @@ export const MapProvider = ({ children }: { children: ReactNode }) => {
25
26
mapView . goTo ( geometry ) ;
26
27
} ;
27
28
28
- const placeGraphic = ( graphic : Graphic | Graphic [ ] | null ) : void => {
29
+ const placeGraphic = ( graphic : GraphicOptions ) : void => {
29
30
setGraphic ( graphic ) ;
30
31
} ;
31
32
You can’t perform that action at this time.
0 commit comments