Skip to content

Commit 8a512a1

Browse files
committed
[Map] Fix default values of Stimulus Map Controller
1 parent ec4cfa1 commit 8a512a1

File tree

5 files changed

+58
-40
lines changed

5 files changed

+58
-40
lines changed

src/Map/assets/dist/abstract_map_controller.d.ts

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,32 @@ export type InfoWindowDefinition<InfoWindowOptions> = {
4040
export type InfoWindowWithoutPositionDefinition<InfoWindowOptions> = Omit<InfoWindowDefinition<InfoWindowOptions>, 'position'>;
4141
export default abstract class<MapOptions, Map, MarkerOptions, Marker, InfoWindowOptions, InfoWindow, PolygonOptions, Polygon, PolylineOptions, Polyline> extends Controller<HTMLElement> {
4242
static values: {
43-
providerOptions: ObjectConstructor;
44-
center: ObjectConstructor;
45-
zoom: NumberConstructor;
46-
fitBoundsToMarkers: BooleanConstructor;
47-
markers: ArrayConstructor;
48-
polygons: ArrayConstructor;
49-
polylines: ArrayConstructor;
50-
options: ObjectConstructor;
43+
providerOptions: {
44+
type: ObjectConstructor;
45+
};
46+
center: {
47+
type: ObjectConstructor;
48+
default: null;
49+
};
50+
zoom: {
51+
type: NumberConstructor;
52+
default: null;
53+
};
54+
fitBoundsToMarkers: {
55+
type: BooleanConstructor;
56+
};
57+
markers: {
58+
type: ArrayConstructor;
59+
};
60+
polygons: {
61+
type: ArrayConstructor;
62+
};
63+
polylines: {
64+
type: ArrayConstructor;
65+
};
66+
options: {
67+
type: ObjectConstructor;
68+
};
5169
};
5270
centerValue: Point | null;
5371
zoomValue: number | null;

src/Map/assets/dist/abstract_map_controller.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ class default_1 extends Controller {
8888
}
8989
}
9090
default_1.values = {
91-
providerOptions: Object,
92-
center: Object,
93-
zoom: Number,
94-
fitBoundsToMarkers: Boolean,
95-
markers: Array,
96-
polygons: Array,
97-
polylines: Array,
98-
options: Object,
91+
providerOptions: { type: Object },
92+
center: { type: Object, default: null },
93+
zoom: { type: Number, default: null },
94+
fitBoundsToMarkers: { type: Boolean },
95+
markers: { type: Array },
96+
polygons: { type: Array },
97+
polylines: { type: Array },
98+
options: { type: Object },
9999
};
100100

101101
export { default_1 as default };

src/Map/assets/src/abstract_map_controller.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ export default abstract class<
9494
Polyline,
9595
> extends Controller<HTMLElement> {
9696
static values = {
97-
providerOptions: Object,
98-
center: Object,
99-
zoom: Number,
100-
fitBoundsToMarkers: Boolean,
101-
markers: Array,
102-
polygons: Array,
103-
polylines: Array,
104-
options: Object,
97+
providerOptions: { type: Object },
98+
center: { type: Object, default: null },
99+
zoom: { type: Number, default: null },
100+
fitBoundsToMarkers: { type: Boolean },
101+
markers: { type: Array },
102+
polygons: { type: Array },
103+
polylines: { type: Array },
104+
options: { type: Object },
105105
};
106106

107107
declare centerValue: Point | null;

src/Map/src/Bridge/Google/assets/dist/map_controller.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ class default_1 extends Controller {
8989
}
9090
}
9191
default_1.values = {
92-
providerOptions: Object,
93-
center: Object,
94-
zoom: Number,
95-
fitBoundsToMarkers: Boolean,
96-
markers: Array,
97-
polygons: Array,
98-
polylines: Array,
99-
options: Object,
92+
providerOptions: { type: Object },
93+
center: { type: Object, default: null },
94+
zoom: { type: Number, default: null },
95+
fitBoundsToMarkers: { type: Boolean },
96+
markers: { type: Array },
97+
polygons: { type: Array },
98+
polylines: { type: Array },
99+
options: { type: Object },
100100
};
101101

102102
let _google;

src/Map/src/Bridge/Leaflet/assets/dist/map_controller.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ class default_1 extends Controller {
9090
}
9191
}
9292
default_1.values = {
93-
providerOptions: Object,
94-
center: Object,
95-
zoom: Number,
96-
fitBoundsToMarkers: Boolean,
97-
markers: Array,
98-
polygons: Array,
99-
polylines: Array,
100-
options: Object,
93+
providerOptions: { type: Object },
94+
center: { type: Object, default: null },
95+
zoom: { type: Number, default: null },
96+
fitBoundsToMarkers: { type: Boolean },
97+
markers: { type: Array },
98+
polygons: { type: Array },
99+
polylines: { type: Array },
100+
options: { type: Object },
101101
};
102102

103103
class map_controller extends default_1 {

0 commit comments

Comments
 (0)