Skip to content

Commit

Permalink
fix infowindow Cannot scroll when customizing (#2203)
Browse files Browse the repository at this point in the history
* fix infowindow Cannot scroll when customizing

* fix lint
  • Loading branch information
deyihu authored Jan 30, 2024
1 parent 1a7712c commit eda19c8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/ui/InfoWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ class InfoWindow extends UIComponent {
const isFunc = isFunction(this.options['content']);
const isStr = isString(this.options['content']);
if (this.options['custom']) {
const oldDom = this.getDOM();
let newDom;
this._bindDomEvents(oldDom, 'off');
if (isStr || isFunc) {
const dom = createEl('div');
if (isStr) {
Expand All @@ -153,11 +156,13 @@ class InfoWindow extends UIComponent {
//dymatic render dom content
this.options['content'].bind(this)(dom);
}
return dom;
newDom = dom;
} else {
this._replaceTemplate(this.options['content']);
return this.options['content'];
newDom = this.options['content'];
}
this._bindDomEvents(newDom, 'on');
return newDom;
}
this._bindDomEvents(this.getDOM(), 'off');
const dom = createEl('div');
Expand Down

0 comments on commit eda19c8

Please sign in to comment.