Skip to content

Commit

Permalink
Merge pull request #163 from Disfactory/release/2.6.0
Browse files Browse the repository at this point in the history
Release 2.6.0
  • Loading branch information
Yukaii authored Aug 10, 2022
2 parents 6f62f19 + 0ab73ce commit 5528d23
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14
6 changes: 5 additions & 1 deletion src/components/FactoryDetailPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,11 @@ export default createComponent({
if (appState.factoryData) {
const { townname, sectname, sectcode, landcode } = appState.factoryData
// 白鷺段(1005)817地號
return `${townname} ${sectname} (${sectcode}) ${landcode}地號`
if (townname && sectname && sectcode && landcode) {
return `${townname} ${sectname} (${sectcode}) ${landcode}地號`
} else {
return '擷取中'
}
} else {
return ''
}
Expand Down
6 changes: 4 additions & 2 deletions src/components/UpdateFactorySteps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
:valid="imagesValid"
:submit="submitImageUpload"
:formState="imageUploadFormState"
submitText="確認新增照片"
:submitText="imageSubmitting? '照片上傳中...' : '確認新增照片'"
disableProgressiveUpload
/>

Expand Down Expand Up @@ -295,7 +295,9 @@ export default createComponent({
isCurrentFieldValid,
factoryTypeItems,
submitUpdateFactory
submitUpdateFactory,
imageSubmitting
}
}
})
Expand Down
10 changes: 5 additions & 5 deletions src/lib/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class MapFactoryController {
}

getFactoriesLayerForStatus (factoryStatus: FactoryDisplayStatusType) {
let CLUSTER_DISTANCE = 50;
const CLUSTER_DISTANCE = 50
if (!this._factoriesLayerStatusMap[`${factoryStatus}`]) {
this._factoriesLayerStatusMap[`${factoryStatus}`] = new VectorSource({ features: [] })
const clusterSource = new Cluster({
Expand All @@ -137,13 +137,13 @@ export class MapFactoryController {
const vectorLayer = new VectorLayer({
source: clusterSource,
zIndex: 3,
style: (feature,resolution) => {
let zoom = this.mapInstance.map.getView().getZoom()!;
style: (feature, resolution) => {
const zoom = this.mapInstance.map.getView().getZoom()!

if (zoom > 16) {
if (clusterSource.getDistance() !== 0) clusterSource.setDistance(0);
if (clusterSource.getDistance() !== 0) clusterSource.setDistance(0)
} else {
if (clusterSource.getDistance() !== CLUSTER_DISTANCE) clusterSource.setDistance(CLUSTER_DISTANCE);
if (clusterSource.getDistance() !== CLUSTER_DISTANCE) clusterSource.setDistance(CLUSTER_DISTANCE)
}

const features = feature.get('features')
Expand Down

0 comments on commit 5528d23

Please sign in to comment.