瀏覽代碼

Update useClickMarker to pass marker to onMove

Kirk Trombley 5 年之前
父節點
當前提交
6553afa9bd
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      client/src/hooks/useClickMarker.jsx

+ 1 - 1
client/src/hooks/useClickMarker.jsx

@@ -9,7 +9,7 @@ export default (map, onMove) => {
         marker.current.setMap(null);
       }
       marker.current = new google.maps.Marker({ map: map.current, position: latLng });
-      onMove({ lat: latLng.lat(), lng: latLng.lng() });
+      onMove({ lat: latLng.lat(), lng: latLng.lng() }, marker.current);
     });
 
     return () => { google.maps.event.removeListener(listener); }