bugfix - 公里标数据更新问题
This commit is contained in:
parent
003557a2fa
commit
4ddcb5cccc
@ -1,6 +1,6 @@
|
||||
import { type GraphicDataBase } from 'src/drawApp/graphics/GraphicDataBase';
|
||||
import { IDrawApp } from 'src/jl-graphic';
|
||||
import { onMounted, onUnmounted, reactive } from 'vue';
|
||||
import { onMounted, onUnmounted, reactive, toRaw } from 'vue';
|
||||
|
||||
export function useFormData<T extends GraphicDataBase>(
|
||||
source: T,
|
||||
@ -19,7 +19,7 @@ export function useFormData<T extends GraphicDataBase>(
|
||||
function onUpdate() {
|
||||
const graphic = app.selectedGraphics[0];
|
||||
if (graphic) {
|
||||
app.updateGraphicAndRecord(graphic, data);
|
||||
app.updateGraphicAndRecord(graphic, toRaw(data));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,12 +33,12 @@ export class CurvatureKiloMarkerData
|
||||
}
|
||||
get kilometerSystem(): KilometerSystem {
|
||||
if (!this.data.kilometerSystem[0]) {
|
||||
this.data.kilometerSystem[0] = new graphicData.KilometerSystem();
|
||||
this.data.kilometerSystem = [new graphicData.KilometerSystem()];
|
||||
}
|
||||
return this.data.kilometerSystem[0];
|
||||
}
|
||||
set kilometerSystem(v: KilometerSystem) {
|
||||
this.data.kilometerSystem[0] = new graphicData.KilometerSystem(v);
|
||||
this.data.kilometerSystem = [new graphicData.KilometerSystem(v)];
|
||||
}
|
||||
|
||||
clone(): CurvatureKiloMarkerData {
|
||||
|
@ -33,12 +33,12 @@ export class SlopeKiloMarkerData
|
||||
}
|
||||
get kilometerSystem(): KilometerSystem {
|
||||
if (!this.data.kilometerSystem[0]) {
|
||||
this.data.kilometerSystem[0] = new graphicData.KilometerSystem();
|
||||
this.data.kilometerSystem = [new graphicData.KilometerSystem()];
|
||||
}
|
||||
return this.data.kilometerSystem[0];
|
||||
}
|
||||
set kilometerSystem(v: KilometerSystem) {
|
||||
this.data.kilometerSystem[0] = new graphicData.KilometerSystem(v);
|
||||
this.data.kilometerSystem = [new graphicData.KilometerSystem(v)];
|
||||
}
|
||||
|
||||
clone(): SlopeKiloMarkerData {
|
||||
|
@ -242,12 +242,12 @@ export class TurnoutData extends GraphicDataBase implements ITurnoutData {
|
||||
}
|
||||
get kilometerSystem(): KilometerSystem {
|
||||
if (!this.data.kilometerSystem[0]) {
|
||||
this.data.kilometerSystem[0] = new graphicData.KilometerSystem();
|
||||
this.data.kilometerSystem = [new graphicData.KilometerSystem()];
|
||||
}
|
||||
return this.data.kilometerSystem[0];
|
||||
}
|
||||
set kilometerSystem(v: KilometerSystem) {
|
||||
this.data.kilometerSystem[0] = new graphicData.KilometerSystem(v);
|
||||
this.data.kilometerSystem = [new graphicData.KilometerSystem(v)];
|
||||
}
|
||||
get index(): number {
|
||||
return this.data.index;
|
||||
|
Loading…
Reference in New Issue
Block a user