diff --git a/src/components/draw-app/properties/CurvatureKiloMarkerProperty.vue b/src/components/draw-app/properties/CurvatureKiloMarkerProperty.vue index ef4aec8..9279d78 100644 --- a/src/components/draw-app/properties/CurvatureKiloMarkerProperty.vue +++ b/src/components/draw-app/properties/CurvatureKiloMarkerProperty.vue @@ -31,61 +31,57 @@ const directionOptions = [ label="id" hint="" /> - - + + + + + + diff --git a/src/components/draw-app/properties/SlopeKiloMarkerProperty.vue b/src/components/draw-app/properties/SlopeKiloMarkerProperty.vue index 0bac7cd..aa6e0cd 100644 --- a/src/components/draw-app/properties/SlopeKiloMarkerProperty.vue +++ b/src/components/draw-app/properties/SlopeKiloMarkerProperty.vue @@ -25,61 +25,57 @@ const directionOptions = [ diff --git a/src/drawApp/graphics/CurvatureKiloMarkerInteraction.ts b/src/drawApp/graphics/CurvatureKiloMarkerInteraction.ts index 12f43db..050c98c 100644 --- a/src/drawApp/graphics/CurvatureKiloMarkerInteraction.ts +++ b/src/drawApp/graphics/CurvatureKiloMarkerInteraction.ts @@ -32,6 +32,11 @@ export class CurvatureKiloMarkerData this.data.code = v; } get kilometerSystem(): KilometerSystem[] { + if (this.data.kilometerSystem.length < 2) { + this.data.kilometerSystem = Array(2).map( + () => new graphicData.KilometerSystem() + ); + } return this.data.kilometerSystem; } set kilometerSystem(value: KilometerSystem[]) { diff --git a/src/drawApp/graphics/SlopeKiloMarkerInteraction.ts b/src/drawApp/graphics/SlopeKiloMarkerInteraction.ts index 76f0aca..2c4c832 100644 --- a/src/drawApp/graphics/SlopeKiloMarkerInteraction.ts +++ b/src/drawApp/graphics/SlopeKiloMarkerInteraction.ts @@ -32,6 +32,11 @@ export class SlopeKiloMarkerData this.data.code = v; } get kilometerSystem(): KilometerSystem[] { + if (this.data.kilometerSystem.length < 2) { + this.data.kilometerSystem = Array(2).map( + () => new graphicData.KilometerSystem() + ); + } return this.data.kilometerSystem; } set kilometerSystem(value: KilometerSystem[]) { diff --git a/src/drawApp/graphics/TurnoutInteraction.ts b/src/drawApp/graphics/TurnoutInteraction.ts index f4d78ae..ceef394 100644 --- a/src/drawApp/graphics/TurnoutInteraction.ts +++ b/src/drawApp/graphics/TurnoutInteraction.ts @@ -232,8 +232,8 @@ export class TurnoutData extends GraphicDataBase implements ITurnoutData { } get kilometerSystem(): KilometerSystem[] { if (this.data.kilometerSystem.length < 2) { - this.data.kilometerSystem = Array(2).fill( - new graphicData.KilometerSystem() + this.data.kilometerSystem = Array(2).map( + () => new graphicData.KilometerSystem() ); } return this.data.kilometerSystem;