mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-20 01:22:52 +08:00
fix event listener
This commit is contained in:
parent
22aae7422e
commit
55a7f1f377
@ -704,8 +704,9 @@ export class GoogleMapsPolyline {
|
||||
addEventListener(event: any): Observable<any> {
|
||||
return new Observable(
|
||||
(observer) => {
|
||||
this._objectInstance.addEventListener(event, observer.next);
|
||||
return () => this._objectInstance.removeEventListener(event, observer.next);
|
||||
let cb = data => observer.next(data);
|
||||
this._objectInstance.addEventListener(event, cb);
|
||||
return () => this._objectInstance.removeEventListener(event, cb);
|
||||
}
|
||||
);
|
||||
}
|
||||
@ -787,8 +788,9 @@ export class GoogleMapsPolygon {
|
||||
addEventListener(event: any): Observable<any> {
|
||||
return new Observable(
|
||||
(observer) => {
|
||||
this._objectInstance.addEventListener(event, observer.next);
|
||||
return () => this._objectInstance.removeEventListener(event, observer.next);
|
||||
let cb = data => observer.next(data);
|
||||
this._objectInstance.addEventListener(event, cb);
|
||||
return () => this._objectInstance.removeEventListener(event, cb);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user