|
@@ -1,147 +1,21 @@
|
|
|
import { genBound, onlyId } from "@/utils/shared";
|
|
|
-import { AIExposeData } from "../dialog/ai";
|
|
|
import { Draw } from "../components/container/use-draw";
|
|
|
-import { SceneFloor } from "./platform-resource";
|
|
|
+import { SceneResource, getResource } from "./platform-resource";
|
|
|
import { getBaseItem } from "@/core/components/util";
|
|
|
import { LineData, defaultStyle } from "@/core/components/line";
|
|
|
import {
|
|
|
getInitCtx,
|
|
|
normalLineData,
|
|
|
} from "@/core/components/line/attach-server";
|
|
|
-import {
|
|
|
- getIconStyle,
|
|
|
- defaultStyle as iconDefaultStyle,
|
|
|
-} from "@/core/components/icon";
|
|
|
+import { getIconStyle, IconData } from "@/core/components/icon";
|
|
|
import { defaultStyle as textDefaultStyle } from "@/core/components/text";
|
|
|
import { Transform } from "konva/lib/Util";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
import { ImageData } from "@/core/components/image";
|
|
|
-import { Size } from "@/utils/math";
|
|
|
+import { Pos, Size } from "@/utils/math";
|
|
|
import { watchEffect } from "vue";
|
|
|
import { TextData } from "@/core/components/text";
|
|
|
-
|
|
|
-const scaleResource = (info: AIExposeData, scale: number) => {
|
|
|
- console.log(info.taggings);
|
|
|
- const floors = info.floors.map((item) => ({
|
|
|
- ...item,
|
|
|
- geos: item.geos.map((geo) =>
|
|
|
- geo.map((p) => {
|
|
|
- return { x: p.x * scale, y: p.y * scale, z: p.z && p.z * scale };
|
|
|
- })
|
|
|
- ),
|
|
|
- box: item.box && {
|
|
|
- ...item.box,
|
|
|
- bound: {
|
|
|
- x_min: item.box.bound.x_min * scale,
|
|
|
- x_max: item.box.bound.x_max * scale,
|
|
|
- y_min: item.box.bound.y_min * scale,
|
|
|
- y_max: item.box.bound.y_max * scale,
|
|
|
- z_min: item.box.bound.z_min * scale,
|
|
|
- z_max: item.box.bound.z_max * scale,
|
|
|
- },
|
|
|
- },
|
|
|
- }));
|
|
|
-
|
|
|
- const taggings = info.taggings
|
|
|
- .map((item) => {
|
|
|
- if (!item.pixel) {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- position: {
|
|
|
- x: item.position.x * scale,
|
|
|
- y: item.position.y * scale,
|
|
|
- z: item.position.z && item.position.z * scale,
|
|
|
- },
|
|
|
- size: item.size
|
|
|
- ? {
|
|
|
- width: item.size!.width * scale,
|
|
|
- height: item.size!.height * scale,
|
|
|
- }
|
|
|
- : undefined,
|
|
|
- };
|
|
|
- } else if (item.subgroup !== undefined) {
|
|
|
- const floor = floors.find((floor) => floor.subgroup === item.subgroup);
|
|
|
- if (!floor || !floor.box) return;
|
|
|
- const w = floor.box.bound.x_max - floor.box.bound.x_min;
|
|
|
- const h = floor.box.bound.y_max - floor.box.bound.y_min;
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- position: {
|
|
|
- x: floor.box.bound.x_min + w * item.position.x,
|
|
|
- y: floor.box.bound.y_min + h * item.position.y,
|
|
|
- z: floor.box.bound.z_min + 0.001,
|
|
|
- },
|
|
|
- size: item.size
|
|
|
- ? {
|
|
|
- width: item.size!.width * w,
|
|
|
- height: item.size!.height * h,
|
|
|
- }
|
|
|
- : undefined,
|
|
|
- };
|
|
|
- }
|
|
|
- })
|
|
|
- .filter((item) => !!item);
|
|
|
-
|
|
|
- return {
|
|
|
- ...info,
|
|
|
- taggings,
|
|
|
- floors,
|
|
|
- };
|
|
|
-};
|
|
|
-
|
|
|
-const getResourceLayers = (data: AIExposeData) => {
|
|
|
- return data.floors
|
|
|
- .map((floor) => {
|
|
|
- let box: SceneFloor["box"];
|
|
|
- // if (true) {
|
|
|
- if (!floor.box || !floor.box.bound.x_max || !floor.box.bound.z_max) {
|
|
|
- const xs = floor.geos.flatMap((item) => item.map((p) => p.x));
|
|
|
- const ys = floor.geos.flatMap((item) => item.map((p) => p.y));
|
|
|
- const zs = floor.geos.flatMap((item) => item.map((p) => p.z));
|
|
|
- box = {
|
|
|
- bound: {
|
|
|
- x_min: Math.min(...xs),
|
|
|
- x_max: Math.max(...xs),
|
|
|
- y_min: Math.min(...ys),
|
|
|
- y_max: Math.max(...ys),
|
|
|
- z_min: Math.min(...zs),
|
|
|
- z_max: Math.max(...zs),
|
|
|
- },
|
|
|
- scale: 1,
|
|
|
- rotate: 0,
|
|
|
- };
|
|
|
-
|
|
|
- if (isNaN(box.bound.z_min) || isNaN(box.bound.z_max)) {
|
|
|
- box.bound.z_min = -999999;
|
|
|
- box.bound.z_max = 999999;
|
|
|
- }
|
|
|
- floor.box = box;
|
|
|
- } else {
|
|
|
- box = floor.box;
|
|
|
- }
|
|
|
- box.bound.z_min = -999999;
|
|
|
- box.bound.z_max = 999999;
|
|
|
-
|
|
|
- return {
|
|
|
- ...floor,
|
|
|
- box,
|
|
|
- taggings: data.taggings
|
|
|
- .filter((item) => {
|
|
|
- return (
|
|
|
- item.position.z === undefined ||
|
|
|
- (item.position.z >= box.bound.z_min &&
|
|
|
- item.position.z <= box.bound.z_max)
|
|
|
- );
|
|
|
- })
|
|
|
- .map((item) => ({
|
|
|
- ...item,
|
|
|
- position: { x: item.position.x, y: item.position.y },
|
|
|
- })),
|
|
|
- geos: floor.geos.map((item) => item.map((p) => ({ x: p.x, y: p.y }))),
|
|
|
- };
|
|
|
- })
|
|
|
- .filter((floor) => floor.taggings.length > 0 || floor.geos.length > 0);
|
|
|
-};
|
|
|
+import { SelectSceneData } from "../dialog/ai";
|
|
|
|
|
|
const getSizePlaceBoxImage = ({ width, height }: Size) => {
|
|
|
const borderWidth = 10;
|
|
@@ -169,32 +43,25 @@ const getSizePlaceBoxImage = ({ width, height }: Size) => {
|
|
|
return canvas.toDataURL(); // 返回图片的Data URL字符串
|
|
|
};
|
|
|
|
|
|
-const drawLayerResource = async (
|
|
|
- layerResource: ReturnType<typeof getResourceLayers>[number],
|
|
|
- draw: Draw
|
|
|
-) => {
|
|
|
- const bound = genBound();
|
|
|
- const images: any[] = [];
|
|
|
- const texts: TextData[] = [];
|
|
|
- const createTime = Date.now();
|
|
|
-
|
|
|
+const getCoverShapes = (cover: SceneResource["cover"]) => {
|
|
|
let geo: LineData = {
|
|
|
...getBaseItem(),
|
|
|
lines: [],
|
|
|
points: [],
|
|
|
polygon: [],
|
|
|
- zIndex: 0,
|
|
|
- createTime: createTime,
|
|
|
+ zIndex: -1,
|
|
|
+ createTime: Date.now(),
|
|
|
};
|
|
|
|
|
|
- const geoCtx = getInitCtx();
|
|
|
-
|
|
|
- layerResource.geos.forEach((item) => {
|
|
|
- bound.update(item);
|
|
|
- if (item.length < 1) return;
|
|
|
+ if (!cover) {
|
|
|
+ return { geo };
|
|
|
+ }
|
|
|
|
|
|
+ const geoCtx = getInitCtx();
|
|
|
+ cover.geos.forEach((item) => {
|
|
|
let a: string = onlyId(),
|
|
|
b: string;
|
|
|
+
|
|
|
let i = 0;
|
|
|
for (i = 0; i < item.length - 1; i++) {
|
|
|
b = onlyId();
|
|
@@ -213,214 +80,212 @@ const drawLayerResource = async (
|
|
|
});
|
|
|
geo = normalLineData(geo, geoCtx);
|
|
|
|
|
|
- let thumb: ImageData;
|
|
|
- if (layerResource.thumb) {
|
|
|
- const box = layerResource.box;
|
|
|
- const width = box.bound.x_max - box.bound.x_min;
|
|
|
- const height = box.bound.y_max - box.bound.y_min;
|
|
|
- const mat = new Transform().translate(
|
|
|
- box.bound.x_min + width / 2,
|
|
|
- box.bound.y_min + height / 2
|
|
|
- );
|
|
|
- // .rotate(-MathUtils.degToRad(floor.box.rotate));
|
|
|
- thumb = {
|
|
|
+ if (!cover.thumb) return { geo };
|
|
|
+
|
|
|
+ const width = cover.bound.x_max - cover.bound.x_min;
|
|
|
+ const height = cover.bound.y_max - cover.bound.y_min;
|
|
|
+ const mat = new Transform().translate(
|
|
|
+ cover.bound.x_min + width / 2,
|
|
|
+ cover.bound.y_min + height / 2
|
|
|
+ );
|
|
|
+
|
|
|
+ const thumb: ImageData = {
|
|
|
+ ...getBaseItem(),
|
|
|
+ createTime: geo.createTime,
|
|
|
+ url: cover.thumb,
|
|
|
+ mat: mat.m,
|
|
|
+ width,
|
|
|
+ height,
|
|
|
+ cornerRadius: 0,
|
|
|
+ zIndex: -2,
|
|
|
+ };
|
|
|
+
|
|
|
+ return { geo, thumb };
|
|
|
+};
|
|
|
+
|
|
|
+const getTaggingShapes = async (taggings: SceneResource["taggings"]) => {
|
|
|
+ const icons: IconData[] = [];
|
|
|
+ const images: ImageData[] = [];
|
|
|
+ const texts: TextData[] = [];
|
|
|
+ const now = Date.now();
|
|
|
+ const reqs: Promise<any>[] = [];
|
|
|
+
|
|
|
+ for (let ndx = 0; ndx < taggings.length; ndx++) {
|
|
|
+ const item = taggings[ndx];
|
|
|
+ const mat = new Transform(item.mat);
|
|
|
+
|
|
|
+ if (!item.mat && item.position) {
|
|
|
+ mat.translate(item.position.x, item.position.y);
|
|
|
+ item.rotate && mat.rotate(item.rotate);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item.isText) {
|
|
|
+ texts.push({
|
|
|
+ ...getBaseItem(),
|
|
|
+ ...textDefaultStyle,
|
|
|
+ content: item.url,
|
|
|
+ zIndex: 1,
|
|
|
+ mat: mat.m,
|
|
|
+ });
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ const shape = {
|
|
|
...getBaseItem(),
|
|
|
- createTime: createTime - 1,
|
|
|
- url: layerResource.thumb,
|
|
|
+ ...(item.size || { width: 100, height: 100 }),
|
|
|
+ name: item.name,
|
|
|
+ createTime: now + ndx,
|
|
|
+ url: item.url,
|
|
|
mat: mat.m,
|
|
|
- width,
|
|
|
- height,
|
|
|
- cornerRadius: 0,
|
|
|
- zIndex: -1,
|
|
|
+ zIndex: 1,
|
|
|
};
|
|
|
- images.push(thumb);
|
|
|
- }
|
|
|
|
|
|
- let offset = { x: 0, y: 0 };
|
|
|
+ if (!item.url.includes(".svg")) {
|
|
|
+ images.push(shape);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ reqs.push(
|
|
|
+ getIconStyle(item.url, shape.width, shape.height, item.fixed)
|
|
|
+ .then((style) => {
|
|
|
+ icons.push({ ...shape, ...style });
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ );
|
|
|
+ }
|
|
|
+ await Promise.all(reqs)
|
|
|
+ return {
|
|
|
+ texts,
|
|
|
+ images,
|
|
|
+ icons,
|
|
|
+ };
|
|
|
+};
|
|
|
|
|
|
- let sGeo = draw.store.getTypeItems("line")[0];
|
|
|
- if (sGeo?.itemName) {
|
|
|
+const getDrawResourceOffset = (
|
|
|
+ draw: Draw,
|
|
|
+ bound: ReturnType<typeof genBound>,
|
|
|
+ thumb?: ImageData
|
|
|
+) =>
|
|
|
+ new Promise<Pos>((resolve, reject) => {
|
|
|
ElMessage.warning("请在画图面板中选择放置位置,按右键取消");
|
|
|
- await new Promise<void>((resolve, reject) => {
|
|
|
- const data = thumb ? thumb : { url: getSizePlaceBoxImage(bound.get()!) };
|
|
|
- const key = "place-plaform";
|
|
|
- draw.enterDrawShape("image", { ...data, key }, true);
|
|
|
- const stopWatch = watchEffect(() => {
|
|
|
- if (!draw.drawing) {
|
|
|
- stopWatch();
|
|
|
- const item = draw.store.items.find(
|
|
|
- (item) => item.key === key
|
|
|
- ) as ImageData;
|
|
|
-
|
|
|
- if (!item) {
|
|
|
- reject("用户已取消");
|
|
|
- } else {
|
|
|
- draw.store.delItem("image", item.id);
|
|
|
- offset.x = item.mat[4];
|
|
|
- offset.y = item.mat[5];
|
|
|
- resolve();
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+
|
|
|
+ const data = thumb ? thumb : { url: getSizePlaceBoxImage(bound.get()!) };
|
|
|
+ const key = "place-plaform";
|
|
|
+ draw.enterDrawShape("image", { ...data, key }, true);
|
|
|
+
|
|
|
+ const stopWatch = watchEffect(() => {
|
|
|
+ if (draw.drawing) return;
|
|
|
+
|
|
|
+ stopWatch();
|
|
|
+ const item = draw.store.items.find(
|
|
|
+ (item) => item.key === key
|
|
|
+ ) as ImageData;
|
|
|
+
|
|
|
+ if (!item) {
|
|
|
+ reject("用户已取消");
|
|
|
+ } else {
|
|
|
+ draw.store.delItem("image", item.id);
|
|
|
+ resolve({
|
|
|
+ x: item.mat[4],
|
|
|
+ y: item.mat[5],
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
- } else if (sGeo) {
|
|
|
- sGeo.itemName = "1";
|
|
|
+ });
|
|
|
+
|
|
|
+const drawSceneResource = async (resource: SceneResource, draw: Draw) => {
|
|
|
+ const { geo, thumb } = getCoverShapes(resource.cover);
|
|
|
+ const geoKey = "scene-geo-resource";
|
|
|
+
|
|
|
+ let offset = { x: 0, y: 0 };
|
|
|
+ let oldGeo = draw.store.getTypeItems("line")[0];
|
|
|
+ if (oldGeo?.itemName === geoKey) {
|
|
|
+ const bound = genBound();
|
|
|
+ geo.points.forEach((p) => bound.update(p));
|
|
|
+ offset = await getDrawResourceOffset(draw, bound, thumb);
|
|
|
+ } else if (oldGeo) {
|
|
|
+ oldGeo.itemName = geoKey;
|
|
|
} else {
|
|
|
- geo.itemName = "1";
|
|
|
+ geo.itemName = geoKey;
|
|
|
}
|
|
|
+
|
|
|
+ const bound = genBound();
|
|
|
geo.points.forEach((p) => {
|
|
|
p.x += offset.x;
|
|
|
p.y += offset.y;
|
|
|
+ bound.update(p);
|
|
|
+ });
|
|
|
+
|
|
|
+ const { icons, images, texts } = await getTaggingShapes(resource.taggings);
|
|
|
+ const tagShapes = [...icons, ...images, ...texts, thumb];
|
|
|
+ tagShapes.forEach((shape) => {
|
|
|
+ if (shape) {
|
|
|
+ shape.mat[4] += offset.x;
|
|
|
+ shape.mat[5] += offset.y;
|
|
|
+ bound.update({ x: shape.mat[4], y: shape.mat[5] });
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
- if (sGeo) {
|
|
|
- sGeo.points = sGeo.points.concat(geo.points);
|
|
|
- sGeo.lines = sGeo.lines.concat(geo.lines);
|
|
|
- sGeo.polygon = sGeo.polygon.concat(geo.polygon);
|
|
|
- geo = sGeo;
|
|
|
+ if (oldGeo) {
|
|
|
+ oldGeo.points = oldGeo.points.concat(geo.points);
|
|
|
+ oldGeo.lines = oldGeo.lines.concat(geo.lines);
|
|
|
+ oldGeo.polygon = oldGeo.polygon.concat(geo.polygon);
|
|
|
draw.store.setItem("line", { id: geo.id, value: geo });
|
|
|
} else {
|
|
|
draw.store.addItem("line", geo);
|
|
|
}
|
|
|
- if (thumb!) {
|
|
|
- thumb.mat[4] = offset.x;
|
|
|
- thumb.mat[5] = offset.y;
|
|
|
- }
|
|
|
- for (let ndx = 0; ndx < layerResource.taggings.length; ndx++) {
|
|
|
- const item = layerResource.taggings[ndx];
|
|
|
- bound.update(item.position);
|
|
|
- const tf = new Transform().translate(
|
|
|
- item.position.x + offset.x,
|
|
|
- item.position.y + offset.y
|
|
|
- );
|
|
|
- if (item.rotate) {
|
|
|
- tf.rotate(item.rotate);
|
|
|
- }
|
|
|
- if (item.isText) {
|
|
|
- texts.push({
|
|
|
- ...getBaseItem(),
|
|
|
- ...textDefaultStyle,
|
|
|
- content: item.url,
|
|
|
- zIndex: 1,
|
|
|
- mat: tf.m,
|
|
|
- });
|
|
|
- } else {
|
|
|
- let attach: any = {
|
|
|
- width: item.size ? item.size.width : 100,
|
|
|
- height: item.size ? item.size.height : 100,
|
|
|
- };
|
|
|
- if (item.url.includes(".svg")) {
|
|
|
- attach = {
|
|
|
- ...iconDefaultStyle,
|
|
|
- stroke: "#000000",
|
|
|
- fill: null,
|
|
|
- };
|
|
|
- try {
|
|
|
- attach = await getIconStyle(
|
|
|
- item.url,
|
|
|
- item.size?.width,
|
|
|
- item.size?.height,
|
|
|
- item.fixed
|
|
|
- );
|
|
|
- } catch {}
|
|
|
- }
|
|
|
-
|
|
|
- images.push({
|
|
|
- ...getBaseItem(),
|
|
|
- name: item.name,
|
|
|
- createTime: createTime + layerResource.geos.length + ndx,
|
|
|
- url: item.url,
|
|
|
- mat: tf.m,
|
|
|
- cornerRadius: 0,
|
|
|
- zIndex: 1,
|
|
|
- ...attach,
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
- draw.store.addItems(
|
|
|
- "icon",
|
|
|
- images.filter((item) => item.url.includes(".svg"))
|
|
|
- );
|
|
|
+ console.log(icons, texts, images)
|
|
|
+ draw.store.addItems("icon", icons);
|
|
|
draw.store.addItems("text", texts);
|
|
|
+ draw.store.addItems("image", images);
|
|
|
+ if (thumb) {
|
|
|
+ draw.store.addItem("image", thumb);
|
|
|
+ }
|
|
|
|
|
|
- draw.store.addItems(
|
|
|
- "image",
|
|
|
- images.filter((item) => !item.url.includes(".svg"))
|
|
|
- );
|
|
|
-
|
|
|
- // draw.store.addItem("group", {
|
|
|
- // ...getBaseItem(),
|
|
|
- // ids: [...images, geo.id].map((item) => item.id),
|
|
|
- // });
|
|
|
-
|
|
|
- const box = bound.get()!;
|
|
|
- return {
|
|
|
- ...box,
|
|
|
- x: box.x + offset.x,
|
|
|
- y: box.y + offset.y,
|
|
|
- maxX: box.maxX + offset.x,
|
|
|
- maxY: box.maxY + offset.y,
|
|
|
- center: {
|
|
|
- x: box.center.x + offset.x,
|
|
|
- y: box.center.y + offset.y,
|
|
|
- },
|
|
|
- };
|
|
|
+ return bound.get()!;
|
|
|
};
|
|
|
|
|
|
-export const drawPlatformResource = async (data: AIExposeData, draw: Draw) => {
|
|
|
- // 默认为米,为了方便绘图 一米转为100
|
|
|
- const layers = getResourceLayers(scaleResource(data, 100));
|
|
|
- const layerBounds: ReturnType<typeof drawLayerResource> extends Promise<
|
|
|
- infer T
|
|
|
- >
|
|
|
- ? T[]
|
|
|
- : number[] = [];
|
|
|
+export const drawPlatformResource = async (
|
|
|
+ sceneData: SelectSceneData,
|
|
|
+ draw: Draw
|
|
|
+) => {
|
|
|
+ // 默认为米,转为厘米
|
|
|
+ const resource = await getResource({ ...sceneData, scale: 100 });
|
|
|
+ let bound = null as ReturnType<ReturnType<typeof genBound>["get"]>;
|
|
|
|
|
|
+ console.log(resource)
|
|
|
await draw.history.onceTrack(async () => {
|
|
|
- // draw.store.setConfig({ proportion: { scale: 10, unit: 'mm' } });
|
|
|
draw.store.setConfig({ proportion: { scale: 10, unit: "mm" } });
|
|
|
- for (const layer of layers) {
|
|
|
- // if (!draw.store.layers.includes(layer.name)) {
|
|
|
- // draw.store.addLayer(layer.name);
|
|
|
- // }
|
|
|
- // draw.store.setCurrentLayer(layer.name);
|
|
|
- layerBounds.push(await drawLayerResource(layer, draw)!);
|
|
|
- }
|
|
|
- if (typeof data.compass === "number") {
|
|
|
+ bound = await drawSceneResource(resource, draw);
|
|
|
+ if (typeof resource.compass === "number") {
|
|
|
draw.store.setConfig({
|
|
|
compass: {
|
|
|
- rotation: data.compass,
|
|
|
+ rotation: resource.compass,
|
|
|
url: draw.store.config.compass.url,
|
|
|
},
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- if (layerBounds.length === 0 || !draw.viewer.size) return;
|
|
|
-
|
|
|
- const flyBound = layerBounds[layerBounds.length - 1]!;
|
|
|
+ if (!draw.viewer.size || !bound) return;
|
|
|
const size = draw.viewer.size;
|
|
|
|
|
|
- if (flyBound.width < 10 || flyBound.height < 10) {
|
|
|
+ if (bound.width < 10 || bound.height < 10) {
|
|
|
draw.viewer.setViewMat([
|
|
|
1,
|
|
|
0,
|
|
|
0,
|
|
|
1,
|
|
|
- flyBound.center.x + size.width / 2,
|
|
|
- flyBound.center.y + size.height / 2,
|
|
|
+ bound.center.x + size.width / 2,
|
|
|
+ bound.center.y + size.height / 2,
|
|
|
]);
|
|
|
} else {
|
|
|
- const viewWidth = Math.max(flyBound.width, size.width);
|
|
|
- const viewHeight = Math.max(flyBound.height, size.height);
|
|
|
+ const viewWidth = Math.max(bound.width, size.width);
|
|
|
+ const viewHeight = Math.max(bound.height, size.height);
|
|
|
const padding = Math.max(
|
|
|
- Math.min(
|
|
|
- (viewWidth - flyBound.width) / 2,
|
|
|
- (viewHeight - flyBound.height) / 2
|
|
|
- ),
|
|
|
+ Math.min((viewWidth - bound.width) / 2, (viewHeight - bound.height) / 2),
|
|
|
40
|
|
|
);
|
|
|
- draw.viewer.setBound({ targetBound: flyBound, padding });
|
|
|
+ draw.viewer.setBound({ targetBound: bound, padding });
|
|
|
}
|
|
|
};
|