Skip to content

[Map] add definition to after create events in controller #2763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2025

Conversation

mart-insiders
Copy link
Contributor

Q A
Bug fix? yes
New feature?
Docs? no
Issues Fix
License MIT

Hi,
The documentationstates that the definition should be accessible in the :after-create events in the map controllers.

@mart-insiders mart-insiders requested a review from Kocal as a code owner May 22, 2025 10:29
@carsonbot carsonbot added Bug Bug Fix Map Status: Needs Review Needs to be reviewed labels May 22, 2025
@carsonbot
Copy link

It looks like you unchecked the "Allow edits from maintainer" box. That is fine, but please note that if you have multiple commits, you'll need to squash your commits into one before this can be merged. Or, you can check the "Allow edits from maintainers" box and the maintainer can squash for you.

Cheers!

Carsonbot

Copy link

github-actions bot commented May 22, 2025

📊 Packages dist files size difference

Thanks for the PR! Here is the difference in size of the packages dist files between the base branch and the PR.
Please review the changes and make sure they are expected.

FileBefore (Size / Gzip)After (Size / Gzip)
Map
abstract_map_controller.js 3.97 kB / 1.07 kB 3.99 kB+1% 📈 / 1.07 kB0%
Map (Bridge Google)
map_controller.js 11.16 kB / 2.52 kB 11.18 kB0% / 2.53 kB0%
Map (Bridge Leaflet)
map_controller.js 9.63 kB / 2.58 kB 9.65 kB0% / 2.58 kB0%

Copy link
Member

@Kocal Kocal left a comment

Choose a reason for hiding this comment

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

Indeed, thanks for the fix :)

@carsonbot carsonbot added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels May 23, 2025
@@ -74,7 +74,7 @@ class default_1 extends Controller {
return ({ definition }) => {
this.dispatchEvent(eventBefore, { definition });
const drawing = factory({ definition });
this.dispatchEvent(eventAfter, { [type]: drawing });
this.dispatchEvent(eventAfter, { [type]: drawing, definition: definition });
Copy link
Member

Choose a reason for hiding this comment

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

Since I can't push on your repository, you will need to do the following changes:

Copy link

Choose a reason for hiding this comment

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

@Kocal I pushed some changes.

Copy link
Member

Choose a reason for hiding this comment

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

That's perfect, thanks :)

@carsonbot carsonbot added Status: Needs Work Additional work is needed and removed Status: Reviewed Has been reviewed by a maintainer labels May 23, 2025
@dannyvw dannyvw force-pushed the map-after-create branch from 71ce398 to e58c9b9 Compare May 23, 2025 10:27
@carsonbot carsonbot added Status: Needs Review Needs to be reviewed and removed Status: Needs Work Additional work is needed labels May 23, 2025
@carsonbot carsonbot added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels May 23, 2025
@Kocal
Copy link
Member

Kocal commented May 23, 2025

Thanks @mart-insiders and @dannyvw :)

@Kocal Kocal merged commit f26124c into symfony:2.x May 23, 2025
16 of 17 checks passed
@dannyvw dannyvw deleted the map-after-create branch May 23, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug Fix Map Status: Reviewed Has been reviewed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants