visgl / visgl/react-google-maps

[Bug] undo-redo-control code blocks event listeners on overlays

Open
#602 0 comments 0 reactions 0 assignees View on GitHub

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 overlaycompleted event on the drawingManager
  • When that even fires, add listeners to the insert_at, remove_at, set_at events.
  • These event listeners don't fire...
  • Removing the undo-redo-control.tsx code allows them to fire just fine.
Environment
  • Library version:
  • Google maps version: weekly
  • Browser and Version:
  • OS:
Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.