@realsee/dnalogel 2.30.2 → 2.30.3
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.
- package/dist/index.cjs.js +37 -37
- package/dist/index.js +927 -927
- package/dist/index.umd.js +29 -29
- package/libs/base/BasePlugin.js +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +31 -31
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var P = Object.defineProperty, E = Object.defineProperties;
|
|
2
|
+
var C = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var g = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var m = (d, r, t) => r in d ?
|
|
4
|
+
var I = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var m = (d, r, t) => r in d ? P(d, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[r] = t, c = (d, r) => {
|
|
6
6
|
for (var t in r || (r = {}))
|
|
7
|
-
|
|
7
|
+
I.call(r, t) && m(d, t, r[t]);
|
|
8
8
|
if (g)
|
|
9
9
|
for (var t of g(r))
|
|
10
|
-
|
|
10
|
+
y.call(r, t) && m(d, t, r[t]);
|
|
11
11
|
return d;
|
|
12
|
-
}, v = (d, r) =>
|
|
12
|
+
}, v = (d, r) => E(d, C(r));
|
|
13
13
|
var o = (d, r, t) => (m(d, typeof r != "symbol" ? r + "" : r, t), t);
|
|
14
14
|
var u = (d, r, t) => new Promise((e, i) => {
|
|
15
15
|
var n = (a) => {
|
|
@@ -28,18 +28,18 @@ var u = (d, r, t) => new Promise((e, i) => {
|
|
|
28
28
|
s((t = t.apply(d, r)).next());
|
|
29
29
|
});
|
|
30
30
|
import * as w from "three";
|
|
31
|
-
import { to as
|
|
32
|
-
import { equal as
|
|
33
|
-
import { Main as
|
|
31
|
+
import { to as F } from "../../shared-utils/to.js";
|
|
32
|
+
import { equal as x } from "../../shared-utils/equal.js";
|
|
33
|
+
import { Main as M } from "../Components/Main.js";
|
|
34
34
|
import { formatData as b } from "../utils/formatData.js";
|
|
35
|
-
import { CAMERA_IMAGE as
|
|
36
|
-
import { omit as
|
|
35
|
+
import { CAMERA_IMAGE as _ } from "../Assets/camera.js";
|
|
36
|
+
import { omit as S } from "../../shared-utils/filter.js";
|
|
37
37
|
import { FLOOR_PLAN_ATTACHED_TO as L } from "../constant.js";
|
|
38
38
|
import { Controller as O } from "../../base/BasePluginWithData.js";
|
|
39
39
|
import { getPxmm as D, getAttachedY as T } from "../../shared-utils/getPxmm.js";
|
|
40
|
-
import {
|
|
41
|
-
import { changeModelCanvasOpacity as
|
|
42
|
-
import { FloorplanErrorType as f, SHOW_ANIME_DURATION as
|
|
40
|
+
import { correctFiveState as k } from "../utils/correctFiveState.js";
|
|
41
|
+
import { changeModelCanvasOpacity as A } from "../../shared-utils/changeModelCanvasOpacity.js";
|
|
42
|
+
import { FloorplanErrorType as f, SHOW_ANIME_DURATION as H } from "../utils/constant.js";
|
|
43
43
|
import "../../shared-utils/isTruelyObject.js";
|
|
44
44
|
import "../../vendor/svelte/internal/index.js";
|
|
45
45
|
import "../../vendor/svelte/transition/index.js";
|
|
@@ -89,15 +89,15 @@ import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
|
89
89
|
import "../../shared-utils/absoluteUrl.js";
|
|
90
90
|
import "../../shared-utils/nearlyEqual.js";
|
|
91
91
|
import "../../shared-utils/five/changeMode.js";
|
|
92
|
-
function
|
|
92
|
+
function R(d) {
|
|
93
93
|
const { latitude: r, longitude: t } = d, e = Math.abs(r - Math.PI / 2) > 5 * Math.PI / 180, i = t > 5 * (Math.PI / 180) && t < 355 * (Math.PI / 180);
|
|
94
94
|
return e || i;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function G(d) {
|
|
97
97
|
const { latitude: r, longitude: t } = d, e = Math.abs(r - Math.PI / 2) < 10 * Math.PI / 180, i = t < 30 * (Math.PI / 180) || t > 330 * (Math.PI / 180);
|
|
98
98
|
return e && i;
|
|
99
99
|
}
|
|
100
|
-
class
|
|
100
|
+
class qt extends O {
|
|
101
101
|
constructor(t, e) {
|
|
102
102
|
super(t);
|
|
103
103
|
// =============== public properties =================
|
|
@@ -158,7 +158,7 @@ class Jt extends O {
|
|
|
158
158
|
}));
|
|
159
159
|
/** 更新户型图大小 */
|
|
160
160
|
o(this, "updateSize", () => {
|
|
161
|
-
if (!this.data || !
|
|
161
|
+
if (!this.data || !this.container || !this.wrapper)
|
|
162
162
|
return;
|
|
163
163
|
const { min: t, max: e } = this.data.bounding, i = e.x - t.x, n = e.y - t.y, h = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, s = D(this.five, this.wrapper, this.floorIndex, h), a = Math.ceil(i * s), l = Math.ceil(n * s);
|
|
164
164
|
this.size.width === a && this.size.height === l || (this.container.style.width = a + "px", this.container.style.height = l + "px", this.size = { width: a, height: l });
|
|
@@ -200,7 +200,7 @@ class Jt extends O {
|
|
|
200
200
|
this.showRejection = (p) => {
|
|
201
201
|
s = !0, a = p;
|
|
202
202
|
};
|
|
203
|
-
const [l] = yield
|
|
203
|
+
const [l] = yield F(k(this.five, this.showState, i.userAction));
|
|
204
204
|
if (l)
|
|
205
205
|
throw l;
|
|
206
206
|
if (s)
|
|
@@ -209,8 +209,8 @@ class Jt extends O {
|
|
|
209
209
|
});
|
|
210
210
|
return this.isHiddenByHideFunc = !1, this.showPromise = n().then(() => {
|
|
211
211
|
this.showPromise = void 0, this.showRejection = void 0;
|
|
212
|
-
const s = i.modelOpacity, a = i.immediately ? 0 :
|
|
213
|
-
|
|
212
|
+
const s = i.modelOpacity, a = i.immediately ? 0 : H;
|
|
213
|
+
A(this.five, s, a), this.render(a), this.hooks.emit("showAnimationEnded", {
|
|
214
214
|
auto: i.isAutoShow,
|
|
215
215
|
userAction: i.userAction
|
|
216
216
|
});
|
|
@@ -226,7 +226,7 @@ class Jt extends O {
|
|
|
226
226
|
userAction: !0,
|
|
227
227
|
isAutoHide: !1
|
|
228
228
|
}), t);
|
|
229
|
-
|
|
229
|
+
A(this.five, 1, 0), this.hooks.emit("hide", { auto: i.isAutoHide, userAction: i.userAction }), this.render();
|
|
230
230
|
});
|
|
231
231
|
o(this, "handleClick", () => {
|
|
232
232
|
if (!this.state.visible)
|
|
@@ -253,7 +253,7 @@ class Jt extends O {
|
|
|
253
253
|
if (!e || this.state.visible || this.state.config.autoShowEnable === !1 || this.isHiddenByHideFunc)
|
|
254
254
|
return;
|
|
255
255
|
const i = this.five.getCurrentState();
|
|
256
|
-
i.mode === this.showState.mode &&
|
|
256
|
+
i.mode === this.showState.mode && G(i) && (this.updateState({ visible: !0 }, !0), this._show({ isAutoShow: !0 }));
|
|
257
257
|
});
|
|
258
258
|
/** panoIndex 改变时,更新 floorIndex */
|
|
259
259
|
o(this, "onFivePanoArrived", (t) => {
|
|
@@ -265,12 +265,12 @@ class Jt extends O {
|
|
|
265
265
|
if (!this.state.visible || this.showPromise)
|
|
266
266
|
return;
|
|
267
267
|
const i = this.five.getCurrentState();
|
|
268
|
-
this.updatePosition(), this.updateSize(),
|
|
268
|
+
this.updatePosition(), this.updateSize(), R(i) && (this.updateState({ visible: !1 }, e), this._hide({ userAction: e }));
|
|
269
269
|
});
|
|
270
270
|
/** 户型图展示中,转动三维模型,结束时应该自动修复模型状态 */
|
|
271
271
|
o(this, "onFiveWantsPanGesture", (t, e) => {
|
|
272
272
|
if (this.five.getCurrentState().mode === this.showState.mode && this.state.config.autoShowEnable !== !1 && e && this.state.visible)
|
|
273
|
-
return this.five.updateCamera(this.showState, 0), !1;
|
|
273
|
+
return this.five.updateCamera(S(this.showState, ["offset"]), 0), !1;
|
|
274
274
|
});
|
|
275
275
|
/** 阻止点击分间走点 */
|
|
276
276
|
o(this, "onFiveWantsTapGesture", () => this.handleClick());
|
|
@@ -307,13 +307,13 @@ class Jt extends O {
|
|
|
307
307
|
roomLabelsEnable: !0,
|
|
308
308
|
roomAreaEnable: !0,
|
|
309
309
|
roomNameEnable: !0,
|
|
310
|
-
cameraImageUrl:
|
|
310
|
+
cameraImageUrl: _,
|
|
311
311
|
attachedTo: L.BOUNDING_CENTER,
|
|
312
312
|
getLabelElement: void 0,
|
|
313
313
|
adaptiveRoomLabelVisibleEnable: !0,
|
|
314
314
|
getRoomAreaText: (s) => (s / 1e6).toFixed(1) + "㎡",
|
|
315
315
|
getRuleDistanceText: (s) => s.toString()
|
|
316
|
-
}, n = e ?
|
|
316
|
+
}, n = e ? S(e, ["selector", "scale"]) : {}, h = c(c({}, i), n);
|
|
317
317
|
this.state = {
|
|
318
318
|
enabled: !0,
|
|
319
319
|
visible: !1,
|
|
@@ -377,7 +377,7 @@ class Jt extends O {
|
|
|
377
377
|
}
|
|
378
378
|
updateState(t, e) {
|
|
379
379
|
const i = this.state, n = t.config ? c(c({}, i.config), t.config) : i.config;
|
|
380
|
-
this.state = v(c(c({}, this.state), t), { config: n }), !
|
|
380
|
+
this.state = v(c(c({}, this.state), t), { config: n }), !x(this.state, i, { deep: !0 }) && this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: e });
|
|
381
381
|
}
|
|
382
382
|
/** 如果用户是通过 selector 设置父容器,需要在 modelLoaded 之后把 container 自动放到父容器里
|
|
383
383
|
*
|
|
@@ -417,9 +417,9 @@ class Jt extends O {
|
|
|
417
417
|
});
|
|
418
418
|
if (this.app)
|
|
419
419
|
return this.app.$set(e);
|
|
420
|
-
this.app = new
|
|
420
|
+
this.app = new M({ target: this.container, intro: !0, props: e });
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
export {
|
|
424
|
-
|
|
424
|
+
qt as Controller
|
|
425
425
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv2.30.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv2.30.3",
|
|
4
4
|
[
|
|
5
5
|
"background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
|
|
6
6
|
"background-repeat: no-repeat",
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"repository": "https://github.com/realsee-developer/dnalogel.git",
|
|
8
8
|
"description": "如视 VR 看房插件合集",
|
|
9
9
|
"private": false,
|
|
10
|
-
"version": "2.30.
|
|
10
|
+
"version": "2.30.3",
|
|
11
11
|
"license": "SEE LICENSE IN TERMS.txt",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"clean": "rm -rf components dist docs libs types ./vite.config.js.timestamp*",
|