@realsee/dnalogel 3.0.1 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/floorplan/Components/MissingFloor.svelte.d.ts +1 -0
  2. package/dist/floorplan/MapviewFloorplanPlugin/Controller.d.ts +1 -0
  3. package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +1 -0
  4. package/dist/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +2 -0
  5. package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +1 -0
  6. package/dist/floorplan/typings/index.d.ts +15 -0
  7. package/dist/index.cjs.js +62 -62
  8. package/dist/index.js +6654 -6294
  9. package/dist/index.umd.js +48 -48
  10. package/dist/shared-utils/filter.d.ts +1 -1
  11. package/libs/base/BasePlugin.js +1 -1
  12. package/libs/floorplan/Components/CurrentFloor.js +423 -214
  13. package/libs/floorplan/Components/Main.js +205 -271
  14. package/libs/floorplan/Components/MissingFloor.js +99 -0
  15. package/libs/floorplan/Components/MissingFloor.svelte.d.ts +1 -0
  16. package/libs/floorplan/MapviewFloorplanPlugin/Controller.d.ts +1 -0
  17. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +74 -66
  18. package/libs/floorplan/MapviewFloorplanPlugin/index.js +9 -8
  19. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +1 -0
  20. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +108 -101
  21. package/libs/floorplan/ModelFloorplanPlugin/index.js +9 -8
  22. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +88 -68
  23. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +199 -127
  24. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +110 -100
  25. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +15 -14
  26. package/libs/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +2 -0
  27. package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +1 -0
  28. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +118 -110
  29. package/libs/floorplan/TopviewFloorplanPlugin/index.js +9 -8
  30. package/libs/floorplan/typings/index.d.ts +15 -0
  31. package/libs/index.js +122 -121
  32. package/libs/shared-utils/filter.d.ts +1 -1
  33. package/libs/shared-utils/logger.js +1 -1
  34. package/package.json +1 -1
