@realsee/dnalogel 2.0.0-alpha.16 → 2.0.0-alpha.19
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 +13 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +2 -2
- package/dist/CameraMovementPlugin/index.js +15 -40
- package/dist/CameraMovementPlugin/typing.d.ts +1 -1
- package/dist/ModelChassisCompassPlugin/index.js +3 -28
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
- package/dist/ModelEntryDoorGuidePlugin/index.js +8 -33
- package/dist/ModelItemLabelPlugin/events.type.d.ts +2 -2
- package/dist/ModelItemLabelPlugin/index.js +8 -8
- package/dist/ModelItemLabelPlugin/typings.d.ts +2 -2
- package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +1 -1
- package/dist/ModelRoomLabelPlugin/index.js +6 -6
- package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/dist/ModelTVVideoPlugin/index.d.ts +1 -1
- package/dist/ModelTVVideoPlugin/index.js +3 -28
- package/dist/PanoCompassPlugin/index.js +53 -86
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +8 -8
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +3 -3
- package/dist/PanoMeasurePlugin/Model/index.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Model/line.d.ts +5 -5
- package/dist/PanoMeasurePlugin/Model/point.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/index.js +1 -21
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +4 -4
- package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/constants.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
- package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
- package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
- package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/line.d.ts +1 -1
- package/dist/PanoRulerPlugin/index.d.ts +1 -1
- package/dist/PanoRulerPlugin/index.js +3 -28
- package/dist/PanoSpatialTagPlugin/index.js +11 -11
- package/dist/PanoSpatialTagPlugin/typings.d.ts +1 -1
- package/dist/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.d.ts +0 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -2
- package/dist/floorplan/ModelFloorplanPlugin/index.js +1266 -1298
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +81 -204
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +28 -15
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +1257 -1250
- package/dist/floorplan/utils/formatPosition.d.ts +1 -1
- package/dist/index.es.js +1480 -1507
- package/dist/index.js +1477 -1504
- package/dist/index.umd.js +1477 -1504
- package/dist/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/dist/shared-utils/three/getNormal.d.ts +1 -1
- package/dist/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/dist/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/dist/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/ModelRoomLabelController.html +6 -6
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ModelFloorplanErrorType.html +1 -1
- package/docs/interfaces/LineJson.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
- package/docs/interfaces/ModelFloorplanParameterType.html +1 -1
- package/docs/interfaces/ModelFloorplanViewEvent.html +2 -2
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +19 -1
- package/docs/modules.html +12 -12
- package/libs/CSS3DRenderPlugin/index.d.ts +2 -2
- package/libs/CameraMovementPlugin/index.js +15 -24
- package/libs/CameraMovementPlugin/typing.d.ts +1 -1
- package/libs/ModelChassisCompassPlugin/index.js +3 -12
- package/libs/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
- package/libs/ModelEntryDoorGuidePlugin/index.js +8 -17
- package/libs/ModelItemLabelPlugin/events.type.d.ts +2 -2
- package/libs/ModelItemLabelPlugin/typings.d.ts +2 -2
- package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/index.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/index.js +3 -12
- package/libs/ModelTVVideoPlugin/typings.js +1 -0
- package/libs/PanoCompassPlugin/index.js +49 -64
- package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +8 -8
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/EditController.js +1 -1
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +3 -3
- package/libs/PanoMeasurePlugin/Model/index.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/line.d.ts +5 -5
- package/libs/PanoMeasurePlugin/Model/line.js +1 -1
- package/libs/PanoMeasurePlugin/Model/point.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +4 -4
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/constants.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/line.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +1 -0
- package/libs/PanoRulerPlugin/index.d.ts +1 -1
- package/libs/PanoRulerPlugin/index.js +3 -12
- package/libs/PanoSpatialTagPlugin/typings.d.ts +1 -1
- package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.d.ts +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.js +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Camera.js +2 -2
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Compass.js +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components/CurrentFloor → Components}/CurrentFloor.js +73 -80
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Main.js +186 -105
- package/libs/floorplan/Components/RoomHighlight/Room.js +5 -7
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +24 -116
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RoomLabels/RoomLabel.js +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RoomLabels/RoomLabels.js +2 -2
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +26 -22
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RuleLabels/RuleLabels.js +82 -32
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -2
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +34 -43
- package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +22 -33
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +3 -12
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +28 -15
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +80 -54
- package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +0 -1
- package/libs/floorplan/utils/formatData.js +28 -43
- package/libs/floorplan/utils/formatPosition.d.ts +1 -1
- package/libs/floorplan/utils/formatPosition.js +2 -2
- package/libs/shared-utils/five/changeMode.js +12 -23
- package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/libs/shared-utils/three/getNormal.d.ts +1 -1
- package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/libs/shared-utils/three/loadFbxObj.js +9 -20
- package/libs/shared-utils/three/loadTexture.js +6 -17
- package/libs/shared-utils/to.js +10 -21
- package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/package.json +3 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +0 -301
package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RuleLabels/RuleLabels.js
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* generated by Svelte v3.47.0 */
|
|
2
2
|
import {
|
|
3
3
|
SvelteComponent,
|
|
4
|
+
append_styles,
|
|
4
5
|
assign,
|
|
5
6
|
attr,
|
|
6
7
|
check_outros,
|
|
@@ -16,6 +17,7 @@ import {
|
|
|
16
17
|
mount_component,
|
|
17
18
|
outro_and_destroy_block,
|
|
18
19
|
safe_not_equal,
|
|
20
|
+
set_style,
|
|
19
21
|
transition_in,
|
|
20
22
|
transition_out,
|
|
21
23
|
update_keyed_each
|
|
@@ -23,14 +25,18 @@ import {
|
|
|
23
25
|
|
|
24
26
|
import RuleItem from './RuleItem';
|
|
25
27
|
|
|
28
|
+
function add_css(target) {
|
|
29
|
+
append_styles(target, "svelte-12vlcaz", ".floorplan-plugin__rule-labels-wrapper.svelte-12vlcaz{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}");
|
|
30
|
+
}
|
|
31
|
+
|
|
26
32
|
function get_each_context(ctx, list, i) {
|
|
27
33
|
const child_ctx = ctx.slice();
|
|
28
|
-
child_ctx[
|
|
29
|
-
child_ctx[
|
|
34
|
+
child_ctx[12] = list[i][0];
|
|
35
|
+
child_ctx[13] = list[i][1];
|
|
30
36
|
return child_ctx;
|
|
31
37
|
}
|
|
32
38
|
|
|
33
|
-
// (
|
|
39
|
+
// (19:2) {#each ruleLabelArray as [type, data] (type)}
|
|
34
40
|
function create_each_block(key_1, ctx) {
|
|
35
41
|
let first;
|
|
36
42
|
let ruleitem;
|
|
@@ -38,10 +44,9 @@ function create_each_block(key_1, ctx) {
|
|
|
38
44
|
|
|
39
45
|
const ruleitem_spread_levels = [
|
|
40
46
|
{
|
|
41
|
-
type: /*type*/ ctx[
|
|
42
|
-
data: /*data*/ ctx[
|
|
43
|
-
|
|
44
|
-
bounding: /*bounding*/ ctx[2]
|
|
47
|
+
type: /*type*/ ctx[12],
|
|
48
|
+
data: /*data*/ ctx[13],
|
|
49
|
+
bounding: /*bounding*/ ctx[0]
|
|
45
50
|
}
|
|
46
51
|
];
|
|
47
52
|
|
|
@@ -69,13 +74,12 @@ function create_each_block(key_1, ctx) {
|
|
|
69
74
|
p(new_ctx, dirty) {
|
|
70
75
|
ctx = new_ctx;
|
|
71
76
|
|
|
72
|
-
const ruleitem_changes = (dirty & /*ruleLabelArray,
|
|
77
|
+
const ruleitem_changes = (dirty & /*ruleLabelArray, bounding*/ 9)
|
|
73
78
|
? get_spread_update(ruleitem_spread_levels, [
|
|
74
79
|
{
|
|
75
|
-
type: /*type*/ ctx[
|
|
76
|
-
data: /*data*/ ctx[
|
|
77
|
-
|
|
78
|
-
bounding: /*bounding*/ ctx[2]
|
|
80
|
+
type: /*type*/ ctx[12],
|
|
81
|
+
data: /*data*/ ctx[13],
|
|
82
|
+
bounding: /*bounding*/ ctx[0]
|
|
79
83
|
}
|
|
80
84
|
])
|
|
81
85
|
: {};
|
|
@@ -103,8 +107,8 @@ function create_fragment(ctx) {
|
|
|
103
107
|
let each_blocks = [];
|
|
104
108
|
let each_1_lookup = new Map();
|
|
105
109
|
let current;
|
|
106
|
-
let each_value = /*ruleLabelArray*/ ctx[
|
|
107
|
-
const get_key = ctx => /*type*/ ctx[
|
|
110
|
+
let each_value = /*ruleLabelArray*/ ctx[3];
|
|
111
|
+
const get_key = ctx => /*type*/ ctx[12];
|
|
108
112
|
|
|
109
113
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
110
114
|
let child_ctx = get_each_context(ctx, each_value, i);
|
|
@@ -120,7 +124,9 @@ function create_fragment(ctx) {
|
|
|
120
124
|
each_blocks[i].c();
|
|
121
125
|
}
|
|
122
126
|
|
|
123
|
-
attr(div, "class", "floorplan-
|
|
127
|
+
attr(div, "class", "floorplan-plugin__rule-labels-wrapper svelte-12vlcaz");
|
|
128
|
+
set_style(div, "width", /*width*/ ctx[2], false);
|
|
129
|
+
set_style(div, "height", /*height*/ ctx[1], false);
|
|
124
130
|
},
|
|
125
131
|
m(target, anchor) {
|
|
126
132
|
insert(target, div, anchor);
|
|
@@ -132,12 +138,20 @@ function create_fragment(ctx) {
|
|
|
132
138
|
current = true;
|
|
133
139
|
},
|
|
134
140
|
p(ctx, [dirty]) {
|
|
135
|
-
if (dirty & /*ruleLabelArray,
|
|
136
|
-
each_value = /*ruleLabelArray*/ ctx[
|
|
141
|
+
if (dirty & /*ruleLabelArray, bounding*/ 9) {
|
|
142
|
+
each_value = /*ruleLabelArray*/ ctx[3];
|
|
137
143
|
group_outros();
|
|
138
144
|
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, outro_and_destroy_block, create_each_block, null, get_each_context);
|
|
139
145
|
check_outros();
|
|
140
146
|
}
|
|
147
|
+
|
|
148
|
+
if (dirty & /*width*/ 4) {
|
|
149
|
+
set_style(div, "width", /*width*/ ctx[2], false);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (dirty & /*height*/ 2) {
|
|
153
|
+
set_style(div, "height", /*height*/ ctx[1], false);
|
|
154
|
+
}
|
|
141
155
|
},
|
|
142
156
|
i(local) {
|
|
143
157
|
if (current) return;
|
|
@@ -165,45 +179,81 @@ function create_fragment(ctx) {
|
|
|
165
179
|
};
|
|
166
180
|
}
|
|
167
181
|
|
|
182
|
+
const padding = 1000;
|
|
183
|
+
const exteriorWallOffset = 180;
|
|
184
|
+
|
|
168
185
|
function instance($$self, $$props, $$invalidate) {
|
|
169
186
|
let bounding;
|
|
170
187
|
let ruleLabelData;
|
|
171
188
|
let ruleLabelDataKeys;
|
|
172
189
|
let ruleLabelArray;
|
|
173
|
-
let
|
|
190
|
+
let boundingWidth;
|
|
191
|
+
let boundingHeight;
|
|
192
|
+
let contentWidth;
|
|
193
|
+
let contentHeight;
|
|
194
|
+
let width;
|
|
195
|
+
let height;
|
|
174
196
|
let { floorIndex } = $$props;
|
|
175
197
|
let { floorplanData } = $$props;
|
|
176
198
|
|
|
177
199
|
$$self.$$set = $$props => {
|
|
178
|
-
if ('
|
|
179
|
-
if ('
|
|
180
|
-
if ('floorplanData' in $$props) $$invalidate(4, floorplanData = $$props.floorplanData);
|
|
200
|
+
if ('floorIndex' in $$props) $$invalidate(4, floorIndex = $$props.floorIndex);
|
|
201
|
+
if ('floorplanData' in $$props) $$invalidate(5, floorplanData = $$props.floorplanData);
|
|
181
202
|
};
|
|
182
203
|
|
|
183
204
|
$$self.$$.update = () => {
|
|
184
|
-
if ($$self.$$.dirty & /*floorplanData*/
|
|
185
|
-
$: $$invalidate(
|
|
205
|
+
if ($$self.$$.dirty & /*floorplanData*/ 32) {
|
|
206
|
+
$: $$invalidate(0, bounding = floorplanData.bounding);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 48) {
|
|
210
|
+
$: $$invalidate(10, ruleLabelData = floorplanData.floorDatas[floorIndex].rules);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if ($$self.$$.dirty & /*ruleLabelData*/ 1024) {
|
|
214
|
+
$: $$invalidate(11, ruleLabelDataKeys = Object.keys(ruleLabelData));
|
|
186
215
|
}
|
|
187
216
|
|
|
188
|
-
if ($$self.$$.dirty & /*
|
|
189
|
-
$: $$invalidate(
|
|
217
|
+
if ($$self.$$.dirty & /*ruleLabelDataKeys, ruleLabelData*/ 3072) {
|
|
218
|
+
$: $$invalidate(3, ruleLabelArray = ruleLabelDataKeys.map(key => [key, ruleLabelData[key]]));
|
|
190
219
|
}
|
|
191
220
|
|
|
192
|
-
if ($$self.$$.dirty & /*
|
|
193
|
-
$: $$invalidate(
|
|
221
|
+
if ($$self.$$.dirty & /*bounding*/ 1) {
|
|
222
|
+
$: $$invalidate(8, boundingWidth = bounding.max.x - bounding.min.x);
|
|
194
223
|
}
|
|
195
224
|
|
|
196
|
-
if ($$self.$$.dirty & /*
|
|
197
|
-
$: $$invalidate(
|
|
225
|
+
if ($$self.$$.dirty & /*bounding*/ 1) {
|
|
226
|
+
$: $$invalidate(6, boundingHeight = bounding.max.y - bounding.min.y);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
if ($$self.$$.dirty & /*bounding*/ 1) {
|
|
230
|
+
$: $$invalidate(9, contentWidth = bounding.max.x - bounding.min.x - (padding - exteriorWallOffset) * 2);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if ($$self.$$.dirty & /*bounding*/ 1) {
|
|
234
|
+
$: $$invalidate(7, contentHeight = bounding.max.y - bounding.min.y - (padding - exteriorWallOffset) * 2);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
if ($$self.$$.dirty & /*contentWidth, boundingWidth*/ 768) {
|
|
238
|
+
$: $$invalidate(2, width = contentWidth / boundingWidth * 100 + '%');
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if ($$self.$$.dirty & /*contentHeight, boundingHeight*/ 192) {
|
|
242
|
+
$: $$invalidate(1, height = contentHeight / boundingHeight * 100 + '%');
|
|
198
243
|
}
|
|
199
244
|
};
|
|
200
245
|
|
|
201
246
|
return [
|
|
202
|
-
pxmm,
|
|
203
|
-
ruleLabelArray,
|
|
204
247
|
bounding,
|
|
248
|
+
height,
|
|
249
|
+
width,
|
|
250
|
+
ruleLabelArray,
|
|
205
251
|
floorIndex,
|
|
206
252
|
floorplanData,
|
|
253
|
+
boundingHeight,
|
|
254
|
+
contentHeight,
|
|
255
|
+
boundingWidth,
|
|
256
|
+
contentWidth,
|
|
207
257
|
ruleLabelData,
|
|
208
258
|
ruleLabelDataKeys
|
|
209
259
|
];
|
|
@@ -212,7 +262,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
212
262
|
class Component extends SvelteComponent {
|
|
213
263
|
constructor(options) {
|
|
214
264
|
super();
|
|
215
|
-
init(this, options, instance, create_fragment, safe_not_equal, {
|
|
265
|
+
init(this, options, instance, create_fragment, safe_not_equal, { floorIndex: 4, floorplanData: 5 }, add_css);
|
|
216
266
|
}
|
|
217
267
|
}
|
|
218
268
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FLOOR_PLAN_ATTACHED_TO } from '../constant';
|
|
2
2
|
import type { FloorplanEventHandlers } from './typings/events.type';
|
|
3
3
|
import type { FloorplanServerData } from '../typings/floorplanServerData';
|
|
4
4
|
import type { FloorplanRoomItem } from '../typings/floorplanData';
|
|
5
|
-
import {
|
|
5
|
+
import { Five, Subscribe } from '@realsee/five';
|
|
6
6
|
export interface ModelFloorplanParameterType {
|
|
7
7
|
northDesc?: string;
|
|
8
8
|
selector?: string | Element;
|
|
@@ -1,22 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import Main from './Components/Main';
|
|
1
|
+
import { omit } from '../../shared-utils/filter';
|
|
2
|
+
import { Subscribe } from '@realsee/five';
|
|
3
|
+
import { FloorplanErrorType, FIVE_CAMERA_DEFAULT_FOV, SHOW_ANIME_DURATION } from './utils/constant';
|
|
11
4
|
import to from '../../shared-utils/to';
|
|
5
|
+
import Main from '../Components/Main';
|
|
12
6
|
import formatData from '../utils/formatData';
|
|
13
7
|
import equal from '../../shared-utils/equal';
|
|
14
8
|
import getPxmm from '../../shared-utils/getPxmm';
|
|
15
9
|
import correctFiveState, { checkShowState } from './utils/correctFiveState';
|
|
16
10
|
import changeModelCanvasOpacity from '../../shared-utils/changeModelCanvasOpacity';
|
|
17
|
-
import { omit } from '../../shared-utils/filter';
|
|
18
|
-
import { Subscribe } from '@realsee/five';
|
|
19
|
-
import { FloorplanErrorType, FIVE_CAMERA_DEFAULT_FOV, SHOW_ANIME_DURATION } from './utils/constant';
|
|
20
11
|
export const MODEL_FLOORPLAN_PLUGIN_NAME = 'modelFloorplanPlugin';
|
|
21
12
|
export default class ModelFloorplanPluginController {
|
|
22
13
|
constructor(five, params) {
|
|
@@ -203,12 +194,12 @@ export default class ModelFloorplanPluginController {
|
|
|
203
194
|
enumerable: true,
|
|
204
195
|
configurable: true,
|
|
205
196
|
writable: true,
|
|
206
|
-
value: (opts) =>
|
|
207
|
-
var
|
|
197
|
+
value: async (opts) => {
|
|
198
|
+
var _a, _b;
|
|
208
199
|
// 已经在展示中了
|
|
209
200
|
if (!this.showPromise && this.visible)
|
|
210
201
|
return true;
|
|
211
|
-
if (!((
|
|
202
|
+
if (!((_a = this.five.model) === null || _a === void 0 ? void 0 : _a.loaded))
|
|
212
203
|
throw new Error(FloorplanErrorType.ModelNotLoaded);
|
|
213
204
|
if (!this.floorplanData)
|
|
214
205
|
throw new Error(FloorplanErrorType.DataNotLoaded);
|
|
@@ -218,18 +209,18 @@ export default class ModelFloorplanPluginController {
|
|
|
218
209
|
if (!!this.showPromise && sameWithLastOpts)
|
|
219
210
|
return this.showPromise;
|
|
220
211
|
if (!!this.showPromise && !sameWithLastOpts)
|
|
221
|
-
(
|
|
212
|
+
(_b = this.showRejection) === null || _b === void 0 ? void 0 : _b.call(this, FloorplanErrorType.DifferentShowParams);
|
|
222
213
|
}
|
|
223
214
|
this.ModelFloorplanPluginsShowOpts = opts;
|
|
224
|
-
const getShowPromise = () =>
|
|
225
|
-
var
|
|
215
|
+
const getShowPromise = async () => {
|
|
216
|
+
var _a, _b;
|
|
226
217
|
let hasRejected = false;
|
|
227
218
|
let externalErrorMsg;
|
|
228
219
|
this.showRejection = (errorMsg) => {
|
|
229
220
|
hasRejected = true;
|
|
230
221
|
externalErrorMsg = errorMsg;
|
|
231
222
|
};
|
|
232
|
-
const [correctError] =
|
|
223
|
+
const [correctError] = await to(correctFiveState(this.five, this.showState, opts === null || opts === void 0 ? void 0 : opts.userAction));
|
|
233
224
|
if (correctError)
|
|
234
225
|
throw correctError;
|
|
235
226
|
// 异步结束要判断当前是不是被中断了,是不是调用了隐藏
|
|
@@ -248,7 +239,7 @@ export default class ModelFloorplanPluginController {
|
|
|
248
239
|
this.floorIndex = opts.floorIndex;
|
|
249
240
|
this.five.model.show(this.floorIndex);
|
|
250
241
|
// 模型消失, 渲染户型图
|
|
251
|
-
const modelOpacity = (
|
|
242
|
+
const modelOpacity = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.modelOpacity) !== null && _a !== void 0 ? _a : this.configs.modelOpacity) !== null && _b !== void 0 ? _b : 1;
|
|
252
243
|
const renderDuration = (opts === null || opts === void 0 ? void 0 : opts.immediately) ? 0 : SHOW_ANIME_DURATION;
|
|
253
244
|
changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
|
|
254
245
|
this.render(renderDuration);
|
|
@@ -256,7 +247,7 @@ export default class ModelFloorplanPluginController {
|
|
|
256
247
|
this.five.on('wantsGesture', this.handleWantsGesture);
|
|
257
248
|
this.five.on('wantsTapGesture', this.handleWantsTapGesture);
|
|
258
249
|
return true;
|
|
259
|
-
}
|
|
250
|
+
};
|
|
260
251
|
const showPromise = getShowPromise()
|
|
261
252
|
.then(() => {
|
|
262
253
|
var _a;
|
|
@@ -278,7 +269,7 @@ export default class ModelFloorplanPluginController {
|
|
|
278
269
|
});
|
|
279
270
|
this.showPromise = showPromise;
|
|
280
271
|
return showPromise;
|
|
281
|
-
}
|
|
272
|
+
}
|
|
282
273
|
});
|
|
283
274
|
/** 隐藏户型图 */
|
|
284
275
|
Object.defineProperty(this, "hide", {
|
|
@@ -308,8 +299,13 @@ export default class ModelFloorplanPluginController {
|
|
|
308
299
|
configurable: true,
|
|
309
300
|
writable: true,
|
|
310
301
|
value: (shownFloor) => {
|
|
311
|
-
if (
|
|
302
|
+
if (this.floorIndex === shownFloor)
|
|
312
303
|
return;
|
|
304
|
+
if (shownFloor === null) {
|
|
305
|
+
const panoIndex = this.five.getCurrentState().panoIndex;
|
|
306
|
+
this.floorIndex = this.five.work.observers[panoIndex].floorIndex;
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
313
309
|
this.floorIndex = shownFloor;
|
|
314
310
|
this.updateSize();
|
|
315
311
|
this.render();
|
|
@@ -422,7 +418,9 @@ export default class ModelFloorplanPluginController {
|
|
|
422
418
|
enumerable: true,
|
|
423
419
|
configurable: true,
|
|
424
420
|
writable: true,
|
|
425
|
-
value: ({ latitude, longitude }, isFinal) =>
|
|
421
|
+
value: async ({ latitude, longitude }, isFinal) => {
|
|
422
|
+
if (this.five.getCurrentState().mode !== 'Floorplan')
|
|
423
|
+
return;
|
|
426
424
|
if (this.configs.autoShowEnable === false)
|
|
427
425
|
return;
|
|
428
426
|
// 如果操作结束后,户型图还在展示中,初始化模型状态
|
|
@@ -443,16 +441,16 @@ export default class ModelFloorplanPluginController {
|
|
|
443
441
|
const longitudeVisible = longitude < 30 * (Math.PI / 180) || longitude > 330 * (Math.PI / 180);
|
|
444
442
|
if (isFinal && !this.visible && latitudeVisible && longitudeVisible) {
|
|
445
443
|
// 当手指离开时需要等惯性结束之后在进行判断
|
|
446
|
-
const handleInteriaPan = (any, isFinal) =>
|
|
444
|
+
const handleInteriaPan = async (any, isFinal) => {
|
|
447
445
|
if (!isFinal)
|
|
448
446
|
return;
|
|
449
447
|
this.five.off('interiaPan', handleInteriaPan);
|
|
450
|
-
|
|
451
|
-
}
|
|
448
|
+
await this.show({ isAutoShow: true });
|
|
449
|
+
};
|
|
452
450
|
this.five.on('interiaPan', handleInteriaPan);
|
|
453
451
|
return;
|
|
454
452
|
}
|
|
455
|
-
}
|
|
453
|
+
}
|
|
456
454
|
});
|
|
457
455
|
this.five = five;
|
|
458
456
|
this.hooks = new Subscribe();
|
|
@@ -466,9 +464,9 @@ export default class ModelFloorplanPluginController {
|
|
|
466
464
|
left: '50%',
|
|
467
465
|
top: '50%',
|
|
468
466
|
transform: 'translate(-50%, -50%)',
|
|
469
|
-
pointerEvents: 'none',
|
|
470
467
|
zIndex: 10,
|
|
471
468
|
});
|
|
469
|
+
this.five.addExtraElement(this.container);
|
|
472
470
|
// 如果初始化的时候模型已经加载完毕了,就不用再等 modelLoaded
|
|
473
471
|
this.five.model.loaded ? this.handleModelLoaded() : five.once('modelLoaded', this.handleModelLoaded);
|
|
474
472
|
five.once('dispose', this.dispose);
|
|
@@ -479,12 +477,10 @@ export default class ModelFloorplanPluginController {
|
|
|
479
477
|
five.on('modelShownFloorChange', this.onModelShownFloorChange);
|
|
480
478
|
}
|
|
481
479
|
/** 加载户型图数据 */
|
|
482
|
-
load(data) {
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
this.render();
|
|
487
|
-
});
|
|
480
|
+
async load(data) {
|
|
481
|
+
const copyData = JSON.parse(JSON.stringify(data));
|
|
482
|
+
this.floorplanData = await formatData(copyData);
|
|
483
|
+
this.render();
|
|
488
484
|
}
|
|
489
485
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
490
486
|
appendTo(wrapper) {
|
|
@@ -495,8 +491,6 @@ export default class ModelFloorplanPluginController {
|
|
|
495
491
|
/** 更改户型图楼层 */
|
|
496
492
|
changeFloor(floorIndex) {
|
|
497
493
|
this.five.model.show(floorIndex);
|
|
498
|
-
this.floorIndex = floorIndex;
|
|
499
|
-
this.render();
|
|
500
494
|
}
|
|
501
495
|
changeConfigs(params) {
|
|
502
496
|
Object.assign(this.configs, params);
|
|
@@ -511,10 +505,9 @@ export default class ModelFloorplanPluginController {
|
|
|
511
505
|
return;
|
|
512
506
|
const { northDesc, hoverEnable, cameraImageUrl, getLabelElement, roomLabelsEnable, compassEnable, ruleLabelsEnable } = this.configs;
|
|
513
507
|
const props = {
|
|
514
|
-
northDesc: northDesc !== null && northDesc !== void 0 ? northDesc : '北',
|
|
515
|
-
five: this.five,
|
|
516
|
-
pxmm: this.pxmm,
|
|
517
508
|
cameraImageUrl,
|
|
509
|
+
getLabelElement,
|
|
510
|
+
northDesc: northDesc !== null && northDesc !== void 0 ? northDesc : '北',
|
|
518
511
|
visible: this.visible,
|
|
519
512
|
duration: duration !== null && duration !== void 0 ? duration : 0,
|
|
520
513
|
panoIndex: this.panoIndex,
|
|
@@ -525,8 +518,6 @@ export default class ModelFloorplanPluginController {
|
|
|
525
518
|
ruleLabelsEnable: ruleLabelsEnable !== null && ruleLabelsEnable !== void 0 ? ruleLabelsEnable : true,
|
|
526
519
|
roomLabelsEnable: roomLabelsEnable !== null && roomLabelsEnable !== void 0 ? roomLabelsEnable : true,
|
|
527
520
|
lastPanoramaLongitude: this.lastPanoramaLongitude,
|
|
528
|
-
getLabelElement,
|
|
529
|
-
onRoomHeightClick: this.handleClick,
|
|
530
521
|
};
|
|
531
522
|
if (!this.app) {
|
|
532
523
|
this.app = new Main({
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
import { Five } from '@realsee/five';
|
|
11
2
|
import changeMode from '../../../shared-utils/five/changeMode';
|
|
12
3
|
import { FloorplanErrorType } from './constant';
|
|
@@ -28,30 +19,28 @@ export function checkShowState(five, showState) {
|
|
|
28
19
|
* 2. 内置了相应的动画时间计算
|
|
29
20
|
* 3. 纠正成功会返回 true,失败「可能会被用户行为中断」会返回 false
|
|
30
21
|
*/
|
|
31
|
-
export default function correctFiveState(five, showState, userAction = true) {
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
export default async function correctFiveState(five, showState, userAction = true) {
|
|
23
|
+
// 当前已满足状态,不需要变更
|
|
24
|
+
const result = checkShowState(five, showState);
|
|
25
|
+
if (result === true)
|
|
26
|
+
return;
|
|
27
|
+
// 纠正 mode
|
|
28
|
+
if (five.currentMode !== Five.Mode.Floorplan) {
|
|
29
|
+
const [changeModeError] = await to(changeMode(five, Five.Mode.Floorplan, showState, undefined, userAction));
|
|
30
|
+
if (changeModeError)
|
|
31
|
+
throw changeModeError;
|
|
32
|
+
// changeMode 是异步行为,可能会被打断,需要在结束后加一次判断
|
|
34
33
|
const result = checkShowState(five, showState);
|
|
35
|
-
if (result ===
|
|
36
|
-
|
|
37
|
-
// 纠正 mode
|
|
38
|
-
if (five.currentMode !== Five.Mode.Floorplan) {
|
|
39
|
-
const [changeModeError] = yield to(changeMode(five, Five.Mode.Floorplan, showState, undefined, userAction));
|
|
40
|
-
if (changeModeError)
|
|
41
|
-
throw changeModeError;
|
|
42
|
-
// changeMode 是异步行为,可能会被打断,需要在结束后加一次判断
|
|
43
|
-
const result = checkShowState(five, showState);
|
|
44
|
-
if (result === false)
|
|
45
|
-
throw new Error(FloorplanErrorType.ChangeModeError);
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
// 纠正相机状态
|
|
49
|
-
// 根据 latitude、longitude、fov 计算动画时间,最多 1s
|
|
50
|
-
const { latitude, longitude, fov } = five.getCurrentState();
|
|
51
|
-
const time = Math.min(1000, Math.max(200, Math.abs(latitude - Math.PI / 2) * 1000, (longitude > Math.PI ? 2 * Math.PI - longitude : longitude) * 500, Math.abs(fov - showState.fov) * 10));
|
|
52
|
-
const [updateCameraError] = yield to(five.updateCamera(showState, time, userAction));
|
|
53
|
-
if (updateCameraError)
|
|
54
|
-
throw new Error(FloorplanErrorType.UpdateCameraError);
|
|
34
|
+
if (result === false)
|
|
35
|
+
throw new Error(FloorplanErrorType.ChangeModeError);
|
|
55
36
|
return;
|
|
56
|
-
}
|
|
37
|
+
}
|
|
38
|
+
// 纠正相机状态
|
|
39
|
+
// 根据 latitude、longitude、fov 计算动画时间,最多 1s
|
|
40
|
+
const { latitude, longitude, fov } = five.getCurrentState();
|
|
41
|
+
const time = Math.min(1000, Math.max(200, Math.abs(latitude - Math.PI / 2) * 1000, (longitude > Math.PI ? 2 * Math.PI - longitude : longitude) * 500, Math.abs(fov - showState.fov) * 10));
|
|
42
|
+
const [updateCameraError] = await to(five.updateCamera(showState, time, userAction));
|
|
43
|
+
if (updateCameraError)
|
|
44
|
+
throw new Error(FloorplanErrorType.UpdateCameraError);
|
|
45
|
+
return;
|
|
57
46
|
}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
import Main from './Components/Main';
|
|
11
2
|
import formatData, { formatExtraObjects } from '../utils/formatData';
|
|
12
3
|
export default class PanoFloorplanRadarPluginController {
|
|
@@ -72,9 +63,9 @@ export default class PanoFloorplanRadarPluginController {
|
|
|
72
63
|
enumerable: true,
|
|
73
64
|
configurable: true,
|
|
74
65
|
writable: true,
|
|
75
|
-
value: (data) =>
|
|
66
|
+
value: async (data) => {
|
|
76
67
|
const copyData = JSON.parse(JSON.stringify(data));
|
|
77
|
-
const floorplanData =
|
|
68
|
+
const floorplanData = await formatData(copyData);
|
|
78
69
|
this.data = floorplanData;
|
|
79
70
|
// const loadImage = async () => {
|
|
80
71
|
// const floorIndex = this.five.work.observers[this.five.getCurrentState().panoIndex].floorIndex
|
|
@@ -92,7 +83,7 @@ export default class PanoFloorplanRadarPluginController {
|
|
|
92
83
|
// }
|
|
93
84
|
// await loadImage()
|
|
94
85
|
this.render();
|
|
95
|
-
}
|
|
86
|
+
}
|
|
96
87
|
});
|
|
97
88
|
this.five = five;
|
|
98
89
|
(params === null || params === void 0 ? void 0 : params.configs) && Object.assign(this.configs, params.configs);
|
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
import type { Five } from '@realsee/five';
|
|
2
|
+
import type { FLOOR_PLAN_ATTACHED_TO } from '../constant';
|
|
2
3
|
import type { FloorplanServerData } from '../typings/floorplanServerData';
|
|
3
4
|
import type { FloorplanRoomItem } from '../typings/floorplanData';
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
/** TopviewFloorplanPlugin 配置参数 */
|
|
6
|
+
interface Configs {
|
|
6
7
|
northDesc?: string;
|
|
7
|
-
selector?: string | Element;
|
|
8
|
-
scale?: number;
|
|
9
8
|
modelOpacity?: number;
|
|
10
9
|
cameraImageUrl?: string;
|
|
10
|
+
/** 是否开启高亮房间功能,默认为 false */
|
|
11
11
|
hoverEnable?: boolean;
|
|
12
|
+
/** 是否开启放大缩小和拖动功能,默认为 false */
|
|
13
|
+
gestureEnable?: boolean;
|
|
14
|
+
/** 是否展示指南针,默认为 true */
|
|
12
15
|
compassEnable?: boolean;
|
|
13
|
-
|
|
16
|
+
/** 是否展示户型图标尺,默认为 true */
|
|
14
17
|
ruleLabelsEnable?: boolean;
|
|
18
|
+
/** 是否展示房间标签,默认为 true */
|
|
15
19
|
roomLabelsEnable?: boolean;
|
|
20
|
+
/** 点击房间时,是否需要跳转到被点房间的全景态点位上,默认为 true */
|
|
16
21
|
preventRoomClick?: boolean;
|
|
22
|
+
/** 户型图展示时,应该对应到模型的哪个位置上,默认是 BOUNDING_CENTER */
|
|
17
23
|
attachedTo?: FLOOR_PLAN_ATTACHED_TO;
|
|
24
|
+
/** 用户自定义房间标间 DOM 函数 */
|
|
18
25
|
getLabelElement?: (room: FloorplanRoomItem) => Element | null;
|
|
19
26
|
}
|
|
27
|
+
/** TopviewFloorplanPlugin 初始化参数 */
|
|
28
|
+
export interface TopviewFloorplanPluginParameterType extends Configs {
|
|
29
|
+
selector?: string | Element;
|
|
30
|
+
scale?: number;
|
|
31
|
+
}
|
|
20
32
|
export declare type TopviewFloorplanPluginReturnType = TopviewFloorplanPluginController;
|
|
21
33
|
export declare class TopviewFloorplanPluginController {
|
|
22
34
|
size: {
|
|
@@ -41,22 +53,23 @@ export declare class TopviewFloorplanPluginController {
|
|
|
41
53
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
42
54
|
appendTo(wrapper: Element): this;
|
|
43
55
|
dispose: () => void;
|
|
44
|
-
|
|
56
|
+
private onFiveWantsMoveToPano;
|
|
57
|
+
private onFiveWantsGesture;
|
|
45
58
|
private onModelShownFloorChange;
|
|
46
|
-
|
|
47
|
-
private
|
|
48
|
-
|
|
49
|
-
private
|
|
50
|
-
/** 在户型图展示时阻止 Five 滑动行为 */
|
|
51
|
-
private handleWantsPanGesture;
|
|
52
|
-
private handleModelLoaded;
|
|
59
|
+
private onFivePanoArrived;
|
|
60
|
+
private onFivePanGesture;
|
|
61
|
+
private onFivePinchGesture;
|
|
62
|
+
private onFiveModelLoaded;
|
|
53
63
|
/** 非 Topview 态隐藏户型图 */
|
|
54
|
-
private
|
|
64
|
+
private onFiveModeChange;
|
|
55
65
|
/** 动画结束后是 Topview 态就展示户型图 */
|
|
56
|
-
private
|
|
66
|
+
private onFiveInitAnimationEnded;
|
|
57
67
|
private show;
|
|
58
68
|
private hide;
|
|
59
69
|
/** 更新户型图大小 */
|
|
60
70
|
private updateSize;
|
|
71
|
+
/** 更新户型图位置 */
|
|
72
|
+
private updatePosition;
|
|
61
73
|
private render;
|
|
62
74
|
}
|
|
75
|
+
export {};
|