Skip to content

Commit

Permalink
fix: simplify cluster prop naming
Browse files Browse the repository at this point in the history
  • Loading branch information
frodrigo committed Nov 8, 2023
1 parent 66aff2f commit 407a363
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions components/Map/MapBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export default defineNuxtComponent({
features: MapPoi[],
clusterPropertiesValues: string[],
clusterPropertiesKeyExpression: maplibregl.ExpressionSpecification,
noCluster?: boolean
cluster?: boolean
) {
if (this.map.getLayer(POI_LAYER)) {
this.map.removeLayer(POI_LAYER)
Expand Down Expand Up @@ -256,7 +256,7 @@ export default defineNuxtComponent({
this.map.addSource(POI_SOURCE, {
type: 'geojson',
cluster: !noCluster,
cluster: cluster,
clusterRadius: 32,
clusterProperties: clusterProps,
clusterMaxZoom: 15,
Expand Down
6 changes: 3 additions & 3 deletions components/Map/MapPois.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ export default defineNuxtComponent({
type: Boolean,
default: false,
},
noCluster: {
cluster: {
type: Boolean,
default: false,
default: true,
},
},
setup() {
Expand Down Expand Up @@ -148,7 +148,7 @@ export default defineNuxtComponent({
['get', 'color_fill', ['get', 'display']],
'#000000',
],
this.noCluster
this.cluster
)
if (this.featureIds) {
Expand Down
1 change: 0 additions & 1 deletion components/PoisDetails/PoiDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
:color-fill="colorFill"
:color-line="colorLine"
:favorites-mode-enabled="favoritesModeEnabled"
:no-cluster="true"
/>
</template>

Expand Down
6 changes: 1 addition & 5 deletions components/PoisDetails/Route/RouteMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:feature-ids="[poiId]"
:fullscreen-control="true"
:off-map-attribution="true"
:no-cluster="noCluster"
:cluster="false"
/>
<div class="detail-wrapper">
<div v-if="points.length > 0" class="detail-left">
Expand Down Expand Up @@ -83,10 +83,6 @@ export default defineNuxtComponent({
type: Boolean,
required: true,
},
noCluster: {
type: Boolean,
required: false,
},
},
data(): {
Expand Down

0 comments on commit 407a363

Please sign in to comment.