@@ -1,51 +1,47 @@
1
- var w = Object.defineProperty, A = Object.defineProperties;
2
- var E = Object.getOwnPropertyDescriptors;
3
- var u = Object.getOwnPropertySymbols;
4
- var C = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
5
- var m = (h, n, t) => n in h ? w(h, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[n] = t, p = (h, n) => {
1
+ var w = Object.defineProperty, C = Object.defineProperties;
2
+ var F = Object.getOwnPropertyDescriptors;
3
+ var g = Object.getOwnPropertySymbols;
4
+ var A = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
5
+ var u = (d, n, t) => n in d ? w(d, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[n] = t, l = (d, n) => {
6
6
  for (var t in n || (n = {}))
7
- C.call(n, t) && m(h, t, n[t]);
8
- if (u)
9
- for (var t of u(n))
10
- x.call(n, t) && m(h, t, n[t]);
11
- return h;
12
- }, f = (h, n) => A(h, E(n));
13
- var i = (h, n, t) => (m(h, typeof n != "symbol" ? n + "" : n, t), t);
14
- var c = (h, n, t) => new Promise((e, o) => {
15
- var s = (d) => {
7
+ A.call(n, t) && u(d, t, n[t]);
8
+ if (g)
9
+ for (var t of g(n))
10
+ E.call(n, t) && u(d, t, n[t]);
11
+ return d;
12
+ }, m = (d, n) => C(d, F(n));
13
+ var o = (d, n, t) => (u(d, typeof n != "symbol" ? n + "" : n, t), t);
14
+ var f = (d, n, t) => new Promise((e, i) => {
15
+ var s = (h) => {
16
16
  try {
17
- r(t.next(d));
18
- } catch (l) {
19
- o(l);
17
+ a(t.next(h));
18
+ } catch (c) {
19
+ i(c);
20
20
  }
21
- }, a = (d) => {
21
+ }, r = (h) => {
22
22
  try {
23
- r(t.throw(d));
24
- } catch (l) {
25
- o(l);
23
+ a(t.throw(h));
24
+ } catch (c) {
25
+ i(c);
26
26
  }
27
- }, r = (d) => d.done ? e(d.value) : Promise.resolve(d.value).then(s, a);
28
- r((t = t.apply(h, n)).next());
27
+ }, a = (h) => h.done ? e(h.value) : Promise.resolve(h.value).then(s, r);
28
+ a((t = t.apply(d, n)).next());
29
29
  });
30
- import * as S from "three";
31
- import { equal as F } from "../../shared-utils/equal.js";
30
+ import * as x from "three";
31
+ import { equal as S } from "../../shared-utils/equal.js";
32
32
  import { Main as y } from "../Components/Main.js";
33
33
  import { formatData as v } from "../utils/formatData.js";
34
34
  import { CAMERA_IMAGE as I } from "../Assets/camera.js";
35
- import { omit as _ } from "../../shared-utils/filter.js";
36
- import { FLOOR_PLAN_ATTACHED_TO as L } from "../constant.js";
37
- import { Controller as T } from "../../base/BasePluginWithData.js";
38
- import { changeMode as M } from "../../shared-utils/five/changeMode.js";
35
+ import { omit as L } from "../../shared-utils/filter.js";
36
+ import { FLOOR_PLAN_ATTACHED_TO as _ } from "../constant.js";
37
+ import { Controller as M } from "../../base/BasePluginWithData.js";
38
+ import { changeMode as T } from "../../shared-utils/five/changeMode.js";
39
39
  import { getPxmm as P, getAttachedY as D } from "../../shared-utils/getPxmm.js";
40
- import { changeModelCanvasOpacity as g } from "../../shared-utils/changeModelCanvasOpacity.js";
40
+ import { changeModelCanvasOpacity as b } from "../../shared-utils/changeModelCanvasOpacity.js";
41
41
  import "../../shared-utils/isTruelyObject.js";
42
42
  import "../../vendor/svelte/internal/index.js";
43
43
  import "../../vendor/svelte/transition/index.js";
44
44
  import "../../vendor/svelte/easing/index.js";
45
- import "../Components/Camera.js";
46
- import "../../shared-utils/math/rad2Deg.js";
47
- import "../Components/Compass.js";
48
- import "../Assets/compass.js";
49
45
  import "../Components/CurrentFloor.js";
50
46
  import "../../vendor/svelte/store/index.js";
51
47
  import "../Components/BaseImage.js";
@@ -64,6 +60,11 @@ import "../Components/RoomMaterials/RoomMaterial_1.js";
64
60
  import "../Components/RoomMaterials/RoomMaterial_2.js";
65
61
  import "../Components/RoomHighlight/RoomHighlight.js";
66
62
  import "../Components/RoomHighlight/Room.js";
63
+ import "../Components/MissingFloor.js";
64
+ import "../Components/Camera.js";
65
+ import "../../shared-utils/math/rad2Deg.js";
66
+ import "../Components/Compass.js";
67
+ import "../Assets/compass.js";
67
68
  import "../Assets/floorplanExtraObject.js";
68
69
  import "../../shared-utils/tap.js";
69
70
  import "../../base/BasePlugin.js";
@@ -89,57 +90,59 @@ import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
89
90
  import "../../shared-utils/url/absoluteUrl.js";
90
91
  import "../../shared-utils/nearlyEqual.js";
91
92
  import "../../shared-utils/to.js";
92
- class Wt extends T {
93
+ class Bt extends M {
93
94
  constructor(t, e) {
95
+ var h, c;
94
96
  super(t);
95
97
  // =============== public properties =================
96
- i(this, "name", "topviewFloorplanPlugin");
97
- i(this, "state");
98
+ o(this, "name", "topviewFloorplanPlugin");
99
+ o(this, "state");
98
100
  // =============== private properties =================
99
- i(this, "data");
100
- i(this, "app");
101
- i(this, "selector");
102
- i(this, "panoIndex", 0);
103
- i(this, "floorIndex", 0);
101
+ o(this, "data");
102
+ o(this, "app");
103
+ o(this, "selector");
104
+ o(this, "panoIndex", 0);
105
+ o(this, "floorIndex", 0);
104
106
  /** 户型图父容器 */
105
- i(this, "wrapper");
107
+ o(this, "wrapper");
106
108
  /** 户型图主容器 */
107
- i(this, "container", document.createElement("div"));
109
+ o(this, "container", document.createElement("div"));
108
110
  /** 展示户型图图前,Five 的 Panorama Longitude */
109
- i(this, "lastPanoramaLongitude", 0);
111
+ o(this, "lastPanoramaLongitude", 0);
110
112
  /** 户型图大小 */
111
- i(this, "size", { width: 0, height: 0 });
113
+ o(this, "size", { width: 0, height: 0 });
114
+ o(this, "defaultMissingFloorConfig");
112
115
  /** 是否已经执行过事件监听 */
113
- i(this, "hasAddedEventListener", !1);
116
+ o(this, "hasAddedEventListener", !1);
114
117
  /** 上一次隐藏是否是用户调用了 hide 导致的 */
115
- i(this, "isHiddenByHideFunc", !1);
118
+ o(this, "isHiddenByHideFunc", !1);
116
119
  /** 高亮区域 */
117
- i(this, "highlightData", {});
120
+ o(this, "highlightData", {});
118
121
  /** 更新户型图大小 */
119
- i(this, "updateSize", () => {
122
+ o(this, "updateSize", () => {
120
123
  if (!this.data || !this.container || !this.wrapper || this.five.getCurrentState().mode !== "Topview")
121
124
  return;
122
- const { min: t, max: e } = this.data.bounding, o = e.x - t.x, s = e.y - t.y, a = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, r = P(this.five, this.wrapper, this.floorIndex, a), d = Math.ceil(o * r), l = Math.ceil(s * r);
123
- this.size.width === d && this.size.height === l || (this.container.style.width = d + "px", this.container.style.height = l + "px", this.size = { width: d, height: l });
125
+ const { min: t, max: e } = this.data.bounding, i = e.x - t.x, s = e.y - t.y, r = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, a = P(this.five, this.wrapper, this.floorIndex, r), h = Math.ceil(i * a), c = Math.ceil(s * a);
126
+ this.size.width === h && this.size.height === c || (this.container.style.width = h + "px", this.container.style.height = c + "px", this.size = { width: h, height: c });
124
127
  });
125
128
  /** 销毁插件 */
126
- i(this, "dispose", () => {
129
+ o(this, "dispose", () => {
127
130
  var t, e;
128
131
  this.removeEventListener(), (t = this.app) == null || t.$destroy(), this.app = void 0, (e = this.container) == null || e.remove(), this.data = void 0, this.wrapper = void 0, this.selector = void 0, this.hooks.emit("dispose");
129
132
  });
130
- i(this, "highlight", (t) => {
133
+ o(this, "highlight", (t) => {
131
134
  this.state.config.highlightEnable && (this.highlightData = t, this.render());
132
135
  });
133
- i(this, "unhighlight", () => {
136
+ o(this, "unhighlight", () => {
134
137
  this.highlightData = {}, this.render();
135
138
  });
136
- i(this, "_disable", (t) => {
137
- var o, s;
139
+ o(this, "_disable", (t) => {
140
+ var i, s;
138
141
  const { userAction: e } = t;
139
- (o = this.app) == null || o.$destroy(), this.app = void 0, (s = this.container) == null || s.remove(), this.removeEventListener(), this.hooks.emit("disable", { userAction: e });
142
+ (i = this.app) == null || i.$destroy(), this.app = void 0, (s = this.container) == null || s.remove(), this.removeEventListener(), this.hooks.emit("disable", { userAction: e });
140
143
  });
141
144
  /** modelLoaded 之后自动执行 append container 操作 */
142
- i(this, "onFiveModelLoaded", () => {
145
+ o(this, "onFiveModelLoaded", () => {
143
146
  if (this.state.enabled === !1 || this.wrapper || !this.selector)
144
147
  return;
145
148
  const t = this.selector instanceof Element ? this.selector : document.querySelector(this.selector);
@@ -148,30 +151,30 @@ class Wt extends T {
148
151
  this.wrapper = t, t.append(this.container);
149
152
  });
150
153
  /** 非 Topview 态隐藏户型图 */
151
- i(this, "onFiveModeChange", (...[t, , , , e]) => {
154
+ o(this, "onFiveModeChange", (...[t, , , , e]) => {
152
155
  t !== "Topview" && this.state.visible && (this.updateState({ visible: !1 }, e), this._hide({ userAction: e }));
153
156
  });
154
- i(this, "onFivePanoArrived", (t) => {
157
+ o(this, "onFivePanoArrived", (t) => {
155
158
  var e;
156
159
  (e = this.five) != null && e.work && (this.panoIndex = t, this.floorIndex = this.five.work.observers[t].floorIndex);
157
160
  });
158
- i(this, "onFiveCameraUpdate", (t, e) => {
161
+ o(this, "onFiveCameraUpdate", (t, e) => {
159
162
  this.state.visible && (this.updatePosition(), this.updateSize());
160
163
  });
161
- i(this, "onFiveWantsGesture", (t) => {
164
+ o(this, "onFiveWantsGesture", (t) => {
162
165
  if (!(t !== "pan" && t !== "pinch" && t !== "mouseWheel") && this.state.visible && !this.state.config.gestureEnable)
163
166
  return !1;
164
167
  });
165
- i(this, "onFiveWantsMoveToPano", () => {
168
+ o(this, "onFiveWantsMoveToPano", () => {
166
169
  if (this.state.visible && this.state.config.preventRoomClick)
167
170
  return !1;
168
171
  });
169
172
  /** 动画结束后是 Topview 态就展示户型图 */
170
- i(this, "onFiveInitAnimationEnded", (...[, , t]) => {
173
+ o(this, "onFiveInitAnimationEnded", (...[, , t]) => {
171
174
  const { mode: e } = this.five.getCurrentState();
172
175
  e === "Topview" && !this.isHiddenByHideFunc && !this.state.visible && this.state.config.autoShowEnable && (this.updateState({ visible: !0 }, t), this._show({ userAction: t }));
173
176
  });
174
- i(this, "onModelShownFloorChange", (t) => {
177
+ o(this, "onModelShownFloorChange", (t) => {
175
178
  if (this.floorIndex !== t) {
176
179
  if (t === null) {
177
180
  const e = this.five.getCurrentState().panoIndex;
@@ -181,8 +184,14 @@ class Wt extends T {
181
184
  this.floorIndex = t, this.updateSize(), this.render();
182
185
  }
183
186
  });
184
- e != null && e.selector && (this.selector = e.selector, console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法"));
185
- const o = {
187
+ e != null && e.selector && (this.selector = e.selector, console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")), this.defaultMissingFloorConfig = {
188
+ imageURL: this.staticPrefix + "/release/web/saas/missing-floorplan.e274c596.png",
189
+ imageWidth: 200,
190
+ imageHeight: 120,
191
+ text: (c = (h = e.i18n) == null ? void 0 : h.call(e, "暂无平面图")) != null ? c : "暂无平面图",
192
+ textFontSize: 14
193
+ };
194
+ const i = {
186
195
  northDesc: "北",
187
196
  modelOpacity: 1,
188
197
  cameraEnable: !0,
@@ -196,37 +205,35 @@ class Wt extends T {
196
205
  roomAreaEnable: !0,
197
206
  roomNameEnable: !0,
198
207
  cameraImageUrl: I,
199
- attachedTo: L.BOUNDING_CENTER,
208
+ attachedTo: _.BOUNDING_CENTER,
200
209
  getLabelElement: void 0,
210
+ missingFloorConfig: l(l({}, this.defaultMissingFloorConfig), e.missingFloorConfig),
211
+ i18n: (p) => p,
201
212
  adaptiveRoomLabelVisibleEnable: !0,
202
- getRoomAreaText: (r) => (r / 1e6).toFixed(1) + "㎡",
203
- getRuleDistanceText: (r) => r.toString()
204
- }, s = e ? _(e, ["selector", "scale"]) : {}, a = p(p({}, o), s);
205
- this.state = {
206
- enabled: !0,
207
- visible: !1,
208
- config: a
209
- }, this.initContainer(), t.model.loaded ? this.onFiveModelLoaded() : t.once("modelLoaded", this.onFiveModelLoaded), t.once("dispose", this.dispose), this.addEventListener();
213
+ getRoomAreaText: (p) => (p / 1e6).toFixed(1) + "㎡",
214
+ getRuleDistanceText: (p) => p.toString()
215
+ }, s = e ? L(e, ["selector", "scale"]) : {}, r = l(l({}, i.missingFloorConfig), s.missingFloorConfig), a = m(l(l({}, i), s), { missingFloorConfig: r });
216
+ this.state = { enabled: !0, visible: !1, config: a }, this.initContainer(), t.model.loaded ? this.onFiveModelLoaded() : t.once("modelLoaded", this.onFiveModelLoaded), t.once("dispose", this.dispose), this.addEventListener();
210
217
  }
211
- load(t, e, o = !0) {
212
- return c(this, null, function* () {
213
- function s(b) {
214
- return Object.prototype.hasOwnProperty.apply(b, ["version"]);
218
+ load(t, e, i = !0) {
219
+ return f(this, null, function* () {
220
+ function s(p) {
221
+ return Object.prototype.hasOwnProperty.apply(p, ["version"]);
215
222
  }
216
- const a = t;
217
- a && !a.version && console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");
218
- const r = JSON.parse(JSON.stringify(t)), d = s(r) ? r.data : r, l = this.data;
219
- this.data = yield v(d), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, l), e && this.updateState(e, o), this.render();
223
+ const r = t;
224
+ r && !r.version && console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");
225
+ const a = JSON.parse(JSON.stringify(t)), h = s(a) ? a.data : a, c = this.data;
226
+ this.data = yield v(h), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, c), e && this.updateState(e, i), this.render();
220
227
  });
221
228
  }
222
229
  /** 更新户型图位置 */
223
230
  updatePosition() {
224
- var r;
225
- const t = D(this.five, this.floorIndex, this.state.config.attachedTo), e = (r = this.five.model) == null ? void 0 : r.bounding.getCenter(new S.Vector3()).setY(t);
231
+ var a;
232
+ const t = D(this.five, this.floorIndex, this.state.config.attachedTo), e = (a = this.five.model) == null ? void 0 : a.bounding.getCenter(new x.Vector3()).setY(t);
226
233
  if (!e)
227
234
  return;
228
- const o = e.clone().project(this.five.camera), s = (o.x + 1) / 2, a = -(o.y - 1) / 2;
229
- this.container.style.left = s * 100 + "%", this.container.style.top = a * 100 + "%";
235
+ const i = e.clone().project(this.five.camera), s = (i.x + 1) / 2, r = -(i.y - 1) / 2;
236
+ this.container.style.left = s * 100 + "%", this.container.style.top = r * 100 + "%";
230
237
  }
231
238
  /** 把插件的渲染DOM插入到对应的容器中去 */
232
239
  appendTo(t) {
@@ -234,7 +241,7 @@ class Wt extends T {
234
241
  return t.appendChild(this.container), this.render(), this;
235
242
  }
236
243
  show() {
237
- return c(this, arguments, function* (t = {}) {
244
+ return f(this, arguments, function* (t = {}) {
238
245
  if (this.state.visible)
239
246
  return;
240
247
  const e = t.userAction !== void 0 ? t.userAction : !0;
@@ -242,7 +249,7 @@ class Wt extends T {
242
249
  });
243
250
  }
244
251
  hide() {
245
- return c(this, arguments, function* (t = {}) {
252
+ return f(this, arguments, function* (t = {}) {
246
253
  if (this.isHiddenByHideFunc = !0, !this.state.visible)
247
254
  return;
248
255
  const e = t.userAction !== void 0 ? t.userAction : !0;
@@ -263,43 +270,43 @@ class Wt extends T {
263
270
  }
264
271
  /** 更改插件 State */
265
272
  setState(t, e = {}) {
266
- const o = this.state, s = e.userAction !== void 0 ? e.userAction : !0;
267
- if (this.updateState(t, s), t.enabled !== void 0 && o.enabled !== t.enabled) {
268
- const a = { userAction: s };
269
- t.enabled ? this._enable(a) : this._disable(a);
273
+ const i = this.state, s = e.userAction !== void 0 ? e.userAction : !0;
274
+ if (this.updateState(t, s), t.enabled !== void 0 && i.enabled !== t.enabled) {
275
+ const r = { userAction: s };
276
+ t.enabled ? this._enable(r) : this._disable(r);
270
277
  }
271
- if (t.visible !== void 0 && o.visible !== t.visible) {
272
- const a = { userAction: s };
273
- t.visible ? this._show(a) : this._hide(a);
278
+ if (t.visible !== void 0 && i.visible !== t.visible) {
279
+ const r = { userAction: s };
280
+ t.visible ? this._show(r) : this._hide(r);
274
281
  }
275
282
  }
276
283
  changeConfigs(t, e = !0) {
277
284
  this.updateState({ config: t }, e), this.render();
278
285
  }
279
286
  formatData(t) {
280
- return c(this, null, function* () {
287
+ return f(this, null, function* () {
281
288
  return yield v(t.data);
282
289
  });
283
290
  }
284
291
  _show(t) {
285
- return c(this, null, function* () {
292
+ return f(this, null, function* () {
286
293
  if (!this.state.enabled)
287
294
  return;
288
295
  this.isHiddenByHideFunc = !1;
289
296
  const { userAction: e } = t;
290
- this.hooks.emit("show", { userAction: e, auto: !1 }), this.five.getCurrentState().mode !== "Topview" && (yield M(this.five, ["Topview", void 0, void 0, e])), this.five.model.show(this.floorIndex), this.updatePosition(), this.updateSize();
291
- const o = 500, s = this.state.config.modelOpacity;
292
- g(this.five, s, o), this.hooks.emit("showAnimationEnded", { userAction: e, auto: !1 }), this.render();
297
+ this.hooks.emit("show", { userAction: e, auto: !1 }), this.five.getCurrentState().mode !== "Topview" && (yield T(this.five, ["Topview", void 0, void 0, e])), this.five.model.show(this.floorIndex), this.updatePosition(), this.updateSize();
298
+ const i = 500, s = this.state.config.modelOpacity;
299
+ b(this.five, s, i), this.hooks.emit("showAnimationEnded", { userAction: e, auto: !1 }), this.render();
293
300
  });
294
301
  }
295
302
  _hide(t) {
296
- return c(this, null, function* () {
303
+ return f(this, null, function* () {
297
304
  if (!this.state.enabled)
298
305
  return;
299
306
  const { userAction: e } = t;
300
307
  this.hooks.emit("hide", { userAction: e, auto: !1 });
301
- const o = 1, s = 0;
302
- g(this.five, o, s), this.render();
308
+ const i = 1, s = 0;
309
+ b(this.five, i, s), this.render();
303
310
  });
304
311
  }
305
312
  _enable(t) {
@@ -307,8 +314,9 @@ class Wt extends T {
307
314
  this.addEventListener(), this.wrapper && this.wrapper.append(this.container), this.hooks.emit("enable", { userAction: e }), this.state.visible && this._show({ userAction: e });
308
315
  }
309
316
  updateState(t, e) {
310
- const o = this.state, s = t.config ? p(p({}, o.config), t.config) : o.config;
311
- this.state = f(p(p({}, this.state), t), { config: s }), !F(this.state, o, { deep: !0 }) && this.hooks.emit("stateChange", { state: this.state, prevState: o, userAction: e });
317
+ var a;
318
+ const i = this.state, s = (a = t.config) != null && a.missingFloorConfig ? l(l({}, i.config.missingFloorConfig), t.config.missingFloorConfig) : i.config.missingFloorConfig, r = t.config ? m(l(l({}, i.config), t.config), { missingFloorConfig: s }) : i.config;
319
+ this.state = m(l(l({}, this.state), t), { config: r }), !S(this.state, i, { deep: !0 }) && this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: e });
312
320
  }
313
321
  addEventListener() {
314
322
  if (!this.state.enabled || this.hasAddedEventListener)
@@ -338,7 +346,7 @@ class Wt extends T {
338
346
  render(t) {
339
347
  if (!this.state.enabled || !this.container || !this.data || this.size.width === 0)
340
348
  return;
341
- const e = f(p({}, this.state.config), {
349
+ const e = m(l({}, this.state.config), {
342
350
  visible: this.state.visible,
343
351
  duration: t != null ? t : 0,
344
352
  panoIndex: this.panoIndex,
@@ -353,5 +361,5 @@ class Wt extends T {
353
361
  }
354
362
  }
355
363
  export {
356
- Wt as Controller
364
+ Bt as Controller
357
365
  };
@@ -6,11 +6,6 @@ import "../Components/Main.js";
6
6
  import "../../vendor/svelte/internal/index.js";
7
7
  import "../../vendor/svelte/transition/index.js";
8
8
  import "../../vendor/svelte/easing/index.js";
9
- import "../Components/Camera.js";
10
- import "../Assets/camera.js";
11
- import "../../shared-utils/math/rad2Deg.js";
12
- import "../Components/Compass.js";
13
- import "../Assets/compass.js";
14
9
  import "../Components/CurrentFloor.js";
15
10
  import "../../vendor/svelte/store/index.js";
16
11
  import "../Components/BaseImage.js";
@@ -29,6 +24,12 @@ import "../Components/RoomMaterials/RoomMaterial_1.js";
29
24
  import "../Components/RoomMaterials/RoomMaterial_2.js";
30
25
  import "../Components/RoomHighlight/RoomHighlight.js";
31
26
  import "../Components/RoomHighlight/Room.js";
27
+ import "../Components/MissingFloor.js";
28
+ import "../Components/Camera.js";
29
+ import "../Assets/camera.js";
30
+ import "../../shared-utils/math/rad2Deg.js";
31
+ import "../Components/Compass.js";
32
+ import "../Assets/compass.js";
32
33
  import "../utils/formatData.js";
33
34
  import "../Assets/floorplanExtraObject.js";
34
35
  import "../../shared-utils/filter.js";
@@ -61,8 +62,8 @@ import "../../shared-utils/nearlyEqual.js";
61
62
  import "../../shared-utils/to.js";
62
63
  import "../../shared-utils/getPxmm.js";
63
64
  import "../../shared-utils/changeModelCanvasOpacity.js";
64
- const so = (o, r) => new t(o, r);
65
+ const wo = (o, r) => new t(o, r);
65
66
  export {
66
- so as TopviewFloorplanPlugin,
67
- so as default
67
+ wo as TopviewFloorplanPlugin,
68
+ wo as default
68
69
  };
@@ -7,6 +7,17 @@ export interface State extends BasePlugin.State {
7
7
  visible: boolean;
8
8
  config: Config;
9
9
  }
10
+ export interface MissingFloorConfig {
11
+ /** 缺失内容占位图片地址 */
12
+ imageURL?: string;
13
+ /** 图片宽:单位 px,默认 200px */
14
+ imageWidth?: number;
15
+ /** 图片高:单位 px,默认 120px */
16
+ imageHeight?: number;
17
+ /** 缺失内容提示文本内容 */
18
+ text?: string;
19
+ textFontSize?: number;
20
+ }
10
21
  export interface Config {
11
22
  /** 指北针的显示文案,默认为 '北' */
12
23
  northDesc: string;
@@ -44,6 +55,10 @@ export interface Config {
44
55
  * - FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER: 户型图大小与模型的中心进行贴合
45
56
  */
46
57
  attachedTo: FLOOR_PLAN_ATTACHED_TO;
58
+ /** 楼层数据不存在时,进行缺失内容填充,通过 defaultStyle 配置相关样式 */
59
+ missingFloorConfig: MissingFloorConfig;
60
+ /** 国际化配置 */
61
+ i18n: (...params: any[]) => string;
47
62
  /** 分间标签的自定义函数,通过返回自定义 DOM 替换对应分间的标签 */
48
63
  getLabelElement: undefined | ((room: FloorplanRoomItem) => Element | null);
49
64
  /** 自定义分间面积文本