MCPcopy
hub / github.com/visgl/react-google-maps / subscribeToInnerPath

Function subscribeToInnerPath

src/components/polygon.tsx:185–197  ·  view source on GitHub ↗
(
      innerPath: google.maps.MVCArray<google.maps.LatLng>
    )

Source from the content-addressed store, hash-verified

183
184 // Subscribe to each inner path's events
185 const subscribeToInnerPath = (
186 innerPath: google.maps.MVCArray<google.maps.LatLng>
187 ) => {
188 listeners.push(
189 google.maps.event.addListener(innerPath, 'insert_at', handlePathsChange)
190 );
191 listeners.push(
192 google.maps.event.addListener(innerPath, 'remove_at', handlePathsChange)
193 );
194 listeners.push(
195 google.maps.event.addListener(innerPath, 'set_at', handlePathsChange)
196 );
197 };
198
199 // Subscribe to existing inner paths
200 for (let i = 0; i < mvcPaths.getLength(); i++) {

Callers 1

usePolygonFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected