(
map: google.maps.Map,
rectangleConstructor: typeof google.maps.Rectangle,
options: google.maps.RectangleOptions,
)
| 167 | } |
| 168 | |
| 169 | private _initialize( |
| 170 | map: google.maps.Map, |
| 171 | rectangleConstructor: typeof google.maps.Rectangle, |
| 172 | options: google.maps.RectangleOptions, |
| 173 | ) { |
| 174 | // Create the object outside the zone so its events don't trigger change detection. |
| 175 | // We'll bring it back in inside the `MapEventManager` only for the events that the |
| 176 | // user has subscribed to. |
| 177 | this._ngZone.runOutsideAngular(() => { |
| 178 | this.rectangle = new rectangleConstructor(options); |
| 179 | this._assertInitialized(); |
| 180 | this.rectangle.setMap(map); |
| 181 | this._eventManager.setTarget(this.rectangle); |
| 182 | this.rectangleInitialized.emit(this.rectangle); |
| 183 | this._watchForOptionsChanges(); |
| 184 | this._watchForBoundsChanges(); |
| 185 | }); |
| 186 | } |
| 187 | |
| 188 | ngOnDestroy() { |
| 189 | this._eventManager.destroy(); |
no test coverage detected