Skip to content

Commit

Permalink
fix(Polygon): fix Polygon props control issue. (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Aug 3, 2023
1 parent 8b249c6 commit 61fb8dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/polygon/src/usePolygon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ export const usePolygon = (props = {} as UsePolygon) => {
}
}, [map]);

useEffect(() => {
if (polygon) {
polygon.setOptions(other);
}
}, [polygon, other]);

useVisiable(polygon!, visiable);
useSettingProperties<AMap.Polygon, UsePolygon>(polygon!, props, ['Path', 'Options', 'Map', 'ExtData', 'Draggable']);
useEventProperties<AMap.Polygon, UsePolygon>(polygon!, props, [
Expand Down

1 comment on commit 61fb8dd

@vercel
Copy link

@vercel vercel bot commented on 61fb8dd Aug 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

react-amap – ./

react-amap-398188662.vercel.app
react-amap-git-master-398188662.vercel.app
react-amap-one.vercel.app

Please sign in to comment.