|
@@ -3,6 +3,7 @@ import { lineService } from "./Service/LineService.js";
|
|
|
import { pointService } from "./Service/PointService.js";
|
|
|
import { imageService } from "./Service/ImageService.js";
|
|
|
import VectorCategory from "./enum/VectorCategory.js";
|
|
|
+import { coordinate } from "./Coordinate.js";
|
|
|
|
|
|
export default class Load {
|
|
|
constructor(layer) {
|
|
@@ -12,13 +13,15 @@ export default class Load {
|
|
|
this.newVectorId = null;
|
|
|
}
|
|
|
|
|
|
- load(dataLocal, data3d) {
|
|
|
+ async load(dataLocal, data3d) {
|
|
|
if (dataLocal) {
|
|
|
dataService.vectorData = JSON.parse(JSON.stringify(dataLocal));
|
|
|
}
|
|
|
if (data3d) {
|
|
|
if (data3d.backImage) {
|
|
|
- imageService.create(data3d.backImage);
|
|
|
+ let bgImg = imageService.create(data3d.backImage);
|
|
|
+ bgImg.setCenter(coordinate.center);
|
|
|
+ await bgImg.setImageData();
|
|
|
}
|
|
|
if (data3d.baseLines) {
|
|
|
for (let i = 0; i < data3d.baseLines.length; ++i) {
|