@@ -91,7 +91,7 @@ export default abstract class<
91
91
protected polylines: Array < Polyline > = [ ] ;
92
92
93
93
connect ( ) {
94
- const { center, zoom, options, markers, polygons, fitBoundsToMarkers } = this . viewValue ;
94
+ const { center, zoom, options, markers, polygons, polylines , fitBoundsToMarkers } = this . viewValue ;
95
95
96
96
this . dispatchEvent ( 'pre-connect' , { options } ) ;
97
97
@@ -156,16 +156,22 @@ export default abstract class<
156
156
protected abstract doCreatePolygon ( definition : PolygonDefinition < PolygonOptions , InfoWindowOptions > ) : Polygon ;
157
157
protected abstract doCreatePolyline ( definition : PolylineDefinition < PolylineOptions , InfoWindowOptions > ) : Polyline ;
158
158
159
- protected createInfoWindow ( {
160
- definition,
161
- element,
162
- } : {
163
- definition :
164
- | MarkerDefinition < MarkerOptions , InfoWindowOptions > [ 'infoWindow' ]
165
- | PolygonDefinition < PolygonOptions , InfoWindowOptions > [ 'infoWindow' ]
166
- | PolylineDefinition < PolylineOptions , InfoWindowOptions > [ 'infoWindow' ] ;
167
- element : Marker | Polygon | Polyline ;
168
- } ) : InfoWindow {
159
+ protected abstract createInfoWindow (
160
+ args :
161
+ | {
162
+ definition : MarkerDefinition < MarkerOptions , InfoWindowOptions > [ 'infoWindow' ] ;
163
+ element : Marker ;
164
+ }
165
+ | {
166
+ definition : PolygonDefinition < PolygonOptions , InfoWindowOptions > [ 'infoWindow' ] ;
167
+ element : Polygon ;
168
+ }
169
+ | {
170
+ definition : PolylineDefinition < PolylineOptions , InfoWindowOptions > [ 'infoWindow' ] ;
171
+ element : Polyline ;
172
+ }
173
+ ) : InfoWindow {
174
+ const { definition, element } = args ;
169
175
this . dispatchEvent ( 'info-window:before-create' , { definition, element } ) ;
170
176
const infoWindow = this . doCreateInfoWindow ( { definition, element } ) ;
171
177
this . dispatchEvent ( 'info-window:after-create' , { infoWindow, element } ) ;
@@ -175,22 +181,21 @@ export default abstract class<
175
181
return infoWindow ;
176
182
}
177
183
178
- protected abstract doCreateInfoWindow ( {
179
- definition,
180
- element,
181
- } :
182
- | {
183
- definition : MarkerDefinition < MarkerOptions , InfoWindowOptions > [ 'infoWindow' ] ;
184
- element: Marker ;
185
- }
186
- | {
187
- definition: PolygonDefinition < PolygonOptions , InfoWindowOptions > [ 'infoWindow' ] ;
188
- element: Polygon ;
189
- }
190
- | {
191
- definition: PolylineDefinition < PolylineOptions , InfoWindowOptions > [ 'infoWindow' ] ;
192
- element: Polyline ;
193
- } ) : InfoWindow ;
184
+ protected abstract doCreateInfoWindow (
185
+ args :
186
+ | {
187
+ definition : MarkerDefinition < MarkerOptions , InfoWindowOptions > [ 'infoWindow' ] ;
188
+ element : Marker ;
189
+ }
190
+ | {
191
+ definition : PolygonDefinition < PolygonOptions , InfoWindowOptions > [ 'infoWindow' ] ;
192
+ element : Polygon ;
193
+ }
194
+ | {
195
+ definition : PolylineDefinition < PolylineOptions , InfoWindowOptions > [ 'infoWindow' ] ;
196
+ element : Polyline ;
197
+ }
198
+ ) : InfoWindow ;
194
199
195
200
protected abstract doFitBoundsToMarkers ( ) : void ;
196
201
0 commit comments