mirror of https://gitee.com/antv-l7/antv-l7
fix: 修复 isOpen 报错问题 (#1537)
* docs: 场景 Scene API 补充 addPopup 和 removePopup 方法说明 * fix: 修复 Popup title 设置先后问题 * fix: 修复 L7 Popup isOpen 报错问题 Co-authored-by: yanxiong <oujinhui.ojh@antgroup.com>
This commit is contained in:
parent
bbce4a205e
commit
4fa5a324db
|
@ -346,7 +346,7 @@ export default class Marker extends EventEmitter {
|
|||
lngLat: this.lngLat,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
private addDragHandler(e: MouseEvent) {
|
||||
return null
|
||||
|
|
|
@ -134,7 +134,7 @@ export default class Popup<O extends IPopupOption = IPopupOption>
|
|||
|
||||
// 移除popup
|
||||
public remove() {
|
||||
if (!this.isOpen()) {
|
||||
if (!this?.isOpen()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ export default class PopupService implements IPopupService {
|
|||
}
|
||||
|
||||
public removePopup(popup: IPopup): void {
|
||||
if (popup.isOpen()) {
|
||||
if (popup?.isOpen()) {
|
||||
popup.remove();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue