visgl / visgl/react-google-maps
[Bug] undo-redo-control code blocks event listeners on overlays
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 193
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 13
Description
Description
When using the code in the undo-redo-control.tsx file of the Drawing example, event listeners attached to new polygons don't fire.
Steps to Reproduce
- Add an event listener to the
overlaycompletedevent on thedrawingManager - When that even fires, add listeners to the
insert_at,remove_at,set_atevents. - These event listeners don't fire...
- Removing the
undo-redo-control.tsxcode allows them to fire just fine.
Environment
- Library version:
- Google maps version: weekly
- Browser and Version:
- OS:
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the undo-redo-control.tsx file in the Drawing example and reproduce the interaction with a drawingManager overlay. Trace the overlaycompleted flow and the insert_at, remove_at, and set_at listeners; done means those listeners fire for newly added polygons while the undo-redo control remains enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100