Skip to content

Commit

Permalink
[Map] Change "BeforeConnect" for "BeforeCreate" in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kocal committed Aug 9, 2024
1 parent 6918605 commit eceb244
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Map/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,19 @@ Symfony UX Map allows you to extend its default behavior using a custom Stimulus
connect() {
this.element.addEventListener('ux:map:pre-connect', this._onPreConnect);
this.element.addEventListener('ux:map:connect', this._onConnect);
this.element.addEventListener('ux:map:marker:before-create', this._onMarkerBeforeConnect);
this.element.addEventListener('ux:map:marker:before-create', this._onMarkerBeforeCreate);
this.element.addEventListener('ux:map:marker:after-create', this._onMarkerAfterCreate);
this.element.addEventListener('ux:map:info-window:before-create', this._onInfoWindowBeforeConnect);
this.element.addEventListener('ux:map:info-window:before-create', this._onInfoWindowBeforeCreate);
this.element.addEventListener('ux:map:info-window:after-create', this._onInfoWindowAfterCreate);
}
disconnect() {
// You should always remove listeners when the controller is disconnected to avoid side effects
this.element.removeEventListener('ux:map:pre-connect', this._onPreConnect);
this.element.removeEventListener('ux:map:connect', this._onConnect);
this.element.removeEventListener('ux:map:marker:before-create', this._onMarkerBeforeConnect);
this.element.removeEventListener('ux:map:marker:before-create', this._onMarkerBeforeCreate);
this.element.removeEventListener('ux:map:marker:after-create', this._onMarkerAfterCreate);
this.element.removeEventListener('ux:map:info-window:before-create', this._onInfoWindowBeforeConnect);
this.element.removeEventListener('ux:map:info-window:before-create', this._onInfoWindowBeforeCreate);
this.element.removeEventListener('ux:map:info-window:after-create', this._onInfoWindowAfterCreate);
}
Expand All @@ -159,7 +159,7 @@ Symfony UX Map allows you to extend its default behavior using a custom Stimulus
console.log(event.detail.infoWindows);
}
_onMarkerBeforeConnect(event) {
_onMarkerBeforeCreate(event) {
// The marker is not created yet
// You can use this event to configure the marker before it is created
console.log(event.detail.definition);
Expand All @@ -171,7 +171,7 @@ Symfony UX Map allows you to extend its default behavior using a custom Stimulus
console.log(event.detail.marker);
}
_onInfoWindowBeforeConnect(event) {
_onInfoWindowBeforeCreate(event) {
// The infoWindow is not created yet
// You can use this event to configure the infoWindow before it is created
console.log(event.detail.definition);
Expand Down

0 comments on commit eceb244

Please sign in to comment.