From 7e537d87acc93b0688518cb247a0fa322a738d23 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Tue, 14 Jan 2020 12:54:06 +0700 Subject: [PATCH] fixed layer moving --- src/containers/map/Sticker/index.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/containers/map/Sticker/index.tsx b/src/containers/map/Sticker/index.tsx index 2f100be..c8567fb 100644 --- a/src/containers/map/Sticker/index.tsx +++ b/src/containers/map/Sticker/index.tsx @@ -131,6 +131,11 @@ const Sticker: React.FC = ({ angle.current = sticker.angle; }, [sticker.angle]) + useEffect(() => { + if (!layer) return; + layer.setLatLng(sticker.latlng) + }, [layer, sticker.latlng]) + // Attaches onMoveFinished event to item React.useEffect(() => { if (!layer) return;