@realsee/dnalogel 3.50.17-alpha.0 → 3.51.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.
- package/CHANGELOG.md +3 -0
- package/dist/ModelMakerPlugin/Controller.d.ts +2 -0
- package/dist/Sculpt/utils/export.d.ts +18 -0
- package/dist/index.cjs.js +207 -207
- package/dist/index.js +34866 -34775
- package/dist/index.umd.js +211 -211
- package/dist/shared-utils/five/fiveEveryReadyListener.d.ts +2 -0
- package/dist/shared-utils/index.d.ts +1 -0
- package/dist/shared-utils/tag.d.ts +40 -1
- package/dist/shared-utils/three/temp.d.ts +2 -2
- package/libs/AreaMakerPlugin/Controller.js +100 -46
- package/libs/AreaMakerPlugin/index.js +64 -10
- package/libs/AreaMakerPlugin/utils/Item.js +156 -100
- package/libs/CSS3DRenderPlugin/Controller.js +93 -44
- package/libs/CSS3DRenderPlugin/index.js +62 -13
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +105 -49
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +130 -77
- package/libs/CruisePlugin/BaseController.js +143 -89
- package/libs/CruisePlugin/Move.js +83 -39
- package/libs/CruisePlugin/Work.js +95 -51
- package/libs/CruisePlugin/index.js +66 -22
- package/libs/CurrentPanoImagePlugin/Controller.js +139 -85
- package/libs/CurrentPanoImagePlugin/index.js +63 -9
- package/libs/GuideLinePlugin/Controller.js +57 -13
- package/libs/GuideLinePlugin/GuideLineItem.js +63 -19
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +6 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +58 -14
- package/libs/GuideLinePlugin/index.js +66 -22
- package/libs/ModelMakerPlugin/Controller.d.ts +2 -0
- package/libs/ModelMakerPlugin/Controller.js +190 -129
- package/libs/ModelMakerPlugin/index.js +63 -21
- package/libs/ModelMakerPlugin/item/baseItem.js +4 -2
- package/libs/ModelMakerPlugin/item/boxItem.js +5 -3
- package/libs/ModelMakerPlugin/item/polygonItem.js +9 -7
- package/libs/ModelMakerPlugin/item/prismItem.js +5 -3
- package/libs/ModelTVVideoPlugin/Plugin.js +96 -47
- package/libs/ModelTVVideoPlugin/index.js +55 -6
- package/libs/Object3DHelperPlugin/Controller.js +42 -25
- package/libs/Object3DHelperPlugin/index.js +28 -12
- package/libs/PanoCompassPlugin/Controller.js +92 -44
- package/libs/PanoCompassPlugin/index.js +63 -15
- package/libs/PanoDoorLabelPlugin/BaseController.js +79 -25
- package/libs/PanoDoorLabelPlugin/Controller.js +132 -78
- package/libs/PanoDoorLabelPlugin/index.js +63 -9
- package/libs/PanoMeasurePlugin/Components/Controller0.js +126 -77
- package/libs/PanoMeasurePlugin/Components/Controller1.js +139 -90
- package/libs/PanoMeasurePlugin/Controller/EditController.js +120 -71
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +120 -70
- package/libs/PanoMeasurePlugin/Controller/index.js +132 -86
- package/libs/PanoMeasurePlugin/Model/area.js +72 -22
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +56 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +64 -15
- package/libs/PanoMeasurePlugin/index.js +62 -16
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +57 -2
- package/libs/PanoRulerProPlugin/Controller.js +88 -33
- package/libs/PanoRulerProPlugin/RulerItems.js +146 -91
- package/libs/PanoRulerProPlugin/index.js +64 -9
- package/libs/PanoSpatialTagPlugin/Plugin.js +177 -128
- package/libs/PanoSpatialTagPlugin/index.js +53 -4
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +116 -60
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +192 -136
- package/libs/PanoTagPlugin/Components/Tag/index.js +194 -139
- package/libs/PanoTagPlugin/Components/TagContainer.js +112 -57
- package/libs/PanoTagPlugin/Components/TagItem.js +204 -149
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +157 -101
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +75 -20
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +86 -31
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +93 -37
- package/libs/PanoTagPlugin/controller/TagRender.js +62 -18
- package/libs/PanoTagPlugin/controller/TagUtil.js +123 -79
- package/libs/PanoTagPlugin/controller/index.js +110 -72
- package/libs/PanoTagPlugin/index.js +72 -28
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +77 -21
- package/libs/PanoVideoPlugin/Controller.js +95 -41
- package/libs/PanoVideoPlugin/VideoMeshController.js +119 -63
- package/libs/PanoVideoPlugin/index.js +66 -12
- package/libs/PipelinePlugin/Controller.js +173 -119
- package/libs/PipelinePlugin/index.js +63 -9
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +70 -14
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +58 -2
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +98 -42
- package/libs/Sculpt/Meshes/Box.js +3 -2
- package/libs/Sculpt/Meshes/Cylinder.js +10 -6
- package/libs/Sculpt/Meshes/Line.js +43 -38
- package/libs/Sculpt/Meshes/LineWithDots.js +14 -10
- package/libs/Sculpt/Meshes/Point.js +24 -20
- package/libs/Sculpt/Meshes/Polygon.js +5 -2
- package/libs/Sculpt/Meshes/Prism.js +19 -16
- package/libs/Sculpt/Objects/Line/Editor.js +6 -5
- package/libs/Sculpt/index.js +15 -14
- package/libs/Sculpt/utils/export.d.ts +18 -0
- package/libs/Sculpt/utils/export.js +21 -0
- package/libs/Sculpt/utils/three/ColoredMesh.js +26 -22
- package/libs/base/BasePlugin.js +14 -10
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +146 -94
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +62 -10
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +109 -56
- package/libs/floorplan/ModelFloorplanPlugin/index.js +62 -9
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +116 -63
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +62 -9
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +105 -52
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +62 -9
- package/libs/floorplan/index.js +4 -0
- package/libs/index.js +208 -206
- package/libs/shared-utils/five/fiveEveryReadyListener.d.ts +2 -0
- package/libs/shared-utils/five/fiveEveryReadyListener.js +15 -0
- package/libs/shared-utils/five/index.js +6 -2
- package/libs/shared-utils/five/lookObject.js +31 -27
- package/libs/shared-utils/index.d.ts +1 -0
- package/libs/shared-utils/index.js +19 -17
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +40 -1
- package/libs/shared-utils/tag.js +139 -86
- package/libs/shared-utils/three/index.js +4 -0
- package/libs/shared-utils/three/temp.d.ts +2 -2
- package/libs/shared-utils/three/temp.js +4 -4
- package/package.json +1 -1
- package/README.md +0 -116
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var g = Object.defineProperty;
|
|
2
2
|
var a = Object.getOwnPropertySymbols;
|
|
3
|
-
var
|
|
3
|
+
var p = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable;
|
|
4
4
|
var u = (i, e, t) => e in i ? g(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, d = (i, e) => {
|
|
5
5
|
for (var t in e || (e = {}))
|
|
6
|
-
|
|
6
|
+
p.call(e, t) && u(i, t, e[t]);
|
|
7
7
|
if (a)
|
|
8
8
|
for (var t of a(e))
|
|
9
|
-
|
|
9
|
+
f.call(e, t) && u(i, t, e[t]);
|
|
10
10
|
return i;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
12
|
+
var r = (i, e, t) => (u(i, typeof e != "symbol" ? e + "" : e, t), t);
|
|
13
13
|
import * as s from "three";
|
|
14
|
-
import { DEFAULT_COLOR as
|
|
14
|
+
import { DEFAULT_COLOR as M } from "../../typings/style.js";
|
|
15
15
|
import { IObject3D as F } from "../../../shared-utils/three/IObject3D.js";
|
|
16
16
|
import "../../../shared-utils/tag.js";
|
|
17
17
|
import "hammerjs";
|
|
@@ -21,32 +21,36 @@ import "@realsee/five/line";
|
|
|
21
21
|
import "../../../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
22
22
|
import "../../../shared-utils/three/core/Sphere.js";
|
|
23
23
|
import "animejs";
|
|
24
|
-
import { notNil as
|
|
24
|
+
import { notNil as m } from "../../../shared-utils/isNil.js";
|
|
25
25
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
26
|
-
|
|
26
|
+
import "../../Meshes/Polygon.js";
|
|
27
|
+
import "../Modules/Global.js";
|
|
28
|
+
import "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
29
|
+
import "./rayOnLine.js";
|
|
30
|
+
class N extends F {
|
|
27
31
|
constructor(t) {
|
|
28
|
-
var h,
|
|
32
|
+
var h, y;
|
|
29
33
|
super();
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
r(this, "name", "ColoredMesh");
|
|
35
|
+
r(this, "meshFont");
|
|
36
|
+
r(this, "meshBackground");
|
|
37
|
+
r(this, "paramsStyle", {});
|
|
38
|
+
r(this, "_geometry", new s.BufferGeometry());
|
|
35
39
|
this.paramsStyle = t != null ? t : {};
|
|
36
|
-
const
|
|
37
|
-
color: (h = t == null ? void 0 : t.color) != null ? h :
|
|
40
|
+
const n = new s.MeshBasicMaterial({
|
|
41
|
+
color: (h = t == null ? void 0 : t.color) != null ? h : M,
|
|
38
42
|
transparent: !0,
|
|
39
43
|
side: s.DoubleSide,
|
|
40
44
|
depthTest: !0,
|
|
41
|
-
opacity: (
|
|
45
|
+
opacity: (y = t == null ? void 0 : t.opacity) != null ? y : 0.5
|
|
42
46
|
}), l = new s.MeshBasicMaterial({
|
|
43
47
|
color: 16777215,
|
|
44
48
|
transparent: !0,
|
|
45
49
|
side: s.DoubleSide,
|
|
46
50
|
depthTest: !1,
|
|
47
51
|
depthWrite: !1,
|
|
48
|
-
opacity: 0.3 / 0.5 *
|
|
49
|
-
}), o = new s.Mesh(this.geometry,
|
|
52
|
+
opacity: 0.3 / 0.5 * n.opacity
|
|
53
|
+
}), o = new s.Mesh(this.geometry, n), c = new s.Mesh(this.geometry, l);
|
|
50
54
|
o.name = "MeshFront", c.name = "MeshBackground", o.renderOrder = 1, c.renderOrder = 0, this.meshFont = o, this.meshBackground = c, this.add(o), this.setOcclusionVisibility({ occlusionVisibility: t == null ? void 0 : t.occlusionVisibility, occlusionMode: t == null ? void 0 : t.occlusionMode });
|
|
51
55
|
}
|
|
52
56
|
get style() {
|
|
@@ -76,14 +80,14 @@ class C extends F {
|
|
|
76
80
|
return this._geometry;
|
|
77
81
|
}
|
|
78
82
|
setStyle(t) {
|
|
79
|
-
this.paramsStyle = d(d({}, this.paramsStyle), t),
|
|
83
|
+
this.paramsStyle = d(d({}, this.paramsStyle), t), m(t.color) && (this.meshFont.material.color.set(t.color), this.needsRender = !0), m(t.opacity) && (this.meshFont.material.opacity = t.opacity, this.meshBackground.material.opacity = 0.3 / 0.5 * t.opacity, this.needsRender = !0), this.setOcclusionVisibility(t);
|
|
80
84
|
}
|
|
81
85
|
setOcclusionVisibility(t) {
|
|
82
86
|
var o, c, h;
|
|
83
|
-
const
|
|
84
|
-
|
|
87
|
+
const n = (c = (o = t.occlusionMode) != null ? o : this.paramsStyle.occlusionMode) != null ? c : "translucence", l = (h = t.occlusionVisibility) != null ? h : this.paramsStyle.occlusionVisibility;
|
|
88
|
+
m(l) && (l ? n === "depthTest" ? (this.meshFont.material.depthTest = !1, this.remove(this.meshBackground)) : n === "translucence" && (this.meshFont.material.depthTest = !0, this.addIfNotExists(this.meshBackground)) : (this.meshFont.material.depthTest = !0, this.remove(this.meshBackground)));
|
|
85
89
|
}
|
|
86
90
|
}
|
|
87
91
|
export {
|
|
88
|
-
|
|
92
|
+
N as ColoredMesh
|
|
89
93
|
};
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var s = (
|
|
3
|
-
var i = (
|
|
1
|
+
var e = Object.defineProperty;
|
|
2
|
+
var s = (o, t, r) => t in o ? e(o, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[t] = r;
|
|
3
|
+
var i = (o, t, r) => (s(o, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
4
|
import { Subscribe as l } from "../shared-utils/Subscribe.js";
|
|
5
5
|
import "../shared-utils/tag.js";
|
|
6
6
|
import "three";
|
|
@@ -11,15 +11,19 @@ import "@realsee/five/line";
|
|
|
11
11
|
import "../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
12
12
|
import "../shared-utils/three/core/Sphere.js";
|
|
13
13
|
import "animejs";
|
|
14
|
-
import { FiveUtil as
|
|
15
|
-
import { absoluteUrl as
|
|
14
|
+
import { FiveUtil as m } from "../shared-utils/Utils/FiveUtil.js";
|
|
15
|
+
import { absoluteUrl as p } from "../shared-utils/url/absoluteUrl.js";
|
|
16
16
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
17
|
-
|
|
17
|
+
import "../Sculpt/Meshes/Polygon.js";
|
|
18
|
+
import "../Sculpt/utils/Modules/Global.js";
|
|
19
|
+
import "../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
20
|
+
import "../Sculpt/utils/three/rayOnLine.js";
|
|
21
|
+
let N = class {
|
|
18
22
|
constructor(t, r) {
|
|
19
23
|
/**
|
|
20
24
|
* @realsee/dnalogel 版本号
|
|
21
25
|
*/
|
|
22
|
-
i(this, "VERSION", "3.
|
|
26
|
+
i(this, "VERSION", "3.51.0");
|
|
23
27
|
i(this, "NAME");
|
|
24
28
|
i(this, "five");
|
|
25
29
|
i(this, "workUtil");
|
|
@@ -38,7 +42,7 @@ let b = class {
|
|
|
38
42
|
return this.workUtil.workCode;
|
|
39
43
|
}
|
|
40
44
|
updateFive(t) {
|
|
41
|
-
this.five = t, this.fiveUtil = new
|
|
45
|
+
this.five = t, this.fiveUtil = new m(t), this.workUtil = this.fiveUtil.workUtil;
|
|
42
46
|
}
|
|
43
47
|
/**
|
|
44
48
|
* 获取当前的插件状态,如果当初插件内存在需要通过动画变更的 state 值,则通过此方法可以得到中间状态
|
|
@@ -50,11 +54,11 @@ let b = class {
|
|
|
50
54
|
* @description: 获取静态资源的url
|
|
51
55
|
*/
|
|
52
56
|
absoluteUrl(t) {
|
|
53
|
-
return
|
|
57
|
+
return p(this.staticPrefix, t);
|
|
54
58
|
}
|
|
55
59
|
onWorkCodeChange() {
|
|
56
60
|
}
|
|
57
61
|
};
|
|
58
62
|
export {
|
|
59
|
-
|
|
63
|
+
N as Controller
|
|
60
64
|
};
|
|
@@ -2,7 +2,7 @@ var F = Object.defineProperty, P = Object.defineProperties;
|
|
|
2
2
|
var E = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var w = Object.getOwnPropertySymbols;
|
|
4
4
|
var x = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var v = (d, n, t) => n in d ? F(d, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[n] = t,
|
|
5
|
+
var v = (d, n, t) => n in d ? F(d, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[n] = t, m = (d, n) => {
|
|
6
6
|
for (var t in n || (n = {}))
|
|
7
7
|
x.call(n, t) && v(d, t, n[t]);
|
|
8
8
|
if (w)
|
|
@@ -11,20 +11,20 @@ var v = (d, n, t) => n in d ? F(d, n, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return d;
|
|
12
12
|
}, u = (d, n) => P(d, E(n));
|
|
13
13
|
var o = (d, n, t) => (v(d, typeof n != "symbol" ? n + "" : n, t), t);
|
|
14
|
-
var f = (d, n, t) => new Promise((
|
|
14
|
+
var f = (d, n, t) => new Promise((i, e) => {
|
|
15
15
|
var r = (a) => {
|
|
16
16
|
try {
|
|
17
17
|
s(t.next(a));
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
18
|
+
} catch (p) {
|
|
19
|
+
e(p);
|
|
20
20
|
}
|
|
21
21
|
}, h = (a) => {
|
|
22
22
|
try {
|
|
23
23
|
s(t.throw(a));
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
24
|
+
} catch (p) {
|
|
25
|
+
e(p);
|
|
26
26
|
}
|
|
27
|
-
}, s = (a) => a.done ?
|
|
27
|
+
}, s = (a) => a.done ? i(a.value) : Promise.resolve(a.value).then(r, h);
|
|
28
28
|
s((t = t.apply(d, n)).next());
|
|
29
29
|
});
|
|
30
30
|
import * as b from "three";
|
|
@@ -51,6 +51,10 @@ import "animejs";
|
|
|
51
51
|
import { isNil as U } from "../../shared-utils/isNil.js";
|
|
52
52
|
import { waitFiveModelLoaded as z } from "../../shared-utils/five/fiveModelLoad.js";
|
|
53
53
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
54
|
+
import "../../Sculpt/Meshes/Polygon.js";
|
|
55
|
+
import "../../Sculpt/utils/Modules/Global.js";
|
|
56
|
+
import "../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
57
|
+
import "../../Sculpt/utils/three/rayOnLine.js";
|
|
54
58
|
import "../../shared-utils/isTruelyObject.js";
|
|
55
59
|
import "../../vendor/svelte/internal/index.js";
|
|
56
60
|
import "../../vendor/svelte/transition/index.js";
|
|
@@ -93,7 +97,10 @@ import "../../shared-utils/five/changeMode.js";
|
|
|
93
97
|
import "../../shared-utils/positionToVector3.js";
|
|
94
98
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
95
99
|
import "../../shared-utils/three/temp.js";
|
|
100
|
+
import "../../shared-utils/three/core/Raycaster.js";
|
|
96
101
|
import "../../shared-utils/dom/resizeObserver.js";
|
|
102
|
+
import "../../shared-utils/five/fiveEveryReadyListener.js";
|
|
103
|
+
import "../../shared-utils/throttle.js";
|
|
97
104
|
import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
98
105
|
import "../../shared-utils/three/Magnifier.js";
|
|
99
106
|
import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
@@ -124,17 +131,62 @@ import "../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
|
124
131
|
import "../../shared-utils/three/PointSelector/utils/contents.js";
|
|
125
132
|
import "../../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
126
133
|
import "../../vendor/three/build/three.module.js";
|
|
134
|
+
import "../../shared-utils/three/generatePolygonGeometry.js";
|
|
135
|
+
import "../../shared-utils/three/earcut3D.js";
|
|
136
|
+
import "earcut";
|
|
137
|
+
import "../../shared-utils/three/getNormal.js";
|
|
138
|
+
import "../../PanoMeasurePlugin/utils/isIntersecting.js";
|
|
139
|
+
import "../../Sculpt/utils/three/ColoredMesh.js";
|
|
140
|
+
import "../../shared-utils/three/geometryUtil.js";
|
|
141
|
+
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
142
|
+
import "../../Object3DHelperPlugin/Controller.js";
|
|
143
|
+
import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
144
|
+
import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
145
|
+
import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
146
|
+
import "../../shared-utils/three/boundingBox.js";
|
|
147
|
+
import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
148
|
+
import "../../shared-utils/Object3DHelper/utils/direction.js";
|
|
149
|
+
import "../../shared-utils/Object3DHelper/Constants/color.js";
|
|
150
|
+
import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
151
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
152
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
153
|
+
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
154
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
155
|
+
import "../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
156
|
+
import "../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
157
|
+
import "../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
158
|
+
import "../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
159
|
+
import "../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
160
|
+
import "../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
161
|
+
import "../../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
162
|
+
import "../../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
163
|
+
import "../../shared-utils/threex/domevents/index.js";
|
|
164
|
+
import "../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
165
|
+
import "../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
166
|
+
import "../../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
167
|
+
import "../../shared-utils/Object3DHelper/index.js";
|
|
168
|
+
import "../../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
169
|
+
import "../../shared-utils/math/deg2Rad.js";
|
|
170
|
+
import "../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
171
|
+
import "../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
172
|
+
import "../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
173
|
+
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
174
|
+
import "../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
175
|
+
import "../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
176
|
+
import "../../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
177
|
+
import "../../shared-utils/five/FiveDomEvents.js";
|
|
178
|
+
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
127
179
|
function W(d) {
|
|
128
|
-
const { latitude: n, longitude: t } = d,
|
|
129
|
-
return
|
|
180
|
+
const { latitude: n, longitude: t } = d, i = Math.abs(n - Math.PI / 2) > 5 * Math.PI / 180, e = t > 5 * (Math.PI / 180) && t < 355 * (Math.PI / 180);
|
|
181
|
+
return i || e;
|
|
130
182
|
}
|
|
131
183
|
function G(d) {
|
|
132
|
-
const { latitude: n, longitude: t } = d,
|
|
133
|
-
return
|
|
184
|
+
const { latitude: n, longitude: t } = d, i = Math.abs(n - Math.PI / 2) < 10 * Math.PI / 180, e = t < 30 * (Math.PI / 180) || t > 330 * (Math.PI / 180);
|
|
185
|
+
return i && e;
|
|
134
186
|
}
|
|
135
|
-
class
|
|
136
|
-
constructor(t,
|
|
137
|
-
var a,
|
|
187
|
+
class ye extends O {
|
|
188
|
+
constructor(t, i) {
|
|
189
|
+
var a, p;
|
|
138
190
|
super(t);
|
|
139
191
|
// =============== public properties =================
|
|
140
192
|
o(this, "name", "modelFloorplanPlugin");
|
|
@@ -168,8 +220,8 @@ class Le extends O {
|
|
|
168
220
|
o(this, "highlightData", {});
|
|
169
221
|
/** 销毁插件 */
|
|
170
222
|
o(this, "dispose", () => {
|
|
171
|
-
var t,
|
|
172
|
-
this.removeEventListener(), (t = this.app) == null || t.$destroy(), this.app = void 0, (
|
|
223
|
+
var t, i;
|
|
224
|
+
this.removeEventListener(), (t = this.app) == null || t.$destroy(), this.app = void 0, (i = this.container) == null || i.remove(), this.data = void 0, this.wrapper = void 0, this.selector = void 0, this.hooks.emit("dispose");
|
|
173
225
|
});
|
|
174
226
|
/** 展示户型图
|
|
175
227
|
* 1. show 函数大部分情况下需要耗时
|
|
@@ -183,22 +235,22 @@ class Le extends O {
|
|
|
183
235
|
* @param opts.isAutoShow 是否是自动展示
|
|
184
236
|
* @param opts.userAction 是否是用户行为
|
|
185
237
|
*/
|
|
186
|
-
o(this, "show", (...
|
|
238
|
+
o(this, "show", (...i) => f(this, [...i], function* (t = {}) {
|
|
187
239
|
if (!this.state.enabled || !this.showPromise && this.state.visible)
|
|
188
240
|
return;
|
|
189
|
-
const
|
|
190
|
-
this.updateState({ visible: !0 },
|
|
241
|
+
const e = t.userAction !== void 0 ? t.userAction : !0;
|
|
242
|
+
this.updateState({ visible: !0 }, e), this._show(t);
|
|
191
243
|
}));
|
|
192
244
|
/** 隐藏户型图 */
|
|
193
|
-
o(this, "hide", (...
|
|
245
|
+
o(this, "hide", (...i) => f(this, [...i], function* (t = {}) {
|
|
194
246
|
this.state.enabled && (this.isHiddenByHideFunc = !0, this.state.visible !== !1 && (this.updateState({ visible: !1 }, t.userAction || !0), this._hide(t)));
|
|
195
247
|
}));
|
|
196
248
|
/** 更新户型图大小 */
|
|
197
249
|
o(this, "updateSize", () => {
|
|
198
250
|
if (!this.data || !this.container || !this.wrapper)
|
|
199
251
|
return !1;
|
|
200
|
-
const { min: t, max:
|
|
201
|
-
return this.size.width === a && this.size.height ===
|
|
252
|
+
const { min: t, max: i } = this.data.bounding, e = i.x - t.x, r = i.y - t.y, h = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, s = T(this.five, this.wrapper, this.floorIndex, h), a = Math.ceil(e * s), p = Math.ceil(r * s);
|
|
253
|
+
return this.size.width === a && this.size.height === p || (this.container.style.width = a + "px", this.container.style.height = p + "px", this.size = { width: a, height: p }), !0;
|
|
202
254
|
});
|
|
203
255
|
o(this, "highlight", (t) => {
|
|
204
256
|
this.state.config.highlightEnable && (this.highlightData = t, this.render());
|
|
@@ -207,13 +259,13 @@ class Le extends O {
|
|
|
207
259
|
this.highlightData = {}, this.render();
|
|
208
260
|
});
|
|
209
261
|
o(this, "_disable", (t) => {
|
|
210
|
-
var
|
|
211
|
-
const { userAction:
|
|
212
|
-
this.hooks.emit("disable", { userAction:
|
|
262
|
+
var e, r, h;
|
|
263
|
+
const { userAction: i } = t;
|
|
264
|
+
this.hooks.emit("disable", { userAction: i }), (e = this.showRejection) == null || e.call(this, c.BreakOffByDisable), this.showPromise = void 0, (r = this.app) == null || r.$destroy(), this.app = void 0, (h = this.container) == null || h.remove(), this.removeEventListener();
|
|
213
265
|
});
|
|
214
266
|
o(this, "_enable", (t) => {
|
|
215
|
-
const { userAction:
|
|
216
|
-
this.addEventListener(), this.wrapper && (this.wrapper.append(this.container), this.hooks.emit("enable", { userAction:
|
|
267
|
+
const { userAction: i } = t;
|
|
268
|
+
this.addEventListener(), this.wrapper && (this.wrapper.append(this.container), this.hooks.emit("enable", { userAction: i }), this.state.visible && this._show({ userAction: i }));
|
|
217
269
|
});
|
|
218
270
|
o(this, "_show", (t) => f(this, null, function* () {
|
|
219
271
|
var h;
|
|
@@ -225,47 +277,47 @@ class Le extends O {
|
|
|
225
277
|
throw new Error(c.DataNotLoaded);
|
|
226
278
|
if (this.showPromise)
|
|
227
279
|
return this.showPromise;
|
|
228
|
-
const
|
|
280
|
+
const i = {
|
|
229
281
|
floorIndex: this.floorIndex,
|
|
230
282
|
modelOpacity: this.state.config.modelOpacity,
|
|
231
283
|
immediately: !1,
|
|
232
284
|
isAutoShow: !1,
|
|
233
285
|
userAction: !0
|
|
234
|
-
},
|
|
235
|
-
this.hooks.emit("show", { userAction:
|
|
286
|
+
}, e = m(m({}, i), t), r = () => f(this, null, function* () {
|
|
287
|
+
this.hooks.emit("show", { userAction: e.userAction, auto: e.isAutoShow });
|
|
236
288
|
let s = !1, a;
|
|
237
289
|
this.showRejection = (g) => {
|
|
238
290
|
s = !0, a = g;
|
|
239
291
|
};
|
|
240
|
-
const [
|
|
241
|
-
if (
|
|
242
|
-
throw
|
|
292
|
+
const [p] = yield M(R(this.five, this.showState, e.userAction));
|
|
293
|
+
if (p)
|
|
294
|
+
throw p;
|
|
243
295
|
if (s)
|
|
244
296
|
throw a ? new Error(a) : new Error(c.UnknownError);
|
|
245
297
|
if (!this.updateSize())
|
|
246
298
|
throw new Error(c.UpdateSizeError);
|
|
247
|
-
this.updatePosition(), this.floorIndex =
|
|
299
|
+
this.updatePosition(), this.floorIndex = e.floorIndex, this.fiveUtil.model.show(this.floorIndex);
|
|
248
300
|
});
|
|
249
301
|
return this.isHiddenByHideFunc = !1, this.showPromise = r().then(() => {
|
|
250
302
|
this.showPromise = void 0, this.showRejection = void 0;
|
|
251
|
-
const s =
|
|
303
|
+
const s = e.modelOpacity, a = e.immediately ? 0 : H;
|
|
252
304
|
A(this.five, s, a), this.render(a), this.hooks.emit("showAnimationEnded", {
|
|
253
|
-
auto:
|
|
254
|
-
userAction:
|
|
305
|
+
auto: e.isAutoShow,
|
|
306
|
+
userAction: e.userAction
|
|
255
307
|
});
|
|
256
308
|
}).catch((s) => {
|
|
257
|
-
if (this.showPromise = void 0, this.showRejection = void 0, this.updateState({ visible: !1 },
|
|
309
|
+
if (this.showPromise = void 0, this.showRejection = void 0, this.updateState({ visible: !1 }, e.userAction), !e.isAutoShow && s instanceof Error)
|
|
258
310
|
throw s;
|
|
259
311
|
}), this.showPromise;
|
|
260
312
|
}));
|
|
261
313
|
o(this, "_hide", (t) => {
|
|
262
314
|
var r;
|
|
263
315
|
(r = this.showRejection) == null || r.call(this, c.BreakOffByHide), this.showPromise = void 0;
|
|
264
|
-
const
|
|
316
|
+
const e = m(m({}, {
|
|
265
317
|
userAction: !0,
|
|
266
318
|
isAutoHide: !1
|
|
267
319
|
}), t);
|
|
268
|
-
A(this.five, 1, 0), this.hooks.emit("hide", { auto:
|
|
320
|
+
A(this.five, 1, 0), this.hooks.emit("hide", { auto: e.isAutoHide, userAction: e.userAction }), this.render();
|
|
269
321
|
});
|
|
270
322
|
o(this, "handleClick", () => {
|
|
271
323
|
if (!this.state.visible)
|
|
@@ -275,61 +327,61 @@ class Le extends O {
|
|
|
275
327
|
});
|
|
276
328
|
/** modelLoaded 之后自动执行 append container 操作 */
|
|
277
329
|
o(this, "onFiveModelLoaded", () => {
|
|
278
|
-
const
|
|
279
|
-
if (this.showState.offset =
|
|
330
|
+
const i = this.five.model.bounding.getCenter(new b.Vector3());
|
|
331
|
+
if (this.showState.offset = i, this.state.enabled === !1 || this.wrapper || !this.selector)
|
|
280
332
|
return;
|
|
281
|
-
const
|
|
282
|
-
if (!
|
|
333
|
+
const e = this.selector instanceof Element ? this.selector : document.querySelector(this.selector);
|
|
334
|
+
if (!e)
|
|
283
335
|
throw new Error("不正确的父容器选择器");
|
|
284
|
-
this.wrapper =
|
|
336
|
+
this.wrapper = e, e.append(this.container);
|
|
285
337
|
});
|
|
286
338
|
/** 更改模型时,自动隐藏户型图 */
|
|
287
339
|
o(this, "onFiveModeChange", (t) => {
|
|
288
340
|
t !== this.showState.mode && (this.updateState({ visible: !1 }, !1), this._hide({ userAction: !1 }));
|
|
289
341
|
});
|
|
290
342
|
/** 惯性结束后,判断能否自动展示户型图 */
|
|
291
|
-
o(this, "onFiveInteriaPan", (t,
|
|
292
|
-
if (!
|
|
343
|
+
o(this, "onFiveInteriaPan", (t, i) => {
|
|
344
|
+
if (!i || this.state.visible || this.state.config.autoShowEnable === !1 || this.isHiddenByHideFunc)
|
|
293
345
|
return;
|
|
294
|
-
const
|
|
295
|
-
|
|
346
|
+
const e = this.five.getCurrentState();
|
|
347
|
+
e.mode === this.showState.mode && G(e) && (this.updateState({ visible: !0 }, !0), this._show({ isAutoShow: !0 }));
|
|
296
348
|
});
|
|
297
349
|
/** panoIndex 改变时,更新 floorIndex */
|
|
298
350
|
o(this, "onFivePanoArrived", (t) => {
|
|
299
|
-
var
|
|
300
|
-
(
|
|
351
|
+
var i;
|
|
352
|
+
(i = this.five) != null && i.work && (this.panoIndex = t, this.floorIndex = this.workUtil.observers[t].floorIndex);
|
|
301
353
|
});
|
|
302
354
|
/** cameraUpdate 时判断户型图是否应该自动隐藏 */
|
|
303
|
-
o(this, "onFiveCameraUpdate", (t,
|
|
355
|
+
o(this, "onFiveCameraUpdate", (t, i) => {
|
|
304
356
|
if (!this.state.visible || this.showPromise)
|
|
305
357
|
return;
|
|
306
|
-
const
|
|
307
|
-
this.updatePosition(), this.updateSize(), W(
|
|
358
|
+
const e = this.five.getCurrentState();
|
|
359
|
+
this.updatePosition(), this.updateSize(), W(e) && (this.updateState({ visible: !1 }, i), this._hide({ userAction: i }));
|
|
308
360
|
});
|
|
309
361
|
/** 户型图展示中,转动三维模型,结束时应该自动修复模型状态 */
|
|
310
|
-
o(this, "onFiveWantsPanGesture", (t,
|
|
311
|
-
if (this.five.getCurrentState().mode === this.showState.mode && this.state.config.autoShowEnable !== !1 &&
|
|
362
|
+
o(this, "onFiveWantsPanGesture", (t, i) => {
|
|
363
|
+
if (this.five.getCurrentState().mode === this.showState.mode && this.state.config.autoShowEnable !== !1 && i && this.state.visible)
|
|
312
364
|
return this.five.updateCamera(C(this.showState, ["offset"]), 0), !1;
|
|
313
365
|
});
|
|
314
366
|
/** 阻止点击分间走点 */
|
|
315
367
|
o(this, "onFiveWantsTapGesture", () => this.handleClick());
|
|
316
368
|
/** 从 Panorama 切换到其他模态时,记录当前的相机水平视角 */
|
|
317
|
-
o(this, "onFiveWantsChangeMode", (t,
|
|
318
|
-
|
|
369
|
+
o(this, "onFiveWantsChangeMode", (t, i) => {
|
|
370
|
+
i === "Panorama" && t === this.showState.mode && (this.lastPanoramaLongitude = this.five.getCurrentState().longitude);
|
|
319
371
|
});
|
|
320
372
|
/** 模型楼层高亮改变时,自动进行楼层切换 */
|
|
321
373
|
o(this, "onModelShownFloorChange", (t) => {
|
|
322
|
-
var
|
|
374
|
+
var i;
|
|
323
375
|
if (this.floorIndex !== t) {
|
|
324
376
|
if (t === null) {
|
|
325
|
-
const
|
|
326
|
-
this.floorIndex = (
|
|
377
|
+
const e = this.five.getCurrentState().panoIndex;
|
|
378
|
+
this.floorIndex = (i = this.five.work) == null ? void 0 : i.observers[e].floorIndex;
|
|
327
379
|
return;
|
|
328
380
|
}
|
|
329
381
|
this.floorIndex = t, this.updateSize(), this.render();
|
|
330
382
|
}
|
|
331
383
|
});
|
|
332
|
-
|
|
384
|
+
i != null && i.selector && (this.selector = i.selector, console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")), this.showState = {
|
|
333
385
|
mode: "Mapview",
|
|
334
386
|
longitude: 0,
|
|
335
387
|
latitude: Math.PI / 2
|
|
@@ -337,10 +389,10 @@ class Le extends O {
|
|
|
337
389
|
imageURL: this.staticPrefix + "/release/web/saas/missing-floorplan.e274c596.png",
|
|
338
390
|
imageWidth: 200,
|
|
339
391
|
imageHeight: 120,
|
|
340
|
-
text: (
|
|
392
|
+
text: (p = (a = i.i18n) == null ? void 0 : a.call(i, "暂无平面图")) != null ? p : "暂无平面图",
|
|
341
393
|
textFontSize: 14
|
|
342
394
|
};
|
|
343
|
-
const
|
|
395
|
+
const e = {
|
|
344
396
|
northDesc: "北",
|
|
345
397
|
modelOpacity: 1,
|
|
346
398
|
cameraEnable: !0,
|
|
@@ -357,23 +409,23 @@ class Le extends O {
|
|
|
357
409
|
attachedTo: D.BOUNDING_CENTER,
|
|
358
410
|
getLabelElement: void 0,
|
|
359
411
|
adaptiveRoomLabelVisibleEnable: !0,
|
|
360
|
-
missingFloorConfig:
|
|
361
|
-
i18n: (
|
|
362
|
-
getRoomAreaText: (
|
|
363
|
-
getRoomDimensionText: (
|
|
364
|
-
getRuleDistanceText: (
|
|
365
|
-
}, r =
|
|
412
|
+
missingFloorConfig: m(m({}, this.defaultMissingFloorConfig), i.missingFloorConfig),
|
|
413
|
+
i18n: (l) => l,
|
|
414
|
+
getRoomAreaText: (l) => (l / 1e6).toFixed(1) + "㎡",
|
|
415
|
+
getRoomDimensionText: (l, g) => (l / 1e3).toFixed(1) + "m × " + (g / 1e3).toFixed(1) + "m",
|
|
416
|
+
getRuleDistanceText: (l) => l.toString()
|
|
417
|
+
}, r = i ? C(i, ["selector", "scale"]) : {}, h = m(m({}, e.missingFloorConfig), r.missingFloorConfig), s = u(m(m({}, e), r), { missingFloorConfig: h });
|
|
366
418
|
this.state = { enabled: !0, visible: !1, config: s }, this.initContainer(), z(t).then(this.onFiveModelLoaded), t.once("dispose", this.dispose), this.addEventListener();
|
|
367
419
|
}
|
|
368
|
-
load(t,
|
|
420
|
+
load(t, i, e = !0) {
|
|
369
421
|
return f(this, null, function* () {
|
|
370
|
-
function r(
|
|
371
|
-
return Object.prototype.hasOwnProperty.apply(
|
|
422
|
+
function r(l) {
|
|
423
|
+
return Object.prototype.hasOwnProperty.apply(l, ["version"]);
|
|
372
424
|
}
|
|
373
425
|
const h = t;
|
|
374
426
|
h && U(h.version) && console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");
|
|
375
|
-
const s = JSON.parse(JSON.stringify(t)), a = r(s) ? s.data : s,
|
|
376
|
-
this.data = yield S(a), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data,
|
|
427
|
+
const s = JSON.parse(JSON.stringify(t)), a = r(s) ? s.data : s, p = this.data;
|
|
428
|
+
this.data = yield S(a), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, p), i && this.updateState(i, e), this.render();
|
|
377
429
|
});
|
|
378
430
|
}
|
|
379
431
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
@@ -385,34 +437,34 @@ class Le extends O {
|
|
|
385
437
|
enable(t = {}) {
|
|
386
438
|
if (this.state.enabled)
|
|
387
439
|
return;
|
|
388
|
-
const
|
|
389
|
-
this.updateState({ enabled: !0 }, t.userAction ||
|
|
440
|
+
const i = t.userAction !== void 0 ? t.userAction : !0;
|
|
441
|
+
this.updateState({ enabled: !0 }, t.userAction || i), this._enable({ userAction: i });
|
|
390
442
|
}
|
|
391
443
|
/** 禁用插件 */
|
|
392
444
|
disable(t = {}) {
|
|
393
445
|
if (!this.state.enabled)
|
|
394
446
|
return;
|
|
395
|
-
const
|
|
396
|
-
this.updateState({ enabled: !1 }, t.userAction ||
|
|
447
|
+
const i = t.userAction !== void 0 ? t.userAction : !0;
|
|
448
|
+
this.updateState({ enabled: !1 }, t.userAction || i), this._disable({ userAction: i });
|
|
397
449
|
}
|
|
398
450
|
/** 更改插件 State */
|
|
399
|
-
setState(t,
|
|
400
|
-
const
|
|
401
|
-
if (this.updateState(t, r), t.enabled !== void 0 &&
|
|
451
|
+
setState(t, i = {}) {
|
|
452
|
+
const e = this.state, r = i.userAction !== void 0 ? i.userAction : !0;
|
|
453
|
+
if (this.updateState(t, r), t.enabled !== void 0 && e.enabled !== t.enabled && (t.enabled ? this._enable({ userAction: r }) : this._disable({ userAction: r })), t.visible !== void 0 && e.visible !== t.visible) {
|
|
402
454
|
const h = { userAction: r };
|
|
403
455
|
t.visible ? this._show(h) : this._hide(h);
|
|
404
456
|
}
|
|
405
457
|
}
|
|
406
|
-
changeConfigs(t,
|
|
407
|
-
this.updateState({ config: t },
|
|
458
|
+
changeConfigs(t, i = !0) {
|
|
459
|
+
this.updateState({ config: t }, i), this.render();
|
|
408
460
|
}
|
|
409
461
|
/** 更新户型图位置 */
|
|
410
462
|
updatePosition() {
|
|
411
463
|
var s;
|
|
412
|
-
const t = k(this.five, this.floorIndex, this.state.config.attachedTo),
|
|
413
|
-
if (!
|
|
464
|
+
const t = k(this.five, this.floorIndex, this.state.config.attachedTo), i = (s = this.fiveUtil.model) == null ? void 0 : s.bounding.getCenter(new b.Vector3()).setY(t);
|
|
465
|
+
if (!i)
|
|
414
466
|
return;
|
|
415
|
-
const
|
|
467
|
+
const e = i.clone().project(this.five.camera), r = (e.x + 1) / 2, h = -(e.y - 1) / 2;
|
|
416
468
|
this.container.style.left = r * 100 + "%", this.container.style.top = h * 100 + "%";
|
|
417
469
|
}
|
|
418
470
|
formatData(t) {
|
|
@@ -420,10 +472,10 @@ class Le extends O {
|
|
|
420
472
|
return yield S(t.data);
|
|
421
473
|
});
|
|
422
474
|
}
|
|
423
|
-
updateState(t,
|
|
475
|
+
updateState(t, i) {
|
|
424
476
|
var s;
|
|
425
|
-
const
|
|
426
|
-
this.state = u(
|
|
477
|
+
const e = this.state, r = (s = t.config) != null && s.missingFloorConfig ? m(m({}, e.config.missingFloorConfig), t.config.missingFloorConfig) : e.config.missingFloorConfig, h = t.config ? u(m(m({}, e.config), t.config), { missingFloorConfig: r }) : e.config;
|
|
478
|
+
this.state = u(m(m({}, this.state), t), { config: h }), !y(this.state, e, { deep: !0 }) && this.hooks.emit("stateChange", { state: this.state, prevState: e, userAction: i });
|
|
427
479
|
}
|
|
428
480
|
/** 如果用户是通过 selector 设置父容器,需要在 modelLoaded 之后把 container 自动放到父容器里
|
|
429
481
|
*
|
|
@@ -452,7 +504,7 @@ class Le extends O {
|
|
|
452
504
|
render(t) {
|
|
453
505
|
if (!this.state.enabled || !this.container || !this.data || this.size.width === 0 || this.showPromise)
|
|
454
506
|
return;
|
|
455
|
-
const
|
|
507
|
+
const i = u(m({}, this.state.config), {
|
|
456
508
|
visible: this.state.visible,
|
|
457
509
|
duration: t != null ? t : 0,
|
|
458
510
|
panoIndex: this.panoIndex,
|
|
@@ -462,10 +514,10 @@ class Le extends O {
|
|
|
462
514
|
highlightData: this.highlightData
|
|
463
515
|
});
|
|
464
516
|
if (this.app)
|
|
465
|
-
return this.app.$set(
|
|
466
|
-
this.app = new _({ target: this.container, intro: !0, props:
|
|
517
|
+
return this.app.$set(i);
|
|
518
|
+
this.app = new _({ target: this.container, intro: !0, props: i });
|
|
467
519
|
}
|
|
468
520
|
}
|
|
469
521
|
export {
|
|
470
|
-
|
|
522
|
+
ye as Controller
|
|
471
523
|
};
|