@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.
Files changed (180) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/CSS3DRenderPlugin/index.d.ts +2 -2
  3. package/dist/CameraMovementPlugin/index.js +15 -40
  4. package/dist/CameraMovementPlugin/typing.d.ts +1 -1
  5. package/dist/ModelChassisCompassPlugin/index.js +3 -28
  6. package/dist/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
  7. package/dist/ModelEntryDoorGuidePlugin/index.js +8 -33
  8. package/dist/ModelItemLabelPlugin/events.type.d.ts +2 -2
  9. package/dist/ModelItemLabelPlugin/index.js +8 -8
  10. package/dist/ModelItemLabelPlugin/typings.d.ts +2 -2
  11. package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +1 -1
  12. package/dist/ModelRoomLabelPlugin/index.js +6 -6
  13. package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
  14. package/dist/ModelTVVideoPlugin/index.d.ts +1 -1
  15. package/dist/ModelTVVideoPlugin/index.js +3 -28
  16. package/dist/PanoCompassPlugin/index.js +53 -86
  17. package/dist/PanoCursorRaycasterPlugin/index.d.ts +1 -1
  18. package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +8 -8
  19. package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
  20. package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
  21. package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
  22. package/dist/PanoMeasurePlugin/Controller/index.d.ts +3 -3
  23. package/dist/PanoMeasurePlugin/Model/index.d.ts +2 -2
  24. package/dist/PanoMeasurePlugin/Model/line.d.ts +5 -5
  25. package/dist/PanoMeasurePlugin/Model/point.d.ts +2 -2
  26. package/dist/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
  27. package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +2 -2
  28. package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
  29. package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
  30. package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
  31. package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
  32. package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
  33. package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -1
  34. package/dist/PanoMeasurePlugin/index.d.ts +1 -1
  35. package/dist/PanoMeasurePlugin/index.js +1 -21
  36. package/dist/PanoMeasurePlugin/typings/event.type.d.ts +4 -4
  37. package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
  38. package/dist/PanoMeasurePlugin/utils/constants.d.ts +1 -1
  39. package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
  40. package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
  41. package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
  42. package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
  43. package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
  44. package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
  45. package/dist/PanoMeasurePlugin/utils/line.d.ts +1 -1
  46. package/dist/PanoRulerPlugin/index.d.ts +1 -1
  47. package/dist/PanoRulerPlugin/index.js +3 -28
  48. package/dist/PanoSpatialTagPlugin/index.js +11 -11
  49. package/dist/PanoSpatialTagPlugin/typings.d.ts +1 -1
  50. package/dist/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.d.ts +0 -0
  51. package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -2
  52. package/dist/floorplan/ModelFloorplanPlugin/index.js +1266 -1298
  53. package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +81 -204
  54. package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +28 -15
  55. package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
  56. package/dist/floorplan/TopviewFloorplanPlugin/index.js +1257 -1250
  57. package/dist/floorplan/utils/formatPosition.d.ts +1 -1
  58. package/dist/index.es.js +1480 -1507
  59. package/dist/index.js +1477 -1504
  60. package/dist/index.umd.js +1477 -1504
  61. package/dist/shared-utils/three/getExtraModelLoader.d.ts +1 -1
  62. package/dist/shared-utils/three/getNormal.d.ts +1 -1
  63. package/dist/shared-utils/three/getTextureLoader.d.ts +1 -1
  64. package/dist/shared-utils/three/loadFbxObj.d.ts +1 -1
  65. package/dist/shared-utils/vectorTocoordinates.d.ts +1 -1
  66. package/docs/assets/search.js +1 -1
  67. package/docs/classes/ModelRoomLabelController.html +6 -6
  68. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  69. package/docs/enums/ModelFloorplanErrorType.html +1 -1
  70. package/docs/interfaces/LineJson.html +1 -1
  71. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  72. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  73. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  74. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  75. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  76. package/docs/interfaces/ModelFloorplanParameterType.html +1 -1
  77. package/docs/interfaces/ModelFloorplanViewEvent.html +2 -2
  78. package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
  79. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
  80. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
  81. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  82. package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
  83. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
  84. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
  85. package/docs/interfaces/PanoCompassPluginData.html +1 -1
  86. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
  87. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
  88. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  89. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  90. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  91. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  92. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  93. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  94. package/docs/interfaces/PointJson.html +1 -1
  95. package/docs/interfaces/RoomLabel.html +7 -7
  96. package/docs/interfaces/TopviewFloorplanPluginParameterType.html +19 -1
  97. package/docs/modules.html +12 -12
  98. package/libs/CSS3DRenderPlugin/index.d.ts +2 -2
  99. package/libs/CameraMovementPlugin/index.js +15 -24
  100. package/libs/CameraMovementPlugin/typing.d.ts +1 -1
  101. package/libs/ModelChassisCompassPlugin/index.js +3 -12
  102. package/libs/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
  103. package/libs/ModelEntryDoorGuidePlugin/index.js +8 -17
  104. package/libs/ModelItemLabelPlugin/events.type.d.ts +2 -2
  105. package/libs/ModelItemLabelPlugin/typings.d.ts +2 -2
  106. package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +1 -1
  107. package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
  108. package/libs/ModelTVVideoPlugin/index.d.ts +1 -1
  109. package/libs/ModelTVVideoPlugin/index.js +3 -12
  110. package/libs/ModelTVVideoPlugin/typings.js +1 -0
  111. package/libs/PanoCompassPlugin/index.js +49 -64
  112. package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
  113. package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +8 -8
  114. package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
  115. package/libs/PanoMeasurePlugin/Controller/EditController.js +1 -1
  116. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
  117. package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
  118. package/libs/PanoMeasurePlugin/Controller/index.d.ts +3 -3
  119. package/libs/PanoMeasurePlugin/Model/index.d.ts +2 -2
  120. package/libs/PanoMeasurePlugin/Model/line.d.ts +5 -5
  121. package/libs/PanoMeasurePlugin/Model/line.js +1 -1
  122. package/libs/PanoMeasurePlugin/Model/point.d.ts +2 -2
  123. package/libs/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
  124. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +2 -2
  125. package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
  126. package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
  127. package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
  128. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
  129. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
  130. package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -1
  131. package/libs/PanoMeasurePlugin/index.d.ts +1 -1
  132. package/libs/PanoMeasurePlugin/typings/event.type.d.ts +4 -4
  133. package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
  134. package/libs/PanoMeasurePlugin/utils/constants.d.ts +1 -1
  135. package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
  136. package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
  137. package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
  138. package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
  139. package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
  140. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
  141. package/libs/PanoMeasurePlugin/utils/line.d.ts +1 -1
  142. package/libs/PanoMeasurePlugin/utils/mouseGroup.js +1 -0
  143. package/libs/PanoRulerPlugin/index.d.ts +1 -1
  144. package/libs/PanoRulerPlugin/index.js +3 -12
  145. package/libs/PanoSpatialTagPlugin/typings.d.ts +1 -1
  146. package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.d.ts +0 -0
  147. package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.js +0 -0
  148. package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Camera.js +2 -2
  149. package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Compass.js +0 -0
  150. package/libs/floorplan/{ModelFloorplanPlugin/Components/CurrentFloor → Components}/CurrentFloor.js +73 -80
  151. package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Main.js +186 -105
  152. package/libs/floorplan/Components/RoomHighlight/Room.js +5 -7
  153. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +24 -116
  154. package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RoomLabels/RoomLabel.js +0 -0
  155. package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RoomLabels/RoomLabels.js +2 -2
  156. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +26 -22
  157. package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
  158. package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RuleLabels/RuleLabels.js +82 -32
  159. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -2
  160. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +34 -43
  161. package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +22 -33
  162. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +3 -12
  163. package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +28 -15
  164. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +80 -54
  165. package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
  166. package/libs/floorplan/TopviewFloorplanPlugin/style.js +0 -1
  167. package/libs/floorplan/utils/formatData.js +28 -43
  168. package/libs/floorplan/utils/formatPosition.d.ts +1 -1
  169. package/libs/floorplan/utils/formatPosition.js +2 -2
  170. package/libs/shared-utils/five/changeMode.js +12 -23
  171. package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
  172. package/libs/shared-utils/three/getNormal.d.ts +1 -1
  173. package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
  174. package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
  175. package/libs/shared-utils/three/loadFbxObj.js +9 -20
  176. package/libs/shared-utils/three/loadTexture.js +6 -17
  177. package/libs/shared-utils/to.js +10 -21
  178. package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
  179. package/package.json +3 -1
  180. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +0 -301
@@ -27,37 +27,11 @@ function _interopNamespace(e) {
27
27
 
28
28
  var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
29
29
 
30
- /*! *****************************************************************************
31
- Copyright (c) Microsoft Corporation.
32
-
33
- Permission to use, copy, modify, and/or distribute this software for any
34
- purpose with or without fee is hereby granted.
35
-
36
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
37
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
38
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
39
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
40
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
41
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
42
- PERFORMANCE OF THIS SOFTWARE.
43
- ***************************************************************************** */
44
-
45
- function __awaiter(thisArg, _arguments, P, generator) {
46
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
47
- return new (P || (P = Promise))(function (resolve, reject) {
48
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
49
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
50
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
51
- step((generator = generator.apply(thisArg, _arguments || [])).next());
52
- });
53
- }
54
-
55
30
  const pluginStyle = {
56
31
  position: 'absolute',
57
32
  left: '50%',
58
33
  top: '50%',
59
34
  transform: 'translate(-50%, -50%)',
60
- pointerEvents: 'none',
61
35
  zIndex: '10',
62
36
  };
63
37
 
@@ -82,31 +56,27 @@ function pathD(points, options = {}) {
82
56
  return d + (needZ ? 'Z' : '');
83
57
  }
84
58
  /** 把户型图上点点位转换到 SVG 上的点位 */
85
- function formatFloorplanPoint({ x, y }, pxmm, bounding) {
59
+ function formatFloorplanPoint({ x, y }, bounding) {
86
60
  const { max, min } = bounding;
87
- return { x: (x - min.x) * pxmm, y: (max.y - y) * pxmm };
88
- }
89
-
90
- function formatOutlines(outlines) {
91
- return __awaiter(this, void 0, void 0, function* () {
92
- const headers = new Headers({ 'Content-Type': 'text/plain' });
93
- const getOutlineItem = function (item) {
94
- return __awaiter(this, void 0, void 0, function* () {
95
- const outlineItem = {
96
- index: item.index,
97
- url: item.url,
98
- svgUrl: item.svg_url,
99
- };
100
- if (item.svg_url) {
101
- const svgContent = yield fetch(item.svg_url, { headers }).then((res) => res.text());
102
- outlineItem.svgContent = svgContent;
103
- }
104
- return outlineItem;
105
- });
61
+ return { x: x - min.x, y: max.y - y };
62
+ }
63
+
64
+ async function formatOutlines(outlines) {
65
+ const headers = new Headers({ 'Content-Type': 'text/plain' });
66
+ const getOutlineItem = async function (item) {
67
+ const outlineItem = {
68
+ index: item.index,
69
+ url: item.url,
70
+ svgUrl: item.svg_url,
106
71
  };
107
- const svgOutlineItems = yield Promise.all(outlines.map(getOutlineItem));
108
- return svgOutlineItems;
109
- });
72
+ if (item.svg_url) {
73
+ const svgContent = await fetch(item.svg_url, { headers }).then((res) => res.text());
74
+ outlineItem.svgContent = svgContent;
75
+ }
76
+ return outlineItem;
77
+ };
78
+ const svgOutlineItems = await Promise.all(outlines.map(getOutlineItem));
79
+ return svgOutlineItems;
110
80
  }
111
81
  function formatRoom(data) {
112
82
  const floorplanRoomItem = {
@@ -152,50 +122,19 @@ function formatFloorplanEntrance(data) {
152
122
  };
153
123
  return floorplanEntrance;
154
124
  }
155
- function formatData(data) {
156
- return __awaiter(this, void 0, void 0, function* () {
157
- const outlines = yield formatOutlines(data.outlines);
158
- const bounding = data.computed_data.bounding;
159
- const floorDatas = data.computed_data.floor_datas.map(formatFloorData);
160
- const entrance = data.computed_data.entrance ? formatFloorplanEntrance(data.computed_data.entrance) : null;
161
- const floorplanData = {
162
- outlines,
163
- entrance,
164
- bounding,
165
- floorDatas,
166
- observers: data.computed_data.observers.map(formateFloorplanObserver),
167
- };
168
- return floorplanData;
169
- });
170
- }
171
-
172
- /**
173
- * 把第一个参数传入第二个参数(函数)中并执行
174
- * 一般用于执行函数后返回变量。
175
- * @param {any} something
176
- * @param {function} callback
177
- * @return {any}
178
- */
179
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
180
- function tap(something, callback) {
181
- callback(something);
182
- return something;
183
- }
184
-
185
- /**
186
- * 过滤掉不需要的对象字段函数:实现从一个对象中排除某些指定属性后生成的新对象。
187
- * @param object
188
- * @param props 排除的属性
189
- * @return
190
- */
191
- function omit(object, props) {
192
- return tap({}, (result) => {
193
- for (const name in object) {
194
- if (props.indexOf(name) !== -1)
195
- continue;
196
- result[name] = object[name];
197
- }
198
- });
125
+ async function formatData(data) {
126
+ const outlines = await formatOutlines(data.outlines);
127
+ const bounding = data.computed_data.bounding;
128
+ const floorDatas = data.computed_data.floor_datas.map(formatFloorData);
129
+ const entrance = data.computed_data.entrance ? formatFloorplanEntrance(data.computed_data.entrance) : null;
130
+ const floorplanData = {
131
+ outlines,
132
+ entrance,
133
+ bounding,
134
+ floorDatas,
135
+ observers: data.computed_data.observers.map(formateFloorplanObserver),
136
+ };
137
+ return floorplanData;
199
138
  }
200
139
 
201
140
  var FLOOR_PLAN_ATTACHED_TO;
@@ -238,16 +177,45 @@ function getPxmm(five, container, floorIndex, options) {
238
177
  return pxmm;
239
178
  }
240
179
 
180
+ /**
181
+ * 把第一个参数传入第二个参数(函数)中并执行
182
+ * 一般用于执行函数后返回变量。
183
+ * @param {any} something
184
+ * @param {function} callback
185
+ * @return {any}
186
+ */
187
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
188
+ function tap(something, callback) {
189
+ callback(something);
190
+ return something;
191
+ }
192
+
193
+ /**
194
+ * 过滤掉不需要的对象字段函数:实现从一个对象中排除某些指定属性后生成的新对象。
195
+ * @param object
196
+ * @param props 排除的属性
197
+ * @return
198
+ */
199
+ function omit(object, props) {
200
+ return tap({}, (result) => {
201
+ for (const name in object) {
202
+ if (props.indexOf(name) !== -1)
203
+ continue;
204
+ result[name] = object[name];
205
+ }
206
+ });
207
+ }
208
+
241
209
  const CAMERA_IMAGE = 'data:image/png;base64,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';
242
210
 
243
211
  function rad2Deg$1(rad) {
244
212
  return (rad * 180) / Math.PI;
245
213
  }
246
214
 
247
- /* src/floorplan/ModelFloorplanPlugin/Components/Camera.svelte generated by Svelte v3.47.0 */
215
+ /* src/floorplan/Components/Camera.svelte generated by Svelte v3.47.0 */
248
216
 
249
- function add_css$c(target) {
250
- internal.append_styles(target, "svelte-e8a2kn", ".floorplan__camera-position.svelte-e8a2kn{position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-e8a2kn{position:absolute;background-repeat:no-repeat;background-size:100%}");
217
+ function add_css$d(target) {
218
+ internal.append_styles(target, "svelte-17cl35n", ".floorplan__camera-position.svelte-17cl35n{position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-17cl35n{position:absolute;background-repeat:no-repeat;background-size:100%}");
251
219
  }
252
220
 
253
221
  function create_fragment$g(ctx) {
@@ -258,7 +226,7 @@ function create_fragment$g(ctx) {
258
226
  c() {
259
227
  div1 = internal.element("div");
260
228
  div0 = internal.element("div");
261
- internal.attr(div0, "class", "floorplan__camera-rotate svelte-e8a2kn");
229
+ internal.attr(div0, "class", "floorplan__camera-rotate svelte-17cl35n");
262
230
  internal.set_style(div0, "background-image", `url(${/*cameraImageUrl*/ ctx[0] || CAMERA_IMAGE})`);
263
231
  internal.set_style(div0, "width", /*domSizeStyle*/ ctx[4], false);
264
232
  internal.set_style(div0, "height", /*domSizeStyle*/ ctx[4], false);
@@ -266,7 +234,7 @@ function create_fragment$g(ctx) {
266
234
  internal.set_style(div0, "top", '-' + /*domSizeStyle*/ ctx[4], false);
267
235
  internal.set_style(div0, "transform", `rotate(${/*rotate*/ ctx[3]}deg)`, false);
268
236
  internal.set_style(div0, "transform-origin", `${/*domSizeStyle*/ ctx[4]} ${/*domSizeStyle*/ ctx[4]}`, false);
269
- internal.attr(div1, "class", "floorplan__camera-position svelte-e8a2kn");
237
+ internal.attr(div1, "class", "floorplan__camera-position svelte-17cl35n");
270
238
  internal.set_style(div1, "left", /*positionLeft*/ ctx[1], false);
271
239
  internal.set_style(div1, "top", /*positionTop*/ ctx[2], false);
272
240
  },
@@ -342,17 +310,17 @@ class Camera extends internal.SvelteComponent {
342
310
  lastPanoramaLongitude: 7,
343
311
  cameraImageUrl: 0
344
312
  },
345
- add_css$c
313
+ add_css$d
346
314
  );
347
315
  }
348
316
  }
349
317
 
350
318
  const COMPASS_IMAGE = 'data:image/png;base64,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';
351
319
 
352
- /* src/floorplan/ModelFloorplanPlugin/Components/Compass.svelte generated by Svelte v3.47.0 */
320
+ /* src/floorplan/Components/Compass.svelte generated by Svelte v3.47.0 */
353
321
 
354
- function add_css$b(target) {
355
- internal.append_styles(target, "svelte-5l80pv", ".floorplan-plugin__compass.svelte-5l80pv{position:absolute;left:50%;top:-46px;width:231px;height:41px;will-change:opacity;transform-origin:center 184px}.floorplan-plugin__compass-image.svelte-5l80pv{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-5l80pv{position:absolute;left:50%;top:15px;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:10px;color:#fff}");
322
+ function add_css$c(target) {
323
+ internal.append_styles(target, "svelte-1q44ru9", ".floorplan-plugin__compass.svelte-1q44ru9{position:absolute;left:50%;top:-2.39583rem;width:12.03125rem;height:2.13542rem;will-change:opacity;transform-origin:center 9.58333rem}.floorplan-plugin__compass-image.svelte-1q44ru9{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-1q44ru9{position:absolute;left:50%;top:0.78125rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.52083rem;color:#fff}");
356
324
  }
357
325
 
358
326
  // (13:0) {#if northRad}
@@ -370,10 +338,10 @@ function create_if_block$6(ctx) {
370
338
  t0 = internal.space();
371
339
  span = internal.element("span");
372
340
  t1 = internal.text(/*northDesc*/ ctx[0]);
373
- internal.attr(div0, "class", "floorplan-plugin__compass-image svelte-5l80pv");
341
+ internal.attr(div0, "class", "floorplan-plugin__compass-image svelte-1q44ru9");
374
342
  internal.set_style(div0, "background-image", `url(${COMPASS_IMAGE})`);
375
- internal.attr(span, "class", "floorplan-plugin__compass-text svelte-5l80pv");
376
- internal.attr(div1, "class", "floorplan-plugin__compass svelte-5l80pv");
343
+ internal.attr(span, "class", "floorplan-plugin__compass-text svelte-1q44ru9");
344
+ internal.attr(div1, "class", "floorplan-plugin__compass svelte-1q44ru9");
377
345
  internal.set_style(div1, "transform", /*compassTransformStyle*/ ctx[2], false);
378
346
  },
379
347
  m(target, anchor) {
@@ -444,345 +412,271 @@ function instance$f($$self, $$props, $$invalidate) {
444
412
  class Compass extends internal.SvelteComponent {
445
413
  constructor(options) {
446
414
  super();
447
- internal.init(this, options, instance$f, create_fragment$f, internal.safe_not_equal, { floorplanData: 3, northDesc: 0 }, add_css$b);
415
+ internal.init(this, options, instance$f, create_fragment$f, internal.safe_not_equal, { floorplanData: 3, northDesc: 0 }, add_css$c);
448
416
  }
449
417
  }
450
418
 
451
- /* src/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte generated by Svelte v3.47.0 */
419
+ /* src/floorplan/Components/Normalmage.svelte generated by Svelte v3.47.0 */
452
420
 
453
- function add_css$a(target) {
454
- internal.append_styles(target, "svelte-1ashbdx", ".floorplan-plugin__room-label-item.svelte-1ashbdx{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:15px;color:#fff;transform:translate(-50%, -50%);white-space:nowrap}.floorplan-plugin__room-size.svelte-1ashbdx{opacity:0.45}");
421
+ function add_css$b(target) {
422
+ internal.append_styles(target, "svelte-1gfoniz", "img.svelte-1gfoniz{width:100%;height:100%}");
455
423
  }
456
424
 
457
- // (22:30)
458
- function create_if_block_1$4(ctx) {
459
- let html_tag;
460
- let raw_value = /*userConfigElement*/ ctx[2].outerHTML + "";
461
- let html_anchor;
425
+ function create_fragment$e(ctx) {
426
+ let img;
427
+ let img_src_value;
462
428
 
463
429
  return {
464
430
  c() {
465
- html_tag = new internal.HtmlTag();
466
- html_anchor = internal.empty();
467
- html_tag.a = html_anchor;
431
+ img = internal.element("img");
432
+ if (!internal.src_url_equal(img.src, img_src_value = /*url*/ ctx[0])) internal.attr(img, "src", img_src_value);
433
+ internal.attr(img, "alt", "floorplan iamge");
434
+ internal.attr(img, "class", "svelte-1gfoniz");
468
435
  },
469
436
  m(target, anchor) {
470
- html_tag.m(raw_value, target, anchor);
471
- internal.insert(target, html_anchor, anchor);
437
+ internal.insert(target, img, anchor);
472
438
  },
473
- p(ctx, dirty) {
474
- if (dirty & /*userConfigElement*/ 4 && raw_value !== (raw_value = /*userConfigElement*/ ctx[2].outerHTML + "")) html_tag.p(raw_value);
439
+ p(ctx, [dirty]) {
440
+ if (dirty & /*url*/ 1 && !internal.src_url_equal(img.src, img_src_value = /*url*/ ctx[0])) {
441
+ internal.attr(img, "src", img_src_value);
442
+ }
475
443
  },
444
+ i: internal.noop,
445
+ o: internal.noop,
476
446
  d(detaching) {
477
- if (detaching) internal.detach(html_anchor);
478
- if (detaching) html_tag.d();
447
+ if (detaching) internal.detach(img);
479
448
  }
480
449
  };
481
450
  }
482
451
 
483
- // (16:2) {#if getLabelElement === undefined}
484
- function create_if_block$5(ctx) {
485
- let span0;
486
- let t0_value = /*room*/ ctx[0].name + "";
487
- let t0;
488
- let t1;
489
- let span1;
452
+ function instance$e($$self, $$props, $$invalidate) {
453
+ let { url } = $$props;
490
454
 
491
- return {
492
- c() {
493
- span0 = internal.element("span");
494
- t0 = internal.text(t0_value);
495
- t1 = internal.space();
496
- span1 = internal.element("span");
497
- span1.textContent = `${/*roomSizeDes*/ ctx[3]}`;
498
- internal.attr(span0, "class", "floorplan-plugin__room-name");
499
- internal.attr(span1, "class", "floorplan-plugin__room-size svelte-1ashbdx");
500
- },
501
- m(target, anchor) {
502
- internal.insert(target, span0, anchor);
503
- internal.append(span0, t0);
504
- internal.insert(target, t1, anchor);
505
- internal.insert(target, span1, anchor);
506
- },
507
- p(ctx, dirty) {
508
- if (dirty & /*room*/ 1 && t0_value !== (t0_value = /*room*/ ctx[0].name + "")) internal.set_data(t0, t0_value);
509
- },
510
- d(detaching) {
511
- if (detaching) internal.detach(span0);
512
- if (detaching) internal.detach(t1);
513
- if (detaching) internal.detach(span1);
514
- }
455
+ $$self.$$set = $$props => {
456
+ if ('url' in $$props) $$invalidate(0, url = $$props.url);
515
457
  };
516
- }
517
458
 
518
- function create_fragment$e(ctx) {
519
- let div;
459
+ return [url];
460
+ }
520
461
 
521
- function select_block_type(ctx, dirty) {
522
- if (/*getLabelElement*/ ctx[1] === undefined) return create_if_block$5;
523
- if (/*userConfigElement*/ ctx[2]) return create_if_block_1$4;
462
+ class Normalmage extends internal.SvelteComponent {
463
+ constructor(options) {
464
+ super();
465
+ internal.init(this, options, instance$e, create_fragment$e, internal.safe_not_equal, { url: 0 }, add_css$b);
524
466
  }
467
+ }
525
468
 
526
- let current_block_type = select_block_type(ctx);
527
- let if_block = current_block_type && current_block_type(ctx);
469
+ /* src/floorplan/Components/SvgImage.svelte generated by Svelte v3.47.0 */
470
+
471
+ function add_css$a(target) {
472
+ internal.append_styles(target, "svelte-ub47ya", ".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}");
473
+ }
474
+
475
+ function create_fragment$d(ctx) {
476
+ let div;
477
+ let html_tag;
478
+ let t;
479
+ let html_tag_1;
528
480
 
529
481
  return {
530
482
  c() {
531
483
  div = internal.element("div");
532
- if (if_block) if_block.c();
533
- internal.attr(div, "class", "floorplan-plugin__room-label-item svelte-1ashbdx");
534
- internal.set_style(div, "left", /*left*/ ctx[4], false);
535
- internal.set_style(div, "top", /*top*/ ctx[5], false);
536
- internal.set_style(div, "font-size", /*fontSize*/ ctx[6], false);
484
+ html_tag = new internal.HtmlTag();
485
+ t = internal.space();
486
+ html_tag_1 = new internal.HtmlTag();
487
+ html_tag.a = t;
488
+ html_tag_1.a = null;
489
+ internal.attr(div, "class", "floorplan-plugin__base-image svelte-ub47ya");
537
490
  },
538
491
  m(target, anchor) {
539
492
  internal.insert(target, div, anchor);
540
- if (if_block) if_block.m(div, null);
493
+ html_tag.m(/*svgStyle*/ ctx[1], div);
494
+ internal.append(div, t);
495
+ html_tag_1.m(/*content*/ ctx[0], div);
541
496
  },
542
497
  p(ctx, [dirty]) {
543
- if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
544
- if_block.p(ctx, dirty);
545
- } else {
546
- if (if_block) if_block.d(1);
547
- if_block = current_block_type && current_block_type(ctx);
548
-
549
- if (if_block) {
550
- if_block.c();
551
- if_block.m(div, null);
552
- }
553
- }
498
+ if (dirty & /*content*/ 1) html_tag_1.p(/*content*/ ctx[0]);
554
499
  },
555
500
  i: internal.noop,
556
501
  o: internal.noop,
557
502
  d(detaching) {
558
503
  if (detaching) internal.detach(div);
559
-
560
- if (if_block) {
561
- if_block.d();
562
- }
563
504
  }
564
505
  };
565
506
  }
566
507
 
567
- function instance$e($$self, $$props, $$invalidate) {
568
- let userConfigElement;
569
- let { room } = $$props;
570
- let { getLabelElement } = $$props;
571
-
572
- // TODO: 统一这里的判断条件,目前写了多处
573
- const bodyWidth = document.body.clientWidth;
508
+ function instance$d($$self, $$props, $$invalidate) {
509
+ let { content } = $$props;
574
510
 
575
- const bodyHeight = document.body.clientHeight;
576
- const roomSizeDes = room.size ? (room.size / 1000000).toFixed(1) + '㎡' : '';
577
- const roomLabel = room.roomLabel;
578
- const left = roomLabel.positionInImage.x * 100 + '%';
579
- const top = roomLabel.positionInImage.y * 100 + '%';
580
- const fontSize = (bodyWidth < 500 || bodyHeight < 500 ? 10 : 14) / 16 + 'rem';
511
+ const svgStyle = `
512
+ <style>
513
+ svg [type='lineGroup'] path {
514
+ fill: #ffffff;
515
+ stroke: #ffffff;
516
+ }
517
+ svg [type='lineItemGroup'] g g g g {
518
+ stroke: #ffffff;
519
+ }</style>
520
+ `;
581
521
 
582
522
  $$self.$$set = $$props => {
583
- if ('room' in $$props) $$invalidate(0, room = $$props.room);
584
- if ('getLabelElement' in $$props) $$invalidate(1, getLabelElement = $$props.getLabelElement);
585
- };
586
-
587
- $$self.$$.update = () => {
588
- if ($$self.$$.dirty & /*getLabelElement, room*/ 3) {
589
- $$invalidate(2, userConfigElement = getLabelElement === null || getLabelElement === void 0
590
- ? void 0
591
- : getLabelElement(room));
592
- }
523
+ if ('content' in $$props) $$invalidate(0, content = $$props.content);
593
524
  };
594
525
 
595
- return [room, getLabelElement, userConfigElement, roomSizeDes, left, top, fontSize];
526
+ return [content, svgStyle];
596
527
  }
597
528
 
598
- class RoomLabel extends internal.SvelteComponent {
529
+ class SvgImage extends internal.SvelteComponent {
599
530
  constructor(options) {
600
531
  super();
601
- internal.init(this, options, instance$e, create_fragment$e, internal.safe_not_equal, { room: 0, getLabelElement: 1 }, add_css$a);
532
+ internal.init(this, options, instance$d, create_fragment$d, internal.safe_not_equal, { content: 0 }, add_css$a);
602
533
  }
603
534
  }
604
535
 
605
- /* src/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte generated by Svelte v3.47.0 */
536
+ /* src/floorplan/Components/BaseImage.svelte generated by Svelte v3.47.0 */
606
537
 
607
538
  function add_css$9(target) {
608
- internal.append_styles(target, "svelte-sw25w3", ".floorplan-plugin__room-labels.svelte-sw25w3{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20}");
609
- }
610
-
611
- function get_each_context$4(ctx, list, i) {
612
- const child_ctx = ctx.slice();
613
- child_ctx[4] = list[i];
614
- return child_ctx;
539
+ internal.append_styles(target, "svelte-ozpg4a", ".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}");
615
540
  }
616
541
 
617
- // (8:0) {#if rooms}
618
- function create_if_block$4(ctx) {
619
- let div;
620
- let each_blocks = [];
621
- let each_1_lookup = new Map();
542
+ // (13:22)
543
+ function create_if_block_1$4(ctx) {
544
+ let normalimage;
622
545
  let current;
623
- let each_value = /*rooms*/ ctx[1];
624
- const get_key = ctx => /*room*/ ctx[4].id;
625
-
626
- for (let i = 0; i < each_value.length; i += 1) {
627
- let child_ctx = get_each_context$4(ctx, each_value, i);
628
- let key = get_key(child_ctx);
629
- each_1_lookup.set(key, each_blocks[i] = create_each_block$4(key, child_ctx));
630
- }
546
+ normalimage = new Normalmage({ props: { url: /*imageData*/ ctx[1].url } });
631
547
 
632
548
  return {
633
549
  c() {
634
- div = internal.element("div");
635
-
636
- for (let i = 0; i < each_blocks.length; i += 1) {
637
- each_blocks[i].c();
638
- }
639
-
640
- internal.attr(div, "class", "floorplan-plugin__room-labels svelte-sw25w3");
550
+ internal.create_component(normalimage.$$.fragment);
641
551
  },
642
552
  m(target, anchor) {
643
- internal.insert(target, div, anchor);
644
-
645
- for (let i = 0; i < each_blocks.length; i += 1) {
646
- each_blocks[i].m(div, null);
647
- }
648
-
553
+ internal.mount_component(normalimage, target, anchor);
649
554
  current = true;
650
555
  },
651
556
  p(ctx, dirty) {
652
- if (dirty & /*rooms, getLabelElement*/ 3) {
653
- each_value = /*rooms*/ ctx[1];
654
- internal.group_outros();
655
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$4, null, get_each_context$4);
656
- internal.check_outros();
657
- }
557
+ const normalimage_changes = {};
558
+ if (dirty & /*imageData*/ 2) normalimage_changes.url = /*imageData*/ ctx[1].url;
559
+ normalimage.$set(normalimage_changes);
658
560
  },
659
561
  i(local) {
660
562
  if (current) return;
661
-
662
- for (let i = 0; i < each_value.length; i += 1) {
663
- internal.transition_in(each_blocks[i]);
664
- }
665
-
563
+ internal.transition_in(normalimage.$$.fragment, local);
666
564
  current = true;
667
565
  },
668
566
  o(local) {
669
- for (let i = 0; i < each_blocks.length; i += 1) {
670
- internal.transition_out(each_blocks[i]);
671
- }
672
-
567
+ internal.transition_out(normalimage.$$.fragment, local);
673
568
  current = false;
674
569
  },
675
570
  d(detaching) {
676
- if (detaching) internal.detach(div);
677
-
678
- for (let i = 0; i < each_blocks.length; i += 1) {
679
- each_blocks[i].d();
680
- }
571
+ internal.destroy_component(normalimage, detaching);
681
572
  }
682
573
  };
683
574
  }
684
575
 
685
- // (10:4) {#each rooms as room (room.id)}
686
- function create_each_block$4(key_1, ctx) {
687
- let first;
688
- let roomlabel;
576
+ // (11:2) {#if svgContent}
577
+ function create_if_block$5(ctx) {
578
+ let svgimage;
689
579
  let current;
690
580
 
691
- const roomlabel_spread_levels = [
692
- {
693
- room: /*room*/ ctx[4],
694
- getLabelElement: /*getLabelElement*/ ctx[0]
695
- }
696
- ];
697
-
698
- let roomlabel_props = {};
699
-
700
- for (let i = 0; i < roomlabel_spread_levels.length; i += 1) {
701
- roomlabel_props = internal.assign(roomlabel_props, roomlabel_spread_levels[i]);
702
- }
703
-
704
- roomlabel = new RoomLabel({ props: roomlabel_props });
581
+ svgimage = new SvgImage({
582
+ props: { content: /*svgContent*/ ctx[0] }
583
+ });
705
584
 
706
585
  return {
707
- key: key_1,
708
- first: null,
709
586
  c() {
710
- first = internal.empty();
711
- internal.create_component(roomlabel.$$.fragment);
712
- this.first = first;
587
+ internal.create_component(svgimage.$$.fragment);
713
588
  },
714
589
  m(target, anchor) {
715
- internal.insert(target, first, anchor);
716
- internal.mount_component(roomlabel, target, anchor);
590
+ internal.mount_component(svgimage, target, anchor);
717
591
  current = true;
718
592
  },
719
- p(new_ctx, dirty) {
720
- ctx = new_ctx;
721
-
722
- const roomlabel_changes = (dirty & /*rooms, getLabelElement*/ 3)
723
- ? internal.get_spread_update(roomlabel_spread_levels, [
724
- {
725
- room: /*room*/ ctx[4],
726
- getLabelElement: /*getLabelElement*/ ctx[0]
727
- }
728
- ])
729
- : {};
730
-
731
- roomlabel.$set(roomlabel_changes);
593
+ p(ctx, dirty) {
594
+ const svgimage_changes = {};
595
+ if (dirty & /*svgContent*/ 1) svgimage_changes.content = /*svgContent*/ ctx[0];
596
+ svgimage.$set(svgimage_changes);
732
597
  },
733
598
  i(local) {
734
599
  if (current) return;
735
- internal.transition_in(roomlabel.$$.fragment, local);
600
+ internal.transition_in(svgimage.$$.fragment, local);
736
601
  current = true;
737
602
  },
738
603
  o(local) {
739
- internal.transition_out(roomlabel.$$.fragment, local);
604
+ internal.transition_out(svgimage.$$.fragment, local);
740
605
  current = false;
741
606
  },
742
607
  d(detaching) {
743
- if (detaching) internal.detach(first);
744
- internal.destroy_component(roomlabel, detaching);
608
+ internal.destroy_component(svgimage, detaching);
745
609
  }
746
610
  };
747
611
  }
748
612
 
749
- function create_fragment$d(ctx) {
750
- let if_block_anchor;
613
+ function create_fragment$c(ctx) {
614
+ let div;
615
+ let current_block_type_index;
616
+ let if_block;
751
617
  let current;
752
- let if_block = /*rooms*/ ctx[1] && create_if_block$4(ctx);
618
+ const if_block_creators = [create_if_block$5, create_if_block_1$4];
619
+ const if_blocks = [];
620
+
621
+ function select_block_type(ctx, dirty) {
622
+ if (/*svgContent*/ ctx[0]) return 0;
623
+ if (/*imageData*/ ctx[1]) return 1;
624
+ return -1;
625
+ }
626
+
627
+ if (~(current_block_type_index = select_block_type(ctx))) {
628
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
629
+ }
753
630
 
754
631
  return {
755
632
  c() {
633
+ div = internal.element("div");
756
634
  if (if_block) if_block.c();
757
- if_block_anchor = internal.empty();
635
+ internal.attr(div, "class", "floorplan-plugin__base-image svelte-ozpg4a");
758
636
  },
759
637
  m(target, anchor) {
760
- if (if_block) if_block.m(target, anchor);
761
- internal.insert(target, if_block_anchor, anchor);
638
+ internal.insert(target, div, anchor);
639
+
640
+ if (~current_block_type_index) {
641
+ if_blocks[current_block_type_index].m(div, null);
642
+ }
643
+
762
644
  current = true;
763
645
  },
764
646
  p(ctx, [dirty]) {
765
- if (/*rooms*/ ctx[1]) {
647
+ let previous_block_index = current_block_type_index;
648
+ current_block_type_index = select_block_type(ctx);
649
+
650
+ if (current_block_type_index === previous_block_index) {
651
+ if (~current_block_type_index) {
652
+ if_blocks[current_block_type_index].p(ctx, dirty);
653
+ }
654
+ } else {
766
655
  if (if_block) {
767
- if_block.p(ctx, dirty);
656
+ internal.group_outros();
768
657
 
769
- if (dirty & /*rooms*/ 2) {
770
- internal.transition_in(if_block, 1);
771
- }
772
- } else {
773
- if_block = create_if_block$4(ctx);
774
- if_block.c();
775
- internal.transition_in(if_block, 1);
776
- if_block.m(if_block_anchor.parentNode, if_block_anchor);
658
+ internal.transition_out(if_blocks[previous_block_index], 1, 1, () => {
659
+ if_blocks[previous_block_index] = null;
660
+ });
661
+
662
+ internal.check_outros();
777
663
  }
778
- } else if (if_block) {
779
- internal.group_outros();
780
664
 
781
- internal.transition_out(if_block, 1, 1, () => {
782
- if_block = null;
783
- });
665
+ if (~current_block_type_index) {
666
+ if_block = if_blocks[current_block_type_index];
784
667
 
785
- internal.check_outros();
668
+ if (!if_block) {
669
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
670
+ if_block.c();
671
+ } else {
672
+ if_block.p(ctx, dirty);
673
+ }
674
+
675
+ internal.transition_in(if_block, 1);
676
+ if_block.m(div, null);
677
+ } else {
678
+ if_block = null;
679
+ }
786
680
  }
787
681
  },
788
682
  i(local) {
@@ -795,434 +689,230 @@ function create_fragment$d(ctx) {
795
689
  current = false;
796
690
  },
797
691
  d(detaching) {
798
- if (if_block) if_block.d(detaching);
799
- if (detaching) internal.detach(if_block_anchor);
692
+ if (detaching) internal.detach(div);
693
+
694
+ if (~current_block_type_index) {
695
+ if_blocks[current_block_type_index].d();
696
+ }
800
697
  }
801
698
  };
802
699
  }
803
700
 
804
- function instance$d($$self, $$props, $$invalidate) {
805
- let rooms;
701
+ function instance$c($$self, $$props, $$invalidate) {
702
+ let imageData;
703
+ let svgContent;
704
+ var _a, _b;
806
705
  let { floorIndex } = $$props;
807
706
  let { floorplanData } = $$props;
808
- let { getLabelElement } = $$props;
809
707
 
810
708
  $$self.$$set = $$props => {
811
709
  if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
812
710
  if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
813
- if ('getLabelElement' in $$props) $$invalidate(0, getLabelElement = $$props.getLabelElement);
814
711
  };
815
712
 
816
713
  $$self.$$.update = () => {
817
714
  if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 12) {
818
- $$invalidate(1, rooms = floorplanData.floorDatas[floorIndex].rooms);
715
+ $$invalidate(1, imageData = floorplanData.outlines[floorIndex]);
716
+ }
717
+
718
+ if ($$self.$$.dirty & /*floorplanData, _a, floorIndex, _b*/ 60) {
719
+ $$invalidate(0, svgContent = $$invalidate(5, _b = $$invalidate(4, _a = floorplanData.outlines) === null || _a === void 0
720
+ ? void 0
721
+ : _a[floorIndex]) === null || _b === void 0
722
+ ? void 0
723
+ : _b.svgContent);
819
724
  }
820
725
  };
821
726
 
822
- return [getLabelElement, rooms, floorIndex, floorplanData];
727
+ return [svgContent, imageData, floorIndex, floorplanData, _a, _b];
823
728
  }
824
729
 
825
- class RoomLabels extends internal.SvelteComponent {
730
+ class BaseImage extends internal.SvelteComponent {
826
731
  constructor(options) {
827
732
  super();
828
-
829
- internal.init(
830
- this,
831
- options,
832
- instance$d,
833
- create_fragment$d,
834
- internal.safe_not_equal,
835
- {
836
- floorIndex: 2,
837
- floorplanData: 3,
838
- getLabelElement: 0
839
- },
840
- add_css$9
841
- );
733
+ internal.init(this, options, instance$c, create_fragment$c, internal.safe_not_equal, { floorIndex: 2, floorplanData: 3 }, add_css$9);
842
734
  }
843
735
  }
844
736
 
845
- /**
846
- * 判断对象是否为`null`或`undefined`。
847
- * @param
848
- * @return
849
- */
850
- /**
851
- * 判断对象不为`null`或`undefined`。
852
- */
853
- function notNil(value) {
854
- return value !== null && value !== undefined;
855
- }
856
-
857
- /* src/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte generated by Svelte v3.47.0 */
737
+ /* src/floorplan/Components/RoomLabels/RoomLabel.svelte generated by Svelte v3.47.0 */
858
738
 
859
739
  function add_css$8(target) {
860
- internal.append_styles(target, "svelte-1rr09in", ".floorplan-plugin__rule-labels.svelte-1rr09in{position:absolute;height:5px;display:flex;align-items:center}.floorplan-plugin__rule-labels-top.svelte-1rr09in{left:0;top:0}.floorplan-plugin__rule-labels-bottom.svelte-1rr09in{left:0;bottom:0}.floorplan-plugin__rule-labels-left.svelte-1rr09in{bottom:0;left:0}.floorplan-plugin__rule-labels-right.svelte-1rr09in{bottom:0;right:0}.floorplan-plugin__rule-line.svelte-1rr09in{background:#fff;opacity:0.05;width:100%;height:1px}.floorplan-plugin__rule-scale.svelte-1rr09in{position:absolute;background:#fff;opacity:0.05;transform-origin:center;width:1px;height:5px}.floorplan-plugin__text-wrapper.svelte-1rr09in{width:0;height:0;position:absolute}.floorplan-plugin__text-wrapper.floorplan-plugin__text-wrapper--is-left-or-top.svelte-1rr09in{top:10px}.floorplan-plugin__text-wrapper.floorplan-plugin__text-wrapper-is-right-or-bottom.svelte-1rr09in{bottom:10px}.floorplan-plugin__rule-text.svelte-1rr09in{position:absolute;width:max-content;display:block;transform:translate(-50%, -50%) rotate(180deg);font-size:10px;color:#fff;opacity:0.2}.floorplan-plugin__rule-text.is-row.svelte-1rr09in{transform:translate(-50%, -50%)}");
740
+ internal.append_styles(target, "svelte-i2nwuk", ".floorplan-plugin__room-label-item.svelte-i2nwuk{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:0.78125rem;color:#fff;transform:translate(-50%, -50%);white-space:nowrap}.floorplan-plugin__room-size.svelte-i2nwuk{opacity:0.45}");
861
741
  }
862
742
 
863
- function get_each_context$3(ctx, list, i) {
864
- const child_ctx = ctx.slice();
865
- child_ctx[24] = list[i];
866
- child_ctx[26] = i;
867
- return child_ctx;
868
- }
869
-
870
- function get_each_context_1(ctx, list, i) {
871
- const child_ctx = ctx.slice();
872
- child_ctx[27] = list[i];
873
- child_ctx[29] = i;
874
- return child_ctx;
875
- }
876
-
877
- // (66:2) {#each positionPxArray as position, positionIndex (positionIndex)}
878
- function create_each_block_1(key_1, ctx) {
879
- let div;
880
- let style_left = `${/*position*/ ctx[27]}px`;
743
+ // (22:30)
744
+ function create_if_block_1$3(ctx) {
745
+ let html_tag;
746
+ let raw_value = /*userConfigElement*/ ctx[2].outerHTML + "";
747
+ let html_anchor;
881
748
 
882
749
  return {
883
- key: key_1,
884
- first: null,
885
750
  c() {
886
- div = internal.element("div");
887
- internal.attr(div, "class", "floorplan-plugin__rule-scale svelte-1rr09in");
888
- internal.set_style(div, "left", style_left, false);
889
- this.first = div;
751
+ html_tag = new internal.HtmlTag();
752
+ html_anchor = internal.empty();
753
+ html_tag.a = html_anchor;
890
754
  },
891
755
  m(target, anchor) {
892
- internal.insert(target, div, anchor);
756
+ html_tag.m(raw_value, target, anchor);
757
+ internal.insert(target, html_anchor, anchor);
893
758
  },
894
- p(new_ctx, dirty) {
895
- ctx = new_ctx;
759
+ p(ctx, dirty) {
760
+ if (dirty & /*userConfigElement*/ 4 && raw_value !== (raw_value = /*userConfigElement*/ ctx[2].outerHTML + "")) html_tag.p(raw_value);
896
761
  },
897
762
  d(detaching) {
898
- if (detaching) internal.detach(div);
763
+ if (detaching) internal.detach(html_anchor);
764
+ if (detaching) html_tag.d();
899
765
  }
900
766
  };
901
767
  }
902
768
 
903
- // (69:2) {#each textArray as textItem, textItemIndex (textItemIndex)}
904
- function create_each_block$3(key_1, ctx) {
905
- let div;
906
- let span;
907
- let t0_value = /*textItem*/ ctx[24].distance + "";
769
+ // (16:2) {#if getLabelElement === undefined}
770
+ function create_if_block$4(ctx) {
771
+ let span0;
772
+ let t0_value = /*room*/ ctx[0].name + "";
908
773
  let t0;
909
774
  let t1;
910
- let style_left = `${/*textItem*/ ctx[24].positionPx}px`;
775
+ let span1;
911
776
 
912
777
  return {
913
- key: key_1,
914
- first: null,
915
778
  c() {
916
- div = internal.element("div");
917
- span = internal.element("span");
779
+ span0 = internal.element("span");
918
780
  t0 = internal.text(t0_value);
919
781
  t1 = internal.space();
920
- internal.attr(span, "class", "floorplan-plugin__rule-text svelte-1rr09in");
921
- internal.toggle_class(span, "is-row", /*isRow*/ ctx[5]);
922
- internal.attr(div, "class", "floorplan-plugin__text-wrapper svelte-1rr09in");
923
- internal.toggle_class(div, "floorplan-plugin__text-wrapper--is-left-or-top", /*isLeft*/ ctx[3] || /*isTop*/ ctx[1]);
924
- internal.toggle_class(div, "floorplan-plugin__text-wrapper-is-right-or-bottom", /*isRight*/ ctx[4] || /*isBottom*/ ctx[2]);
925
- internal.set_style(div, "left", style_left, false);
926
- this.first = div;
782
+ span1 = internal.element("span");
783
+ span1.textContent = `${/*roomSizeDes*/ ctx[3]}`;
784
+ internal.attr(span0, "class", "floorplan-plugin__room-name");
785
+ internal.attr(span1, "class", "floorplan-plugin__room-size svelte-i2nwuk");
927
786
  },
928
787
  m(target, anchor) {
929
- internal.insert(target, div, anchor);
930
- internal.append(div, span);
931
- internal.append(span, t0);
932
- internal.append(div, t1);
788
+ internal.insert(target, span0, anchor);
789
+ internal.append(span0, t0);
790
+ internal.insert(target, t1, anchor);
791
+ internal.insert(target, span1, anchor);
933
792
  },
934
- p(new_ctx, dirty) {
935
- ctx = new_ctx;
793
+ p(ctx, dirty) {
794
+ if (dirty & /*room*/ 1 && t0_value !== (t0_value = /*room*/ ctx[0].name + "")) internal.set_data(t0, t0_value);
936
795
  },
937
796
  d(detaching) {
938
- if (detaching) internal.detach(div);
797
+ if (detaching) internal.detach(span0);
798
+ if (detaching) internal.detach(t1);
799
+ if (detaching) internal.detach(span1);
939
800
  }
940
801
  };
941
802
  }
942
803
 
943
- function create_fragment$c(ctx) {
944
- let div1;
945
- let div0;
946
- let t0;
947
- let each_blocks_1 = [];
948
- let each0_lookup = new Map();
949
- let t1;
950
- let each_blocks = [];
951
- let each1_lookup = new Map();
952
- let div1_class_value;
953
- let each_value_1 = /*positionPxArray*/ ctx[6];
954
- const get_key = ctx => /*positionIndex*/ ctx[29];
804
+ function create_fragment$b(ctx) {
805
+ let div;
955
806
 
956
- for (let i = 0; i < each_value_1.length; i += 1) {
957
- let child_ctx = get_each_context_1(ctx, each_value_1, i);
958
- let key = get_key(child_ctx);
959
- each0_lookup.set(key, each_blocks_1[i] = create_each_block_1(key, child_ctx));
807
+ function select_block_type(ctx, dirty) {
808
+ if (/*getLabelElement*/ ctx[1] === undefined) return create_if_block$4;
809
+ if (/*userConfigElement*/ ctx[2]) return create_if_block_1$3;
960
810
  }
961
811
 
962
- let each_value = /*textArray*/ ctx[10];
963
- const get_key_1 = ctx => /*textItemIndex*/ ctx[26];
964
-
965
- for (let i = 0; i < each_value.length; i += 1) {
966
- let child_ctx = get_each_context$3(ctx, each_value, i);
967
- let key = get_key_1(child_ctx);
968
- each1_lookup.set(key, each_blocks[i] = create_each_block$3(key, child_ctx));
969
- }
812
+ let current_block_type = select_block_type(ctx);
813
+ let if_block = current_block_type && current_block_type(ctx);
970
814
 
971
815
  return {
972
816
  c() {
973
- div1 = internal.element("div");
974
- div0 = internal.element("div");
975
- t0 = internal.space();
976
-
977
- for (let i = 0; i < each_blocks_1.length; i += 1) {
978
- each_blocks_1[i].c();
979
- }
980
-
981
- t1 = internal.space();
982
-
983
- for (let i = 0; i < each_blocks.length; i += 1) {
984
- each_blocks[i].c();
985
- }
986
-
987
- internal.attr(div0, "class", "floorplan-plugin__rule-line svelte-1rr09in");
988
- internal.attr(div1, "class", div1_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels-" + /*type*/ ctx[0] + " svelte-1rr09in");
989
- internal.set_style(div1, "width", /*width*/ ctx[9], false);
990
- internal.set_style(div1, "transform", /*transform*/ ctx[7], false);
991
- internal.set_style(div1, "transform-origin", /*transformOrigin*/ ctx[8], false);
817
+ div = internal.element("div");
818
+ if (if_block) if_block.c();
819
+ internal.attr(div, "class", "floorplan-plugin__room-label-item svelte-i2nwuk");
820
+ internal.set_style(div, "left", /*left*/ ctx[4], false);
821
+ internal.set_style(div, "top", /*top*/ ctx[5], false);
822
+ internal.set_style(div, "font-size", /*fontSize*/ ctx[6], false);
992
823
  },
993
824
  m(target, anchor) {
994
- internal.insert(target, div1, anchor);
995
- internal.append(div1, div0);
996
- internal.append(div1, t0);
997
-
998
- for (let i = 0; i < each_blocks_1.length; i += 1) {
999
- each_blocks_1[i].m(div1, null);
1000
- }
1001
-
1002
- internal.append(div1, t1);
1003
-
1004
- for (let i = 0; i < each_blocks.length; i += 1) {
1005
- each_blocks[i].m(div1, null);
1006
- }
825
+ internal.insert(target, div, anchor);
826
+ if (if_block) if_block.m(div, null);
1007
827
  },
1008
828
  p(ctx, [dirty]) {
1009
- if (dirty & /*positionPxArray*/ 64) {
1010
- each_value_1 = /*positionPxArray*/ ctx[6];
1011
- each_blocks_1 = internal.update_keyed_each(each_blocks_1, dirty, get_key, 1, ctx, each_value_1, each0_lookup, div1, internal.destroy_block, create_each_block_1, t1, get_each_context_1);
1012
- }
1013
-
1014
- if (dirty & /*isLeft, isTop, isRight, isBottom, textArray, isRow*/ 1086) {
1015
- each_value = /*textArray*/ ctx[10];
1016
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key_1, 1, ctx, each_value, each1_lookup, div1, internal.destroy_block, create_each_block$3, null, get_each_context$3);
1017
- }
829
+ if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
830
+ if_block.p(ctx, dirty);
831
+ } else {
832
+ if (if_block) if_block.d(1);
833
+ if_block = current_block_type && current_block_type(ctx);
1018
834
 
1019
- if (dirty & /*type*/ 1 && div1_class_value !== (div1_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels-" + /*type*/ ctx[0] + " svelte-1rr09in")) {
1020
- internal.attr(div1, "class", div1_class_value);
835
+ if (if_block) {
836
+ if_block.c();
837
+ if_block.m(div, null);
838
+ }
1021
839
  }
1022
840
  },
1023
841
  i: internal.noop,
1024
842
  o: internal.noop,
1025
843
  d(detaching) {
1026
- if (detaching) internal.detach(div1);
1027
-
1028
- for (let i = 0; i < each_blocks_1.length; i += 1) {
1029
- each_blocks_1[i].d();
1030
- }
844
+ if (detaching) internal.detach(div);
1031
845
 
1032
- for (let i = 0; i < each_blocks.length; i += 1) {
1033
- each_blocks[i].d();
846
+ if (if_block) {
847
+ if_block.d();
1034
848
  }
1035
849
  }
1036
850
  };
1037
851
  }
1038
852
 
1039
- const padding = 1000;
1040
-
1041
- function instance$c($$self, $$props, $$invalidate) {
1042
- let { pxmm } = $$props;
1043
- let { type } = $$props;
1044
- let { data } = $$props;
1045
- let { bounding } = $$props;
1046
- const isTop = type === 'top';
1047
- const isBottom = type === 'bottom';
1048
- const isLeft = type === 'left';
1049
- const isRight = type === 'right';
1050
- const isRow = isTop || isBottom;
853
+ function instance$b($$self, $$props, $$invalidate) {
854
+ let userConfigElement;
855
+ let { room } = $$props;
856
+ let { getLabelElement } = $$props;
1051
857
 
1052
- // 计算每一段墙的长度,以及墙两侧点距离标尺初始点的像素值
1053
- const positionArray = data.map(([start, end]) => isRow ? [start.x, end.x] : [start.y, end.y]).flat().sort().filter((x, index, arr) => {
1054
- if (index === 0) return true;
1055
- return x !== arr[index - 1];
1056
- });
858
+ // TODO: 统一这里的判断条件,目前写了多处
859
+ const bodyWidth = document.body.clientWidth;
1057
860
 
1058
- const minPosition = positionArray[0];
1059
- const maxPosition = positionArray.slice(-1)[0];
1060
- const length = maxPosition - minPosition;
1061
- const minBounding = isRow ? bounding.min.x : bounding.min.y;
1062
- const lengthPx = length * pxmm;
1063
- const positionPxArray = positionArray.map(x => (x - minPosition) / length * lengthPx);
1064
-
1065
- // 在主要方向上的偏移量,上下的标尺是距离图片左侧的长度,左右的标尺是距离图片底部的距离
1066
- const translateMain = (minPosition - minBounding) * pxmm;
1067
-
1068
- // 在次要方向的偏移量,希望达到的效果是标尺轴距离户型图边界 27px,但是图片自身是带有 1000mm 的边界,所以在计算时需要减去这个边界
1069
- const translateSecond = 27 - padding * pxmm;
1070
-
1071
- const translate = (() => {
1072
- if (isTop) return `translate(${translateMain}px, ${-translateSecond}px)`;
1073
- if (isBottom) return `translate(${translateMain}px, ${translateSecond}px)`;
1074
- if (isLeft) return `translate(${-translateSecond}px, ${-translateMain}px)`;
1075
- if (isRight) return `translate(${translateSecond}px, ${-translateMain - lengthPx}px)`;
1076
- })();
1077
-
1078
- const rotate = isRow ? 'rotate(0)' : 'rotate(-90deg)';
1079
- const transform = `${translate} ${rotate}`;
1080
- const transformOrigin = `${isRight ? 'right' : 'left'} ${isTop ? 'top' : 'bottom'}`;
1081
- const width = lengthPx + 'px';
1082
-
1083
- // 把点位的户型图坐标转成距离起始位置的像素值
1084
- const textArray = positionArray.map((position, index, array) => {
1085
- if (index === 0) return null;
1086
- const distance = position - array[index - 1];
1087
- const positionPx = (array[index - 1] + distance / 2 - minPosition) / length * lengthPx;
1088
- return { distance, positionPx };
1089
- }).filter(notNil).filter(item => item.distance / length > 0.12);
861
+ const bodyHeight = document.body.clientHeight;
862
+ const roomSizeDes = room.size ? (room.size / 1000000).toFixed(1) + '㎡' : '';
863
+ const roomLabel = room.roomLabel;
864
+ const left = roomLabel.positionInImage.x * 100 + '%';
865
+ const top = roomLabel.positionInImage.y * 100 + '%';
866
+ const fontSize = (bodyWidth < 500 || bodyHeight < 500 ? 10 : 14) / 16 + 'rem';
1090
867
 
1091
868
  $$self.$$set = $$props => {
1092
- if ('pxmm' in $$props) $$invalidate(11, pxmm = $$props.pxmm);
1093
- if ('type' in $$props) $$invalidate(0, type = $$props.type);
1094
- if ('data' in $$props) $$invalidate(12, data = $$props.data);
1095
- if ('bounding' in $$props) $$invalidate(13, bounding = $$props.bounding);
869
+ if ('room' in $$props) $$invalidate(0, room = $$props.room);
870
+ if ('getLabelElement' in $$props) $$invalidate(1, getLabelElement = $$props.getLabelElement);
1096
871
  };
1097
872
 
1098
- return [
1099
- type,
1100
- isTop,
1101
- isBottom,
1102
- isLeft,
1103
- isRight,
1104
- isRow,
1105
- positionPxArray,
1106
- transform,
1107
- transformOrigin,
1108
- width,
1109
- textArray,
1110
- pxmm,
1111
- data,
1112
- bounding
1113
- ];
873
+ $$self.$$.update = () => {
874
+ if ($$self.$$.dirty & /*getLabelElement, room*/ 3) {
875
+ $$invalidate(2, userConfigElement = getLabelElement === null || getLabelElement === void 0
876
+ ? void 0
877
+ : getLabelElement(room));
878
+ }
879
+ };
880
+
881
+ return [room, getLabelElement, userConfigElement, roomSizeDes, left, top, fontSize];
1114
882
  }
1115
883
 
1116
- class RuleItem extends internal.SvelteComponent {
884
+ class RoomLabel extends internal.SvelteComponent {
1117
885
  constructor(options) {
1118
886
  super();
1119
-
1120
- internal.init(
1121
- this,
1122
- options,
1123
- instance$c,
1124
- create_fragment$c,
1125
- internal.safe_not_equal,
1126
- {
1127
- pxmm: 11,
1128
- type: 0,
1129
- data: 12,
1130
- bounding: 13
1131
- },
1132
- add_css$8
1133
- );
887
+ internal.init(this, options, instance$b, create_fragment$b, internal.safe_not_equal, { room: 0, getLabelElement: 1 }, add_css$8);
1134
888
  }
1135
889
  }
1136
890
 
1137
- /* src/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte generated by Svelte v3.47.0 */
891
+ /* src/floorplan/Components/RoomLabels/RoomLabels.svelte generated by Svelte v3.47.0 */
1138
892
 
1139
- function get_each_context$2(ctx, list, i) {
1140
- const child_ctx = ctx.slice();
1141
- child_ctx[7] = list[i][0];
1142
- child_ctx[8] = list[i][1];
1143
- return child_ctx;
893
+ function add_css$7(target) {
894
+ internal.append_styles(target, "svelte-13xux0b", ".floorplan-plugin__room-labels.svelte-13xux0b{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}");
1144
895
  }
1145
896
 
1146
- // (12:2) {#each ruleLabelArray as [type, data] (type)}
1147
- function create_each_block$2(key_1, ctx) {
1148
- let first;
1149
- let ruleitem;
1150
- let current;
1151
-
1152
- const ruleitem_spread_levels = [
1153
- {
1154
- type: /*type*/ ctx[7],
1155
- data: /*data*/ ctx[8],
1156
- pxmm: /*pxmm*/ ctx[0],
1157
- bounding: /*bounding*/ ctx[2]
1158
- }
1159
- ];
1160
-
1161
- let ruleitem_props = {};
1162
-
1163
- for (let i = 0; i < ruleitem_spread_levels.length; i += 1) {
1164
- ruleitem_props = internal.assign(ruleitem_props, ruleitem_spread_levels[i]);
1165
- }
1166
-
1167
- ruleitem = new RuleItem({ props: ruleitem_props });
1168
-
1169
- return {
1170
- key: key_1,
1171
- first: null,
1172
- c() {
1173
- first = internal.empty();
1174
- internal.create_component(ruleitem.$$.fragment);
1175
- this.first = first;
1176
- },
1177
- m(target, anchor) {
1178
- internal.insert(target, first, anchor);
1179
- internal.mount_component(ruleitem, target, anchor);
1180
- current = true;
1181
- },
1182
- p(new_ctx, dirty) {
1183
- ctx = new_ctx;
1184
-
1185
- const ruleitem_changes = (dirty & /*ruleLabelArray, pxmm, bounding*/ 7)
1186
- ? internal.get_spread_update(ruleitem_spread_levels, [
1187
- {
1188
- type: /*type*/ ctx[7],
1189
- data: /*data*/ ctx[8],
1190
- pxmm: /*pxmm*/ ctx[0],
1191
- bounding: /*bounding*/ ctx[2]
1192
- }
1193
- ])
1194
- : {};
1195
-
1196
- ruleitem.$set(ruleitem_changes);
1197
- },
1198
- i(local) {
1199
- if (current) return;
1200
- internal.transition_in(ruleitem.$$.fragment, local);
1201
- current = true;
1202
- },
1203
- o(local) {
1204
- internal.transition_out(ruleitem.$$.fragment, local);
1205
- current = false;
1206
- },
1207
- d(detaching) {
1208
- if (detaching) internal.detach(first);
1209
- internal.destroy_component(ruleitem, detaching);
1210
- }
1211
- };
897
+ function get_each_context$5(ctx, list, i) {
898
+ const child_ctx = ctx.slice();
899
+ child_ctx[4] = list[i];
900
+ return child_ctx;
1212
901
  }
1213
902
 
1214
- function create_fragment$b(ctx) {
903
+ // (8:0) {#if rooms}
904
+ function create_if_block$3(ctx) {
1215
905
  let div;
1216
906
  let each_blocks = [];
1217
907
  let each_1_lookup = new Map();
1218
908
  let current;
1219
- let each_value = /*ruleLabelArray*/ ctx[1];
1220
- const get_key = ctx => /*type*/ ctx[7];
909
+ let each_value = /*rooms*/ ctx[1];
910
+ const get_key = ctx => /*room*/ ctx[4].id;
1221
911
 
1222
912
  for (let i = 0; i < each_value.length; i += 1) {
1223
- let child_ctx = get_each_context$2(ctx, each_value, i);
913
+ let child_ctx = get_each_context$5(ctx, each_value, i);
1224
914
  let key = get_key(child_ctx);
1225
- each_1_lookup.set(key, each_blocks[i] = create_each_block$2(key, child_ctx));
915
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$5(key, child_ctx));
1226
916
  }
1227
917
 
1228
918
  return {
@@ -1233,7 +923,7 @@ function create_fragment$b(ctx) {
1233
923
  each_blocks[i].c();
1234
924
  }
1235
925
 
1236
- internal.attr(div, "class", "floorplan-plugin__rulelabels");
926
+ internal.attr(div, "class", "floorplan-plugin__room-labels svelte-13xux0b");
1237
927
  },
1238
928
  m(target, anchor) {
1239
929
  internal.insert(target, div, anchor);
@@ -1244,11 +934,11 @@ function create_fragment$b(ctx) {
1244
934
 
1245
935
  current = true;
1246
936
  },
1247
- p(ctx, [dirty]) {
1248
- if (dirty & /*ruleLabelArray, pxmm, bounding*/ 7) {
1249
- each_value = /*ruleLabelArray*/ ctx[1];
937
+ p(ctx, dirty) {
938
+ if (dirty & /*rooms, getLabelElement*/ 3) {
939
+ each_value = /*rooms*/ ctx[1];
1250
940
  internal.group_outros();
1251
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$2, null, get_each_context$2);
941
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$5, null, get_each_context$5);
1252
942
  internal.check_outros();
1253
943
  }
1254
944
  },
@@ -1278,373 +968,670 @@ function create_fragment$b(ctx) {
1278
968
  };
1279
969
  }
1280
970
 
1281
- function instance$b($$self, $$props, $$invalidate) {
1282
- let bounding;
1283
- let ruleLabelData;
1284
- let ruleLabelDataKeys;
1285
- let ruleLabelArray;
1286
- let { pxmm } = $$props;
1287
- let { floorIndex } = $$props;
1288
- let { floorplanData } = $$props;
1289
-
1290
- $$self.$$set = $$props => {
1291
- if ('pxmm' in $$props) $$invalidate(0, pxmm = $$props.pxmm);
1292
- if ('floorIndex' in $$props) $$invalidate(3, floorIndex = $$props.floorIndex);
1293
- if ('floorplanData' in $$props) $$invalidate(4, floorplanData = $$props.floorplanData);
1294
- };
1295
-
1296
- $$self.$$.update = () => {
1297
- if ($$self.$$.dirty & /*floorplanData*/ 16) {
1298
- $$invalidate(2, bounding = floorplanData.bounding);
1299
- }
1300
-
1301
- if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 24) {
1302
- $$invalidate(5, ruleLabelData = floorplanData.floorDatas[floorIndex].rules);
1303
- }
1304
-
1305
- if ($$self.$$.dirty & /*ruleLabelData*/ 32) {
1306
- $$invalidate(6, ruleLabelDataKeys = Object.keys(ruleLabelData));
1307
- }
971
+ // (10:4) {#each rooms as room (room.id)}
972
+ function create_each_block$5(key_1, ctx) {
973
+ let first;
974
+ let roomlabel;
975
+ let current;
1308
976
 
1309
- if ($$self.$$.dirty & /*ruleLabelDataKeys, ruleLabelData*/ 96) {
1310
- $$invalidate(1, ruleLabelArray = ruleLabelDataKeys.map(key => [key, ruleLabelData[key]]));
977
+ const roomlabel_spread_levels = [
978
+ {
979
+ room: /*room*/ ctx[4],
980
+ getLabelElement: /*getLabelElement*/ ctx[0]
1311
981
  }
1312
- };
1313
-
1314
- return [
1315
- pxmm,
1316
- ruleLabelArray,
1317
- bounding,
1318
- floorIndex,
1319
- floorplanData,
1320
- ruleLabelData,
1321
- ruleLabelDataKeys
1322
982
  ];
1323
- }
1324
983
 
1325
- class RuleLabels extends internal.SvelteComponent {
1326
- constructor(options) {
1327
- super();
1328
- internal.init(this, options, instance$b, create_fragment$b, internal.safe_not_equal, { pxmm: 0, floorIndex: 3, floorplanData: 4 });
1329
- }
1330
- }
984
+ let roomlabel_props = {};
1331
985
 
1332
- /* src/floorplan/Components/Normalmage.svelte generated by Svelte v3.47.0 */
986
+ for (let i = 0; i < roomlabel_spread_levels.length; i += 1) {
987
+ roomlabel_props = internal.assign(roomlabel_props, roomlabel_spread_levels[i]);
988
+ }
1333
989
 
1334
- function add_css$7(target) {
1335
- internal.append_styles(target, "svelte-1cuuebb", "img.svelte-1cuuebb{width:100%;height:100%}");
1336
- }
990
+ roomlabel = new RoomLabel({ props: roomlabel_props });
991
+
992
+ return {
993
+ key: key_1,
994
+ first: null,
995
+ c() {
996
+ first = internal.empty();
997
+ internal.create_component(roomlabel.$$.fragment);
998
+ this.first = first;
999
+ },
1000
+ m(target, anchor) {
1001
+ internal.insert(target, first, anchor);
1002
+ internal.mount_component(roomlabel, target, anchor);
1003
+ current = true;
1004
+ },
1005
+ p(new_ctx, dirty) {
1006
+ ctx = new_ctx;
1007
+
1008
+ const roomlabel_changes = (dirty & /*rooms, getLabelElement*/ 3)
1009
+ ? internal.get_spread_update(roomlabel_spread_levels, [
1010
+ {
1011
+ room: /*room*/ ctx[4],
1012
+ getLabelElement: /*getLabelElement*/ ctx[0]
1013
+ }
1014
+ ])
1015
+ : {};
1016
+
1017
+ roomlabel.$set(roomlabel_changes);
1018
+ },
1019
+ i(local) {
1020
+ if (current) return;
1021
+ internal.transition_in(roomlabel.$$.fragment, local);
1022
+ current = true;
1023
+ },
1024
+ o(local) {
1025
+ internal.transition_out(roomlabel.$$.fragment, local);
1026
+ current = false;
1027
+ },
1028
+ d(detaching) {
1029
+ if (detaching) internal.detach(first);
1030
+ internal.destroy_component(roomlabel, detaching);
1031
+ }
1032
+ };
1033
+ }
1337
1034
 
1338
1035
  function create_fragment$a(ctx) {
1339
- let img;
1340
- let img_src_value;
1036
+ let if_block_anchor;
1037
+ let current;
1038
+ let if_block = /*rooms*/ ctx[1] && create_if_block$3(ctx);
1341
1039
 
1342
1040
  return {
1343
1041
  c() {
1344
- img = internal.element("img");
1345
- if (!internal.src_url_equal(img.src, img_src_value = /*url*/ ctx[0])) internal.attr(img, "src", img_src_value);
1346
- internal.attr(img, "alt", "floorplan iamge");
1347
- internal.attr(img, "class", "svelte-1cuuebb");
1042
+ if (if_block) if_block.c();
1043
+ if_block_anchor = internal.empty();
1348
1044
  },
1349
1045
  m(target, anchor) {
1350
- internal.insert(target, img, anchor);
1046
+ if (if_block) if_block.m(target, anchor);
1047
+ internal.insert(target, if_block_anchor, anchor);
1048
+ current = true;
1351
1049
  },
1352
1050
  p(ctx, [dirty]) {
1353
- if (dirty & /*url*/ 1 && !internal.src_url_equal(img.src, img_src_value = /*url*/ ctx[0])) {
1354
- internal.attr(img, "src", img_src_value);
1051
+ if (/*rooms*/ ctx[1]) {
1052
+ if (if_block) {
1053
+ if_block.p(ctx, dirty);
1054
+
1055
+ if (dirty & /*rooms*/ 2) {
1056
+ internal.transition_in(if_block, 1);
1057
+ }
1058
+ } else {
1059
+ if_block = create_if_block$3(ctx);
1060
+ if_block.c();
1061
+ internal.transition_in(if_block, 1);
1062
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
1063
+ }
1064
+ } else if (if_block) {
1065
+ internal.group_outros();
1066
+
1067
+ internal.transition_out(if_block, 1, 1, () => {
1068
+ if_block = null;
1069
+ });
1070
+
1071
+ internal.check_outros();
1355
1072
  }
1356
1073
  },
1357
- i: internal.noop,
1358
- o: internal.noop,
1074
+ i(local) {
1075
+ if (current) return;
1076
+ internal.transition_in(if_block);
1077
+ current = true;
1078
+ },
1079
+ o(local) {
1080
+ internal.transition_out(if_block);
1081
+ current = false;
1082
+ },
1359
1083
  d(detaching) {
1360
- if (detaching) internal.detach(img);
1084
+ if (if_block) if_block.d(detaching);
1085
+ if (detaching) internal.detach(if_block_anchor);
1361
1086
  }
1362
1087
  };
1363
1088
  }
1364
1089
 
1365
1090
  function instance$a($$self, $$props, $$invalidate) {
1366
- let { url } = $$props;
1091
+ let rooms;
1092
+ let { floorIndex } = $$props;
1093
+ let { floorplanData } = $$props;
1094
+ let { getLabelElement } = $$props;
1367
1095
 
1368
1096
  $$self.$$set = $$props => {
1369
- if ('url' in $$props) $$invalidate(0, url = $$props.url);
1097
+ if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
1098
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
1099
+ if ('getLabelElement' in $$props) $$invalidate(0, getLabelElement = $$props.getLabelElement);
1370
1100
  };
1371
1101
 
1372
- return [url];
1102
+ $$self.$$.update = () => {
1103
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 12) {
1104
+ $$invalidate(1, rooms = floorplanData.floorDatas[floorIndex].rooms);
1105
+ }
1106
+ };
1107
+
1108
+ return [getLabelElement, rooms, floorIndex, floorplanData];
1373
1109
  }
1374
1110
 
1375
- class Normalmage extends internal.SvelteComponent {
1111
+ class RoomLabels extends internal.SvelteComponent {
1376
1112
  constructor(options) {
1377
1113
  super();
1378
- internal.init(this, options, instance$a, create_fragment$a, internal.safe_not_equal, { url: 0 }, add_css$7);
1114
+
1115
+ internal.init(
1116
+ this,
1117
+ options,
1118
+ instance$a,
1119
+ create_fragment$a,
1120
+ internal.safe_not_equal,
1121
+ {
1122
+ floorIndex: 2,
1123
+ floorplanData: 3,
1124
+ getLabelElement: 0
1125
+ },
1126
+ add_css$7
1127
+ );
1379
1128
  }
1380
1129
  }
1381
1130
 
1382
- /* src/floorplan/Components/SvgImage.svelte generated by Svelte v3.47.0 */
1131
+ /* src/floorplan/Components/RuleLabels/RuleItem.svelte generated by Svelte v3.47.0 */
1383
1132
 
1384
1133
  function add_css$6(target) {
1385
- internal.append_styles(target, "svelte-1qqy56u", ".floorplan-plugin__base-image.svelte-1qqy56u{width:100%;height:100%}");
1134
+ internal.append_styles(target, "svelte-xt7p1v", ".floorplan-plugin__rule-labels.svelte-xt7p1v.svelte-xt7p1v{position:absolute;display:flex}.floorplan-plugin__rule-labels--top.svelte-xt7p1v.svelte-xt7p1v{left:0;top:-1.25rem}.floorplan-plugin__rule-labels--bottom.svelte-xt7p1v.svelte-xt7p1v{left:0;bottom:-1.25rem}.floorplan-plugin__rule-labels--left.svelte-xt7p1v.svelte-xt7p1v{top:0;left:-1.25rem}.floorplan-plugin__rule-labels--right.svelte-xt7p1v.svelte-xt7p1v{top:0;right:-1.25rem}.floorplan-plugin__rule-line.svelte-xt7p1v.svelte-xt7p1v{background:#fff;opacity:0.05;width:100%;height:100%}.floorplan-plugin__rule-scale-wrapper.svelte-xt7p1v.svelte-xt7p1v{position:absolute;width:0.3125rem;height:100%;left:50%;top:0;transform:translateX(-50%)}.floorplan-plugin__rule-labels.is-row.svelte-xt7p1v .floorplan-plugin__rule-scale-wrapper.svelte-xt7p1v{width:100%;height:0.3125rem;top:50%;left:0;transform:translateY(-50%)}.floorplan-plugin__rule-scale.svelte-xt7p1v.svelte-xt7p1v{position:absolute;background:#fff;opacity:0.05;width:100%;height:0.0625rem}.floorplan-plugin__rule-labels.is-row.svelte-xt7p1v .floorplan-plugin__rule-scale.svelte-xt7p1v{width:0.0625rem;height:100%}.floorplan-plugin__rule-text-wrapper.svelte-xt7p1v.svelte-xt7p1v{position:absolute}.floorplan-plugin__rule-labels--top.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:100%;height:0;top:0.625rem}.floorplan-plugin__rule-labels--bottom.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:100%;height:0;bottom:0.625rem}.floorplan-plugin__rule-labels--left.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:0;height:100%;left:0.625rem}.floorplan-plugin__rule-labels--right.svelte-xt7p1v .floorplan-plugin__rule-text-wrapper.svelte-xt7p1v{width:0;height:100%;right:0.625rem}.floorplan-plugin__rule-text-item.svelte-xt7p1v.svelte-xt7p1v{width:0;height:0;position:absolute;transform:rotate(90deg)}.floorplan-plugin__rule-labels.is-row.svelte-xt7p1v .floorplan-plugin__rule-text-item.svelte-xt7p1v{transform:rotate(0)}.floorplan-plugin__rule-text.svelte-xt7p1v.svelte-xt7p1v{width:-webkit-max-content;width:-moz-max-content;width:max-content;transform:translate(-50%, -50%);font-size:0.625rem;color:#fff;opacity:0.2}");
1386
1135
  }
1387
1136
 
1388
- function create_fragment$9(ctx) {
1137
+ function get_each_context$4(ctx, list, i) {
1138
+ const child_ctx = ctx.slice();
1139
+ child_ctx[10] = list[i];
1140
+ child_ctx[12] = i;
1141
+ return child_ctx;
1142
+ }
1143
+
1144
+ function get_each_context_1(ctx, list, i) {
1145
+ const child_ctx = ctx.slice();
1146
+ child_ctx[13] = list[i];
1147
+ return child_ctx;
1148
+ }
1149
+
1150
+ // (53:4) {#each rulerLabels as rulerLabel}
1151
+ function create_each_block_1(ctx) {
1389
1152
  let div;
1390
- let html_tag;
1391
- let t;
1392
- let html_tag_1;
1393
1153
 
1394
1154
  return {
1395
1155
  c() {
1396
1156
  div = internal.element("div");
1397
- html_tag = new internal.HtmlTag();
1398
- t = internal.space();
1399
- html_tag_1 = new internal.HtmlTag();
1400
- html_tag.a = t;
1401
- html_tag_1.a = null;
1402
- internal.attr(div, "class", "floorplan-plugin__base-image svelte-1qqy56u");
1157
+ internal.attr(div, "class", "floorplan-plugin__rule-scale svelte-xt7p1v");
1158
+ internal.set_style(div, "left", /*rulerLabel*/ ctx[13].left * 100 + '%', false);
1159
+ internal.set_style(div, "bottom", /*rulerLabel*/ ctx[13].bottom * 100 + '%', false);
1403
1160
  },
1404
1161
  m(target, anchor) {
1405
1162
  internal.insert(target, div, anchor);
1406
- html_tag.m(/*svgStyle*/ ctx[1], div);
1407
- internal.append(div, t);
1408
- html_tag_1.m(/*content*/ ctx[0], div);
1163
+ },
1164
+ p: internal.noop,
1165
+ d(detaching) {
1166
+ if (detaching) internal.detach(div);
1167
+ }
1168
+ };
1169
+ }
1170
+
1171
+ // (62:4) {#each rulerTexts as textItem, textItemIndex (textItemIndex)}
1172
+ function create_each_block$4(key_1, ctx) {
1173
+ let div1;
1174
+ let div0;
1175
+ let t0_value = /*textItem*/ ctx[10].distance + "";
1176
+ let t0;
1177
+ let t1;
1178
+
1179
+ return {
1180
+ key: key_1,
1181
+ first: null,
1182
+ c() {
1183
+ div1 = internal.element("div");
1184
+ div0 = internal.element("div");
1185
+ t0 = internal.text(t0_value);
1186
+ t1 = internal.space();
1187
+ internal.attr(div0, "class", "floorplan-plugin__rule-text svelte-xt7p1v");
1188
+ internal.toggle_class(div0, "is-row", /*isRow*/ ctx[1]);
1189
+ internal.attr(div1, "class", "floorplan-plugin__rule-text-item svelte-xt7p1v");
1190
+ internal.set_style(div1, "left", /*textItem*/ ctx[10].left * 100 + '%', false);
1191
+ internal.set_style(div1, "bottom", /*textItem*/ ctx[10].bottom * 100 + '%', false);
1192
+ this.first = div1;
1193
+ },
1194
+ m(target, anchor) {
1195
+ internal.insert(target, div1, anchor);
1196
+ internal.append(div1, div0);
1197
+ internal.append(div0, t0);
1198
+ internal.append(div1, t1);
1199
+ },
1200
+ p(new_ctx, dirty) {
1201
+ ctx = new_ctx;
1202
+ },
1203
+ d(detaching) {
1204
+ if (detaching) internal.detach(div1);
1205
+ }
1206
+ };
1207
+ }
1208
+
1209
+ function create_fragment$9(ctx) {
1210
+ let div3;
1211
+ let div0;
1212
+ let t0;
1213
+ let div1;
1214
+ let t1;
1215
+ let div2;
1216
+ let each_blocks = [];
1217
+ let each1_lookup = new Map();
1218
+ let div3_class_value;
1219
+ let each_value_1 = /*rulerLabels*/ ctx[2];
1220
+ let each_blocks_1 = [];
1221
+
1222
+ for (let i = 0; i < each_value_1.length; i += 1) {
1223
+ each_blocks_1[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i));
1224
+ }
1225
+
1226
+ let each_value = /*rulerTexts*/ ctx[3];
1227
+ const get_key = ctx => /*textItemIndex*/ ctx[12];
1228
+
1229
+ for (let i = 0; i < each_value.length; i += 1) {
1230
+ let child_ctx = get_each_context$4(ctx, each_value, i);
1231
+ let key = get_key(child_ctx);
1232
+ each1_lookup.set(key, each_blocks[i] = create_each_block$4(key, child_ctx));
1233
+ }
1234
+
1235
+ return {
1236
+ c() {
1237
+ div3 = internal.element("div");
1238
+ div0 = internal.element("div");
1239
+ t0 = internal.space();
1240
+ div1 = internal.element("div");
1241
+
1242
+ for (let i = 0; i < each_blocks_1.length; i += 1) {
1243
+ each_blocks_1[i].c();
1244
+ }
1245
+
1246
+ t1 = internal.space();
1247
+ div2 = internal.element("div");
1248
+
1249
+ for (let i = 0; i < each_blocks.length; i += 1) {
1250
+ each_blocks[i].c();
1251
+ }
1252
+
1253
+ internal.attr(div0, "class", "floorplan-plugin__rule-line svelte-xt7p1v");
1254
+ internal.attr(div1, "class", "floorplan-plugin__rule-scale-wrapper svelte-xt7p1v");
1255
+ internal.toggle_class(div1, "is-row", /*isRow*/ ctx[1]);
1256
+ internal.attr(div2, "class", "floorplan-plugin__rule-text-wrapper svelte-xt7p1v");
1257
+ internal.attr(div3, "class", div3_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels--" + /*type*/ ctx[0] + " svelte-xt7p1v");
1258
+ internal.toggle_class(div3, "is-row", /*isRow*/ ctx[1]);
1259
+ internal.set_style(div3, "width", /*isRow*/ ctx[1] ? '100%' : 1 / 16 + 'rem', false);
1260
+ internal.set_style(div3, "height", !/*isRow*/ ctx[1] ? '100%' : 1 / 16 + 'rem', false);
1261
+ },
1262
+ m(target, anchor) {
1263
+ internal.insert(target, div3, anchor);
1264
+ internal.append(div3, div0);
1265
+ internal.append(div3, t0);
1266
+ internal.append(div3, div1);
1267
+
1268
+ for (let i = 0; i < each_blocks_1.length; i += 1) {
1269
+ each_blocks_1[i].m(div1, null);
1270
+ }
1271
+
1272
+ internal.append(div3, t1);
1273
+ internal.append(div3, div2);
1274
+
1275
+ for (let i = 0; i < each_blocks.length; i += 1) {
1276
+ each_blocks[i].m(div2, null);
1277
+ }
1409
1278
  },
1410
1279
  p(ctx, [dirty]) {
1411
- if (dirty & /*content*/ 1) html_tag_1.p(/*content*/ ctx[0]);
1280
+ if (dirty & /*rulerLabels*/ 4) {
1281
+ each_value_1 = /*rulerLabels*/ ctx[2];
1282
+ let i;
1283
+
1284
+ for (i = 0; i < each_value_1.length; i += 1) {
1285
+ const child_ctx = get_each_context_1(ctx, each_value_1, i);
1286
+
1287
+ if (each_blocks_1[i]) {
1288
+ each_blocks_1[i].p(child_ctx, dirty);
1289
+ } else {
1290
+ each_blocks_1[i] = create_each_block_1(child_ctx);
1291
+ each_blocks_1[i].c();
1292
+ each_blocks_1[i].m(div1, null);
1293
+ }
1294
+ }
1295
+
1296
+ for (; i < each_blocks_1.length; i += 1) {
1297
+ each_blocks_1[i].d(1);
1298
+ }
1299
+
1300
+ each_blocks_1.length = each_value_1.length;
1301
+ }
1302
+
1303
+ if (dirty & /*rulerTexts, isRow*/ 10) {
1304
+ each_value = /*rulerTexts*/ ctx[3];
1305
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each1_lookup, div2, internal.destroy_block, create_each_block$4, null, get_each_context$4);
1306
+ }
1307
+
1308
+ if (dirty & /*type*/ 1 && div3_class_value !== (div3_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels--" + /*type*/ ctx[0] + " svelte-xt7p1v")) {
1309
+ internal.attr(div3, "class", div3_class_value);
1310
+ }
1311
+
1312
+ if (dirty & /*type, isRow*/ 3) {
1313
+ internal.toggle_class(div3, "is-row", /*isRow*/ ctx[1]);
1314
+ }
1412
1315
  },
1413
1316
  i: internal.noop,
1414
1317
  o: internal.noop,
1415
1318
  d(detaching) {
1416
- if (detaching) internal.detach(div);
1319
+ if (detaching) internal.detach(div3);
1320
+ internal.destroy_each(each_blocks_1, detaching);
1321
+
1322
+ for (let i = 0; i < each_blocks.length; i += 1) {
1323
+ each_blocks[i].d();
1324
+ }
1417
1325
  }
1418
1326
  };
1419
1327
  }
1420
1328
 
1329
+ const padding$1 = 1000;
1330
+ const exteriorWallOffset$1 = 180;
1331
+
1421
1332
  function instance$9($$self, $$props, $$invalidate) {
1422
- let { content } = $$props;
1333
+ let { type } = $$props;
1334
+ let { data } = $$props;
1335
+ let { bounding } = $$props;
1336
+ const isRow = type === 'top' || type === 'bottom';
1337
+ const contentWidth = bounding.max.x - bounding.min.x - (padding$1 - exteriorWallOffset$1) * 2;
1338
+ const contentHeight = bounding.max.y - bounding.min.y - (padding$1 - exteriorWallOffset$1) * 2;
1423
1339
 
1424
- const svgStyle = `
1425
- <style>
1426
- svg [type='lineGroup'] path {
1427
- fill: #ffffff;
1428
- stroke: #ffffff;
1429
- }
1430
- svg [type='lineItemGroup'] g g g g {
1431
- stroke: #ffffff;
1432
- }
1433
- </style>
1434
- `;
1340
+ // 计算每一段墙的长度,以及墙两侧点距离标尺初始点的像素值
1341
+ const rulerPoints = data.map(([start, end]) => isRow ? [start.x, end.x] : [start.y, end.y]).flat().sort().filter((x, index, arr) => {
1342
+ // 筛除重复数据
1343
+ if (index === 0) return true;
1344
+
1345
+ return x !== arr[index - 1];
1346
+ });
1347
+
1348
+ const rulerLabels = rulerPoints.map(num => {
1349
+ const left = isRow
1350
+ ? (num - bounding.min.x - padding$1 + exteriorWallOffset$1) / contentWidth
1351
+ : 0;
1352
+
1353
+ const bottom = !isRow
1354
+ ? (num - bounding.min.y - padding$1 + exteriorWallOffset$1) / contentHeight
1355
+ : 0;
1356
+
1357
+ return { left, bottom };
1358
+ });
1359
+
1360
+ rulerLabels.unshift({ left: 0, bottom: 0 });
1361
+ rulerLabels.push(isRow ? { left: 1, bottom: 0 } : { left: 0, bottom: 1 });
1362
+ const length = rulerPoints[rulerPoints.length - 1] - rulerPoints[0];
1363
+
1364
+ const rulerTexts = rulerPoints.map((num, index, arr) => {
1365
+ const distance = index === 0 ? 0 : num - arr[index - 1];
1366
+ const positionNum = index === 0 ? 0 : (num + arr[index - 1]) / 2;
1367
+
1368
+ const left = isRow
1369
+ ? (positionNum - bounding.min.x - padding$1 + exteriorWallOffset$1) / contentWidth
1370
+ : 0;
1371
+
1372
+ const bottom = !isRow
1373
+ ? (positionNum - bounding.min.y - padding$1 + exteriorWallOffset$1) / contentHeight
1374
+ : 0;
1375
+
1376
+ return { left, bottom, distance };
1377
+ }).filter(({ distance }) => distance / length > 0.1);
1435
1378
 
1436
1379
  $$self.$$set = $$props => {
1437
- if ('content' in $$props) $$invalidate(0, content = $$props.content);
1380
+ if ('type' in $$props) $$invalidate(0, type = $$props.type);
1381
+ if ('data' in $$props) $$invalidate(4, data = $$props.data);
1382
+ if ('bounding' in $$props) $$invalidate(5, bounding = $$props.bounding);
1438
1383
  };
1439
1384
 
1440
- return [content, svgStyle];
1385
+ return [type, isRow, rulerLabels, rulerTexts, data, bounding];
1441
1386
  }
1442
1387
 
1443
- class SvgImage extends internal.SvelteComponent {
1388
+ class RuleItem extends internal.SvelteComponent {
1444
1389
  constructor(options) {
1445
1390
  super();
1446
- internal.init(this, options, instance$9, create_fragment$9, internal.safe_not_equal, { content: 0 }, add_css$6);
1391
+ internal.init(this, options, instance$9, create_fragment$9, internal.safe_not_equal, { type: 0, data: 4, bounding: 5 }, add_css$6);
1447
1392
  }
1448
1393
  }
1449
1394
 
1450
- /* src/floorplan/Components/BaseImage.svelte generated by Svelte v3.47.0 */
1395
+ /* src/floorplan/Components/RuleLabels/RuleLabels.svelte generated by Svelte v3.47.0 */
1451
1396
 
1452
1397
  function add_css$5(target) {
1453
- internal.append_styles(target, "svelte-126ja8e", ".floorplan-plugin__base-image.svelte-126ja8e{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}");
1398
+ internal.append_styles(target, "svelte-1mzj9p3", ".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}");
1454
1399
  }
1455
1400
 
1456
- // (13:22)
1457
- function create_if_block_1$3(ctx) {
1458
- let normalimage;
1401
+ function get_each_context$3(ctx, list, i) {
1402
+ const child_ctx = ctx.slice();
1403
+ child_ctx[12] = list[i][0];
1404
+ child_ctx[13] = list[i][1];
1405
+ return child_ctx;
1406
+ }
1407
+
1408
+ // (19:2) {#each ruleLabelArray as [type, data] (type)}
1409
+ function create_each_block$3(key_1, ctx) {
1410
+ let first;
1411
+ let ruleitem;
1459
1412
  let current;
1460
- normalimage = new Normalmage({ props: { url: /*imageData*/ ctx[1].url } });
1461
1413
 
1462
- return {
1463
- c() {
1464
- internal.create_component(normalimage.$$.fragment);
1465
- },
1466
- m(target, anchor) {
1467
- internal.mount_component(normalimage, target, anchor);
1468
- current = true;
1469
- },
1470
- p(ctx, dirty) {
1471
- const normalimage_changes = {};
1472
- if (dirty & /*imageData*/ 2) normalimage_changes.url = /*imageData*/ ctx[1].url;
1473
- normalimage.$set(normalimage_changes);
1474
- },
1475
- i(local) {
1476
- if (current) return;
1477
- internal.transition_in(normalimage.$$.fragment, local);
1478
- current = true;
1479
- },
1480
- o(local) {
1481
- internal.transition_out(normalimage.$$.fragment, local);
1482
- current = false;
1483
- },
1484
- d(detaching) {
1485
- internal.destroy_component(normalimage, detaching);
1414
+ const ruleitem_spread_levels = [
1415
+ {
1416
+ type: /*type*/ ctx[12],
1417
+ data: /*data*/ ctx[13],
1418
+ bounding: /*bounding*/ ctx[0]
1486
1419
  }
1487
- };
1488
- }
1420
+ ];
1489
1421
 
1490
- // (11:2) {#if svgContent}
1491
- function create_if_block$3(ctx) {
1492
- let svgimage;
1493
- let current;
1422
+ let ruleitem_props = {};
1494
1423
 
1495
- svgimage = new SvgImage({
1496
- props: { content: /*svgContent*/ ctx[0] }
1497
- });
1424
+ for (let i = 0; i < ruleitem_spread_levels.length; i += 1) {
1425
+ ruleitem_props = internal.assign(ruleitem_props, ruleitem_spread_levels[i]);
1426
+ }
1427
+
1428
+ ruleitem = new RuleItem({ props: ruleitem_props });
1498
1429
 
1499
1430
  return {
1431
+ key: key_1,
1432
+ first: null,
1500
1433
  c() {
1501
- internal.create_component(svgimage.$$.fragment);
1434
+ first = internal.empty();
1435
+ internal.create_component(ruleitem.$$.fragment);
1436
+ this.first = first;
1502
1437
  },
1503
1438
  m(target, anchor) {
1504
- internal.mount_component(svgimage, target, anchor);
1439
+ internal.insert(target, first, anchor);
1440
+ internal.mount_component(ruleitem, target, anchor);
1505
1441
  current = true;
1506
1442
  },
1507
- p(ctx, dirty) {
1508
- const svgimage_changes = {};
1509
- if (dirty & /*svgContent*/ 1) svgimage_changes.content = /*svgContent*/ ctx[0];
1510
- svgimage.$set(svgimage_changes);
1443
+ p(new_ctx, dirty) {
1444
+ ctx = new_ctx;
1445
+
1446
+ const ruleitem_changes = (dirty & /*ruleLabelArray, bounding*/ 9)
1447
+ ? internal.get_spread_update(ruleitem_spread_levels, [
1448
+ {
1449
+ type: /*type*/ ctx[12],
1450
+ data: /*data*/ ctx[13],
1451
+ bounding: /*bounding*/ ctx[0]
1452
+ }
1453
+ ])
1454
+ : {};
1455
+
1456
+ ruleitem.$set(ruleitem_changes);
1511
1457
  },
1512
1458
  i(local) {
1513
1459
  if (current) return;
1514
- internal.transition_in(svgimage.$$.fragment, local);
1460
+ internal.transition_in(ruleitem.$$.fragment, local);
1515
1461
  current = true;
1516
1462
  },
1517
1463
  o(local) {
1518
- internal.transition_out(svgimage.$$.fragment, local);
1464
+ internal.transition_out(ruleitem.$$.fragment, local);
1519
1465
  current = false;
1520
1466
  },
1521
1467
  d(detaching) {
1522
- internal.destroy_component(svgimage, detaching);
1468
+ if (detaching) internal.detach(first);
1469
+ internal.destroy_component(ruleitem, detaching);
1523
1470
  }
1524
1471
  };
1525
1472
  }
1526
1473
 
1527
1474
  function create_fragment$8(ctx) {
1528
1475
  let div;
1529
- let current_block_type_index;
1530
- let if_block;
1476
+ let each_blocks = [];
1477
+ let each_1_lookup = new Map();
1531
1478
  let current;
1532
- const if_block_creators = [create_if_block$3, create_if_block_1$3];
1533
- const if_blocks = [];
1479
+ let each_value = /*ruleLabelArray*/ ctx[3];
1480
+ const get_key = ctx => /*type*/ ctx[12];
1534
1481
 
1535
- function select_block_type(ctx, dirty) {
1536
- if (/*svgContent*/ ctx[0]) return 0;
1537
- if (/*imageData*/ ctx[1]) return 1;
1538
- return -1;
1539
- }
1540
-
1541
- if (~(current_block_type_index = select_block_type(ctx))) {
1542
- if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
1482
+ for (let i = 0; i < each_value.length; i += 1) {
1483
+ let child_ctx = get_each_context$3(ctx, each_value, i);
1484
+ let key = get_key(child_ctx);
1485
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$3(key, child_ctx));
1543
1486
  }
1544
1487
 
1545
1488
  return {
1546
1489
  c() {
1547
1490
  div = internal.element("div");
1548
- if (if_block) if_block.c();
1549
- internal.attr(div, "class", "floorplan-plugin__base-image svelte-126ja8e");
1491
+
1492
+ for (let i = 0; i < each_blocks.length; i += 1) {
1493
+ each_blocks[i].c();
1494
+ }
1495
+
1496
+ internal.attr(div, "class", "floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3");
1497
+ internal.set_style(div, "width", /*width*/ ctx[2], false);
1498
+ internal.set_style(div, "height", /*height*/ ctx[1], false);
1550
1499
  },
1551
1500
  m(target, anchor) {
1552
1501
  internal.insert(target, div, anchor);
1553
1502
 
1554
- if (~current_block_type_index) {
1555
- if_blocks[current_block_type_index].m(div, null);
1503
+ for (let i = 0; i < each_blocks.length; i += 1) {
1504
+ each_blocks[i].m(div, null);
1556
1505
  }
1557
1506
 
1558
1507
  current = true;
1559
1508
  },
1560
1509
  p(ctx, [dirty]) {
1561
- let previous_block_index = current_block_type_index;
1562
- current_block_type_index = select_block_type(ctx);
1563
-
1564
- if (current_block_type_index === previous_block_index) {
1565
- if (~current_block_type_index) {
1566
- if_blocks[current_block_type_index].p(ctx, dirty);
1567
- }
1568
- } else {
1569
- if (if_block) {
1570
- internal.group_outros();
1571
-
1572
- internal.transition_out(if_blocks[previous_block_index], 1, 1, () => {
1573
- if_blocks[previous_block_index] = null;
1574
- });
1575
-
1576
- internal.check_outros();
1577
- }
1578
-
1579
- if (~current_block_type_index) {
1580
- if_block = if_blocks[current_block_type_index];
1510
+ if (dirty & /*ruleLabelArray, bounding*/ 9) {
1511
+ each_value = /*ruleLabelArray*/ ctx[3];
1512
+ internal.group_outros();
1513
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, internal.outro_and_destroy_block, create_each_block$3, null, get_each_context$3);
1514
+ internal.check_outros();
1515
+ }
1581
1516
 
1582
- if (!if_block) {
1583
- if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
1584
- if_block.c();
1585
- } else {
1586
- if_block.p(ctx, dirty);
1587
- }
1517
+ if (dirty & /*width*/ 4) {
1518
+ internal.set_style(div, "width", /*width*/ ctx[2], false);
1519
+ }
1588
1520
 
1589
- internal.transition_in(if_block, 1);
1590
- if_block.m(div, null);
1591
- } else {
1592
- if_block = null;
1593
- }
1521
+ if (dirty & /*height*/ 2) {
1522
+ internal.set_style(div, "height", /*height*/ ctx[1], false);
1594
1523
  }
1595
1524
  },
1596
1525
  i(local) {
1597
1526
  if (current) return;
1598
- internal.transition_in(if_block);
1527
+
1528
+ for (let i = 0; i < each_value.length; i += 1) {
1529
+ internal.transition_in(each_blocks[i]);
1530
+ }
1531
+
1599
1532
  current = true;
1600
1533
  },
1601
1534
  o(local) {
1602
- internal.transition_out(if_block);
1535
+ for (let i = 0; i < each_blocks.length; i += 1) {
1536
+ internal.transition_out(each_blocks[i]);
1537
+ }
1538
+
1603
1539
  current = false;
1604
1540
  },
1605
1541
  d(detaching) {
1606
1542
  if (detaching) internal.detach(div);
1607
1543
 
1608
- if (~current_block_type_index) {
1609
- if_blocks[current_block_type_index].d();
1544
+ for (let i = 0; i < each_blocks.length; i += 1) {
1545
+ each_blocks[i].d();
1610
1546
  }
1611
1547
  }
1612
1548
  };
1613
1549
  }
1614
1550
 
1551
+ const padding = 1000;
1552
+ const exteriorWallOffset = 180;
1553
+
1615
1554
  function instance$8($$self, $$props, $$invalidate) {
1616
- let imageData;
1617
- let svgContent;
1618
- var _a, _b;
1555
+ let bounding;
1556
+ let ruleLabelData;
1557
+ let ruleLabelDataKeys;
1558
+ let ruleLabelArray;
1559
+ let boundingWidth;
1560
+ let boundingHeight;
1561
+ let contentWidth;
1562
+ let contentHeight;
1563
+ let width;
1564
+ let height;
1619
1565
  let { floorIndex } = $$props;
1620
1566
  let { floorplanData } = $$props;
1621
1567
 
1622
1568
  $$self.$$set = $$props => {
1623
- if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
1624
- if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
1569
+ if ('floorIndex' in $$props) $$invalidate(4, floorIndex = $$props.floorIndex);
1570
+ if ('floorplanData' in $$props) $$invalidate(5, floorplanData = $$props.floorplanData);
1625
1571
  };
1626
1572
 
1627
1573
  $$self.$$.update = () => {
1628
- if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 12) {
1629
- $$invalidate(1, imageData = floorplanData.outlines[floorIndex]);
1574
+ if ($$self.$$.dirty & /*floorplanData*/ 32) {
1575
+ $$invalidate(0, bounding = floorplanData.bounding);
1630
1576
  }
1631
1577
 
1632
- if ($$self.$$.dirty & /*floorplanData, _a, floorIndex, _b*/ 60) {
1633
- $$invalidate(0, svgContent = $$invalidate(5, _b = $$invalidate(4, _a = floorplanData.outlines) === null || _a === void 0
1634
- ? void 0
1635
- : _a[floorIndex]) === null || _b === void 0
1636
- ? void 0
1637
- : _b.svgContent);
1578
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 48) {
1579
+ $$invalidate(10, ruleLabelData = floorplanData.floorDatas[floorIndex].rules);
1580
+ }
1581
+
1582
+ if ($$self.$$.dirty & /*ruleLabelData*/ 1024) {
1583
+ $$invalidate(11, ruleLabelDataKeys = Object.keys(ruleLabelData));
1584
+ }
1585
+
1586
+ if ($$self.$$.dirty & /*ruleLabelDataKeys, ruleLabelData*/ 3072) {
1587
+ $$invalidate(3, ruleLabelArray = ruleLabelDataKeys.map(key => [key, ruleLabelData[key]]));
1588
+ }
1589
+
1590
+ if ($$self.$$.dirty & /*bounding*/ 1) {
1591
+ $$invalidate(8, boundingWidth = bounding.max.x - bounding.min.x);
1592
+ }
1593
+
1594
+ if ($$self.$$.dirty & /*bounding*/ 1) {
1595
+ $$invalidate(6, boundingHeight = bounding.max.y - bounding.min.y);
1596
+ }
1597
+
1598
+ if ($$self.$$.dirty & /*bounding*/ 1) {
1599
+ $$invalidate(9, contentWidth = bounding.max.x - bounding.min.x - (padding - exteriorWallOffset) * 2);
1600
+ }
1601
+
1602
+ if ($$self.$$.dirty & /*bounding*/ 1) {
1603
+ $$invalidate(7, contentHeight = bounding.max.y - bounding.min.y - (padding - exteriorWallOffset) * 2);
1604
+ }
1605
+
1606
+ if ($$self.$$.dirty & /*contentWidth, boundingWidth*/ 768) {
1607
+ $$invalidate(2, width = contentWidth / boundingWidth * 100 + '%');
1608
+ }
1609
+
1610
+ if ($$self.$$.dirty & /*contentHeight, boundingHeight*/ 192) {
1611
+ $$invalidate(1, height = contentHeight / boundingHeight * 100 + '%');
1638
1612
  }
1639
1613
  };
1640
1614
 
1641
- return [svgContent, imageData, floorIndex, floorplanData, _a, _b];
1615
+ return [
1616
+ bounding,
1617
+ height,
1618
+ width,
1619
+ ruleLabelArray,
1620
+ floorIndex,
1621
+ floorplanData,
1622
+ boundingHeight,
1623
+ contentHeight,
1624
+ boundingWidth,
1625
+ contentWidth,
1626
+ ruleLabelData,
1627
+ ruleLabelDataKeys
1628
+ ];
1642
1629
  }
1643
1630
 
1644
- class BaseImage extends internal.SvelteComponent {
1631
+ class RuleLabels extends internal.SvelteComponent {
1645
1632
  constructor(options) {
1646
1633
  super();
1647
- internal.init(this, options, instance$8, create_fragment$8, internal.safe_not_equal, { floorIndex: 2, floorplanData: 3 }, add_css$5);
1634
+ internal.init(this, options, instance$8, create_fragment$8, internal.safe_not_equal, { floorIndex: 4, floorplanData: 5 }, add_css$5);
1648
1635
  }
1649
1636
  }
1650
1637
 
@@ -1915,20 +1902,20 @@ class RoomMaterial_2 extends internal.SvelteComponent {
1915
1902
  /* src/floorplan/Components/RoomMaterials/RoomMaterial.svelte generated by Svelte v3.47.0 */
1916
1903
 
1917
1904
  function add_css$4(target) {
1918
- internal.append_styles(target, "svelte-1b0icjc", "svg.svelte-1b0icjc{position:absolute;width:100%;height:100%;overflow:visible}");
1905
+ internal.append_styles(target, "svelte-1d4xj70", "svg.svelte-1d4xj70{position:absolute;width:100%;height:100%;overflow:visible}");
1919
1906
  }
1920
1907
 
1921
- function get_each_context$1(ctx, list, i) {
1908
+ function get_each_context$2(ctx, list, i) {
1922
1909
  const child_ctx = ctx.slice();
1923
- child_ctx[4] = list[i];
1910
+ child_ctx[5] = list[i];
1924
1911
  return child_ctx;
1925
1912
  }
1926
1913
 
1927
- // (18:6) {:else}
1914
+ // (19:6) {:else}
1928
1915
  function create_else_block(ctx) {
1929
1916
  let roommaterial_1;
1930
1917
  let current;
1931
- roommaterial_1 = new RoomMaterial_1({ props: { path: /*room*/ ctx[4].path } });
1918
+ roommaterial_1 = new RoomMaterial_1({ props: { path: /*room*/ ctx[5].path } });
1932
1919
 
1933
1920
  return {
1934
1921
  c() {
@@ -1940,7 +1927,7 @@ function create_else_block(ctx) {
1940
1927
  },
1941
1928
  p(ctx, dirty) {
1942
1929
  const roommaterial_1_changes = {};
1943
- if (dirty & /*rooms*/ 1) roommaterial_1_changes.path = /*room*/ ctx[4].path;
1930
+ if (dirty & /*rooms*/ 1) roommaterial_1_changes.path = /*room*/ ctx[5].path;
1944
1931
  roommaterial_1.$set(roommaterial_1_changes);
1945
1932
  },
1946
1933
  i(local) {
@@ -1958,11 +1945,11 @@ function create_else_block(ctx) {
1958
1945
  };
1959
1946
  }
1960
1947
 
1961
- // (16:37)
1948
+ // (17:37)
1962
1949
  function create_if_block_1$2(ctx) {
1963
1950
  let roommaterial_2;
1964
1951
  let current;
1965
- roommaterial_2 = new RoomMaterial_2({ props: { path: /*room*/ ctx[4].path } });
1952
+ roommaterial_2 = new RoomMaterial_2({ props: { path: /*room*/ ctx[5].path } });
1966
1953
 
1967
1954
  return {
1968
1955
  c() {
@@ -1974,7 +1961,7 @@ function create_if_block_1$2(ctx) {
1974
1961
  },
1975
1962
  p(ctx, dirty) {
1976
1963
  const roommaterial_2_changes = {};
1977
- if (dirty & /*rooms*/ 1) roommaterial_2_changes.path = /*room*/ ctx[4].path;
1964
+ if (dirty & /*rooms*/ 1) roommaterial_2_changes.path = /*room*/ ctx[5].path;
1978
1965
  roommaterial_2.$set(roommaterial_2_changes);
1979
1966
  },
1980
1967
  i(local) {
@@ -1992,11 +1979,11 @@ function create_if_block_1$2(ctx) {
1992
1979
  };
1993
1980
  }
1994
1981
 
1995
- // (14:6) {#if room.floorType === 1}
1982
+ // (15:6) {#if room.floorType === 1}
1996
1983
  function create_if_block$2(ctx) {
1997
1984
  let roommaterial_0;
1998
1985
  let current;
1999
- roommaterial_0 = new RoomMaterial_0({ props: { path: /*room*/ ctx[4].path } });
1986
+ roommaterial_0 = new RoomMaterial_0({ props: { path: /*room*/ ctx[5].path } });
2000
1987
 
2001
1988
  return {
2002
1989
  c() {
@@ -2008,7 +1995,7 @@ function create_if_block$2(ctx) {
2008
1995
  },
2009
1996
  p(ctx, dirty) {
2010
1997
  const roommaterial_0_changes = {};
2011
- if (dirty & /*rooms*/ 1) roommaterial_0_changes.path = /*room*/ ctx[4].path;
1998
+ if (dirty & /*rooms*/ 1) roommaterial_0_changes.path = /*room*/ ctx[5].path;
2012
1999
  roommaterial_0.$set(roommaterial_0_changes);
2013
2000
  },
2014
2001
  i(local) {
@@ -2026,18 +2013,19 @@ function create_if_block$2(ctx) {
2026
2013
  };
2027
2014
  }
2028
2015
 
2029
- // (12:2) {#each rooms as room}
2030
- function create_each_block$1(ctx) {
2016
+ // (13:2) {#each rooms as room}
2017
+ function create_each_block$2(ctx) {
2031
2018
  let svg;
2032
2019
  let current_block_type_index;
2033
2020
  let if_block;
2021
+ let svg_viewBox_value;
2034
2022
  let current;
2035
2023
  const if_block_creators = [create_if_block$2, create_if_block_1$2, create_else_block];
2036
2024
  const if_blocks = [];
2037
2025
 
2038
2026
  function select_block_type(ctx, dirty) {
2039
- if (/*room*/ ctx[4].floorType === 1) return 0;
2040
- if (/*room*/ ctx[4].floorType === 0) return 1;
2027
+ if (/*room*/ ctx[5].floorType === 1) return 0;
2028
+ if (/*room*/ ctx[5].floorType === 0) return 1;
2041
2029
  return 2;
2042
2030
  }
2043
2031
 
@@ -2048,7 +2036,10 @@ function create_each_block$1(ctx) {
2048
2036
  c() {
2049
2037
  svg = internal.svg_element("svg");
2050
2038
  if_block.c();
2051
- internal.attr(svg, "class", "svelte-1b0icjc");
2039
+ internal.attr(svg, "width", "100%");
2040
+ internal.attr(svg, "height", "100%");
2041
+ internal.attr(svg, "viewBox", svg_viewBox_value = `0 0 ${/*boundingWidth*/ ctx[1]} ${/*boundingHeight*/ ctx[2]}`);
2042
+ internal.attr(svg, "class", "svelte-1d4xj70");
2052
2043
  },
2053
2044
  m(target, anchor) {
2054
2045
  internal.insert(target, svg, anchor);
@@ -2105,7 +2096,7 @@ function create_fragment$4(ctx) {
2105
2096
  let each_blocks = [];
2106
2097
 
2107
2098
  for (let i = 0; i < each_value.length; i += 1) {
2108
- each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i));
2099
+ each_blocks[i] = create_each_block$2(get_each_context$2(ctx, each_value, i));
2109
2100
  }
2110
2101
 
2111
2102
  const out = i => internal.transition_out(each_blocks[i], 1, 1, () => {
@@ -2132,18 +2123,18 @@ function create_fragment$4(ctx) {
2132
2123
  current = true;
2133
2124
  },
2134
2125
  p(ctx, [dirty]) {
2135
- if (dirty & /*rooms*/ 1) {
2126
+ if (dirty & /*boundingWidth, boundingHeight, rooms*/ 7) {
2136
2127
  each_value = /*rooms*/ ctx[0];
2137
2128
  let i;
2138
2129
 
2139
2130
  for (i = 0; i < each_value.length; i += 1) {
2140
- const child_ctx = get_each_context$1(ctx, each_value, i);
2131
+ const child_ctx = get_each_context$2(ctx, each_value, i);
2141
2132
 
2142
2133
  if (each_blocks[i]) {
2143
2134
  each_blocks[i].p(child_ctx, dirty);
2144
2135
  internal.transition_in(each_blocks[i], 1);
2145
2136
  } else {
2146
- each_blocks[i] = create_each_block$1(child_ctx);
2137
+ each_blocks[i] = create_each_block$2(child_ctx);
2147
2138
  each_blocks[i].c();
2148
2139
  internal.transition_in(each_blocks[i], 1);
2149
2140
  each_blocks[i].m(div, null);
@@ -2187,37 +2178,37 @@ function create_fragment$4(ctx) {
2187
2178
  function instance$4($$self, $$props, $$invalidate) {
2188
2179
  let rooms;
2189
2180
  let { floorIndex } = $$props;
2190
- let { pxmm } = $$props;
2191
2181
  let { floorplanData } = $$props;
2182
+ const boundingWidth = floorplanData.bounding.max.x - floorplanData.bounding.min.x;
2183
+ const boundingHeight = floorplanData.bounding.max.y - floorplanData.bounding.min.y;
2192
2184
 
2193
2185
  $$self.$$set = $$props => {
2194
- if ('floorIndex' in $$props) $$invalidate(1, floorIndex = $$props.floorIndex);
2195
- if ('pxmm' in $$props) $$invalidate(2, pxmm = $$props.pxmm);
2196
- if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
2186
+ if ('floorIndex' in $$props) $$invalidate(3, floorIndex = $$props.floorIndex);
2187
+ if ('floorplanData' in $$props) $$invalidate(4, floorplanData = $$props.floorplanData);
2197
2188
  };
2198
2189
 
2199
2190
  $$self.$$.update = () => {
2200
- if ($$self.$$.dirty & /*floorplanData, floorIndex, pxmm*/ 14) {
2191
+ if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 24) {
2201
2192
  $$invalidate(0, rooms = floorplanData.floorDatas[floorIndex].rooms.map(room => Object.assign(Object.assign({}, room), {
2202
- path: room.path.map(p => formatFloorplanPoint(p, pxmm, floorplanData.bounding))
2193
+ path: room.path.map(p => formatFloorplanPoint(p, floorplanData.bounding))
2203
2194
  })));
2204
2195
  }
2205
2196
  };
2206
2197
 
2207
- return [rooms, floorIndex, pxmm, floorplanData];
2198
+ return [rooms, boundingWidth, boundingHeight, floorIndex, floorplanData];
2208
2199
  }
2209
2200
 
2210
2201
  class RoomMaterial extends internal.SvelteComponent {
2211
2202
  constructor(options) {
2212
2203
  super();
2213
- internal.init(this, options, instance$4, create_fragment$4, internal.safe_not_equal, { floorIndex: 1, pxmm: 2, floorplanData: 3 }, add_css$4);
2204
+ internal.init(this, options, instance$4, create_fragment$4, internal.safe_not_equal, { floorIndex: 3, floorplanData: 4 }, add_css$4);
2214
2205
  }
2215
2206
  }
2216
2207
 
2217
2208
  /* src/floorplan/Components/RoomHighlight/Room.svelte generated by Svelte v3.47.0 */
2218
2209
 
2219
2210
  function add_css$3(target) {
2220
- internal.append_styles(target, "svelte-11takew", "path.svelte-11takew{opacity:0}path.svelte-11takew:hover{opacity:0.1}");
2211
+ internal.append_styles(target, "svelte-19uvvss", "path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}");
2221
2212
  }
2222
2213
 
2223
2214
  function create_fragment$3(ctx) {
@@ -2228,7 +2219,7 @@ function create_fragment$3(ctx) {
2228
2219
  path = internal.svg_element("path");
2229
2220
  internal.attr(path, "d", /*_pathD*/ ctx[0]);
2230
2221
  internal.attr(path, "fill", `#fff`);
2231
- internal.attr(path, "class", "svelte-11takew");
2222
+ internal.attr(path, "class", "svelte-19uvvss");
2232
2223
  },
2233
2224
  m(target, anchor) {
2234
2225
  internal.insert(target, path, anchor);
@@ -2243,55 +2234,52 @@ function create_fragment$3(ctx) {
2243
2234
  }
2244
2235
 
2245
2236
  function instance$3($$self, $$props, $$invalidate) {
2246
- let { pxmm } = $$props;
2247
2237
  let { room } = $$props;
2248
2238
  let { floorplanData } = $$props;
2249
2239
  const { bounding } = floorplanData;
2250
2240
 
2251
2241
  const _pathD = pathD(room.path, {
2252
2242
  needZ: true,
2253
- format: vector => formatFloorplanPoint(vector, pxmm, bounding)
2243
+ format: vector => formatFloorplanPoint(vector, bounding)
2254
2244
  });
2255
2245
 
2256
2246
  $$self.$$set = $$props => {
2257
- if ('pxmm' in $$props) $$invalidate(1, pxmm = $$props.pxmm);
2258
- if ('room' in $$props) $$invalidate(2, room = $$props.room);
2259
- if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
2247
+ if ('room' in $$props) $$invalidate(1, room = $$props.room);
2248
+ if ('floorplanData' in $$props) $$invalidate(2, floorplanData = $$props.floorplanData);
2260
2249
  };
2261
2250
 
2262
- return [_pathD, pxmm, room, floorplanData];
2251
+ return [_pathD, room, floorplanData];
2263
2252
  }
2264
2253
 
2265
2254
  class Room extends internal.SvelteComponent {
2266
2255
  constructor(options) {
2267
2256
  super();
2268
- internal.init(this, options, instance$3, create_fragment$3, internal.safe_not_equal, { pxmm: 1, room: 2, floorplanData: 3 }, add_css$3);
2257
+ internal.init(this, options, instance$3, create_fragment$3, internal.safe_not_equal, { room: 1, floorplanData: 2 }, add_css$3);
2269
2258
  }
2270
2259
  }
2271
2260
 
2272
2261
  /* src/floorplan/Components/RoomHighlight/RoomHighlight.svelte generated by Svelte v3.47.0 */
2273
2262
 
2274
2263
  function add_css$2(target) {
2275
- internal.append_styles(target, "svelte-1aais5l", ".floorplan-plugin__room-highlight.svelte-1aais5l{position:absolute;width:100%;height:100%;pointer-events:all}svg.svelte-1aais5l{width:100%;height:100%;overflow:visible}");
2264
+ internal.append_styles(target, "svelte-1kqo6e4", ".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}");
2276
2265
  }
2277
2266
 
2278
- function get_each_context(ctx, list, i) {
2267
+ function get_each_context$1(ctx, list, i) {
2279
2268
  const child_ctx = ctx.slice();
2280
- child_ctx[12] = list[i];
2269
+ child_ctx[4] = list[i];
2281
2270
  return child_ctx;
2282
2271
  }
2283
2272
 
2284
- // (41:4) {#each floorplanData.floorDatas[floorIndex].rooms as room (room.id)}
2285
- function create_each_block(key_1, ctx) {
2273
+ // (10:4) {#each floorplanData.floorDatas[floorIndex].rooms as room (room.id)}
2274
+ function create_each_block$1(key_1, ctx) {
2286
2275
  let first;
2287
2276
  let room;
2288
2277
  let current;
2289
2278
 
2290
2279
  const room_spread_levels = [
2291
2280
  {
2292
- room: /*room*/ ctx[12],
2293
- floorplanData: /*floorplanData*/ ctx[2],
2294
- pxmm: /*pxmm*/ ctx[0]
2281
+ room: /*room*/ ctx[4],
2282
+ floorplanData: /*floorplanData*/ ctx[1]
2295
2283
  }
2296
2284
  ];
2297
2285
 
@@ -2319,12 +2307,11 @@ function create_each_block(key_1, ctx) {
2319
2307
  p(new_ctx, dirty) {
2320
2308
  ctx = new_ctx;
2321
2309
 
2322
- const room_changes = (dirty & /*floorplanData, floorIndex, pxmm*/ 7)
2310
+ const room_changes = (dirty & /*floorplanData, floorIndex*/ 3)
2323
2311
  ? internal.get_spread_update(room_spread_levels, [
2324
2312
  {
2325
- room: /*room*/ ctx[12],
2326
- floorplanData: /*floorplanData*/ ctx[2],
2327
- pxmm: /*pxmm*/ ctx[0]
2313
+ room: /*room*/ ctx[4],
2314
+ floorplanData: /*floorplanData*/ ctx[1]
2328
2315
  }
2329
2316
  ])
2330
2317
  : {};
@@ -2352,17 +2339,14 @@ function create_fragment$2(ctx) {
2352
2339
  let svg;
2353
2340
  let each_blocks = [];
2354
2341
  let each_1_lookup = new Map();
2355
- let div_resize_listener;
2356
2342
  let current;
2357
- let mounted;
2358
- let dispose;
2359
- let each_value = /*floorplanData*/ ctx[2].floorDatas[/*floorIndex*/ ctx[1]].rooms;
2360
- const get_key = ctx => /*room*/ ctx[12].id;
2343
+ let each_value = /*floorplanData*/ ctx[1].floorDatas[/*floorIndex*/ ctx[0]].rooms;
2344
+ const get_key = ctx => /*room*/ ctx[4].id;
2361
2345
 
2362
2346
  for (let i = 0; i < each_value.length; i += 1) {
2363
- let child_ctx = get_each_context(ctx, each_value, i);
2347
+ let child_ctx = get_each_context$1(ctx, each_value, i);
2364
2348
  let key = get_key(child_ctx);
2365
- each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx));
2349
+ each_1_lookup.set(key, each_blocks[i] = create_each_block$1(key, child_ctx));
2366
2350
  }
2367
2351
 
2368
2352
  return {
@@ -2374,9 +2358,11 @@ function create_fragment$2(ctx) {
2374
2358
  each_blocks[i].c();
2375
2359
  }
2376
2360
 
2377
- internal.attr(svg, "class", "svelte-1aais5l");
2378
- internal.attr(div, "class", "floorplan-plugin__room-highlight svelte-1aais5l");
2379
- internal.add_render_callback(() => /*div_elementresize_handler*/ ctx[10].call(div));
2361
+ internal.attr(svg, "width", "100%");
2362
+ internal.attr(svg, "height", "100%");
2363
+ internal.attr(svg, "viewBox", `0 0 ${/*boundingWidth*/ ctx[2]} ${/*boundingHeight*/ ctx[3]}`);
2364
+ internal.attr(svg, "class", "svelte-1kqo6e4");
2365
+ internal.attr(div, "class", "floorplan-plugin__room-highlight svelte-1kqo6e4");
2380
2366
  },
2381
2367
  m(target, anchor) {
2382
2368
  internal.insert(target, div, anchor);
@@ -2386,20 +2372,13 @@ function create_fragment$2(ctx) {
2386
2372
  each_blocks[i].m(svg, null);
2387
2373
  }
2388
2374
 
2389
- /*div_binding*/ ctx[9](div);
2390
- div_resize_listener = internal.add_resize_listener(div, /*div_elementresize_handler*/ ctx[10].bind(div));
2391
2375
  current = true;
2392
-
2393
- if (!mounted) {
2394
- dispose = internal.listen(div, "click", /*handleClick*/ ctx[6]);
2395
- mounted = true;
2396
- }
2397
2376
  },
2398
2377
  p(ctx, [dirty]) {
2399
- if (dirty & /*floorplanData, floorIndex, pxmm*/ 7) {
2400
- each_value = /*floorplanData*/ ctx[2].floorDatas[/*floorIndex*/ ctx[1]].rooms;
2378
+ if (dirty & /*floorplanData, floorIndex*/ 3) {
2379
+ each_value = /*floorplanData*/ ctx[1].floorDatas[/*floorIndex*/ ctx[0]].rooms;
2401
2380
  internal.group_outros();
2402
- each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, svg, internal.outro_and_destroy_block, create_each_block, null, get_each_context);
2381
+ each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, svg, internal.outro_and_destroy_block, create_each_block$1, null, get_each_context$1);
2403
2382
  internal.check_outros();
2404
2383
  }
2405
2384
  },
@@ -2425,127 +2404,46 @@ function create_fragment$2(ctx) {
2425
2404
  for (let i = 0; i < each_blocks.length; i += 1) {
2426
2405
  each_blocks[i].d();
2427
2406
  }
2428
-
2429
- /*div_binding*/ ctx[9](null);
2430
- div_resize_listener();
2431
- mounted = false;
2432
- dispose();
2433
2407
  }
2434
2408
  };
2435
2409
  }
2436
2410
 
2437
2411
  function instance$2($$self, $$props, $$invalidate) {
2438
- let { five } = $$props;
2439
- let { pxmm } = $$props;
2440
2412
  let { floorIndex } = $$props;
2441
2413
  let { floorplanData } = $$props;
2442
- let { onRoomHeightClick } = $$props;
2443
- let clientWidth;
2444
- let clientHeight;
2445
- let highlightContainerDom;
2446
- const { observers: floorplan_observers } = floorplanData;
2447
-
2448
- const handleClick = function (e) {
2449
- if ((onRoomHeightClick === null || onRoomHeightClick === void 0
2450
- ? void 0
2451
- : onRoomHeightClick(e)) === false) return;
2452
-
2453
- // 因为 mouse.offsetX 的兼容性问题,手动计算 mouse offsetX offsetY
2454
- const boundingClientRect = highlightContainerDom.getBoundingClientRect();
2455
-
2456
- const mouseClientVector = new THREE.Vector2(e.clientX, e.clientY);
2457
- const domTopLeftVector = new THREE.Vector2(boundingClientRect.left, boundingClientRect.top);
2458
- const mouseOffsetVector = mouseClientVector.clone().sub(domTopLeftVector);
2459
-
2460
- // px 转换为 百分比
2461
- const mouseOffsetRelativeVector = new THREE.Vector2(mouseOffsetVector.x / clientWidth, mouseOffsetVector.y / clientHeight);
2462
-
2463
- const closestPoint = floorplan_observers.filter(observer => observer.floorIndex === floorIndex).sort((ob1, ob2) => {
2464
- const position1 = new THREE.Vector2(ob1.positionInImage.x, ob1.positionInImage.y);
2465
- const position2 = new THREE.Vector2(ob2.positionInImage.x, ob2.positionInImage.y);
2466
- return position1.distanceTo(mouseOffsetRelativeVector) - position2.distanceTo(mouseOffsetRelativeVector);
2467
- })[0];
2468
-
2469
- five.moveToPano(closestPoint.index);
2470
- };
2471
-
2472
- function div_binding($$value) {
2473
- internal.binding_callbacks[$$value ? 'unshift' : 'push'](() => {
2474
- highlightContainerDom = $$value;
2475
- $$invalidate(5, highlightContainerDom);
2476
- });
2477
- }
2478
-
2479
- function div_elementresize_handler() {
2480
- clientWidth = this.clientWidth;
2481
- clientHeight = this.clientHeight;
2482
- $$invalidate(3, clientWidth);
2483
- $$invalidate(4, clientHeight);
2484
- }
2414
+ const boundingWidth = floorplanData.bounding.max.x - floorplanData.bounding.min.x;
2415
+ const boundingHeight = floorplanData.bounding.max.y - floorplanData.bounding.min.y;
2485
2416
 
2486
2417
  $$self.$$set = $$props => {
2487
- if ('five' in $$props) $$invalidate(7, five = $$props.five);
2488
- if ('pxmm' in $$props) $$invalidate(0, pxmm = $$props.pxmm);
2489
- if ('floorIndex' in $$props) $$invalidate(1, floorIndex = $$props.floorIndex);
2490
- if ('floorplanData' in $$props) $$invalidate(2, floorplanData = $$props.floorplanData);
2491
- if ('onRoomHeightClick' in $$props) $$invalidate(8, onRoomHeightClick = $$props.onRoomHeightClick);
2418
+ if ('floorIndex' in $$props) $$invalidate(0, floorIndex = $$props.floorIndex);
2419
+ if ('floorplanData' in $$props) $$invalidate(1, floorplanData = $$props.floorplanData);
2492
2420
  };
2493
2421
 
2494
- return [
2495
- pxmm,
2496
- floorIndex,
2497
- floorplanData,
2498
- clientWidth,
2499
- clientHeight,
2500
- highlightContainerDom,
2501
- handleClick,
2502
- five,
2503
- onRoomHeightClick,
2504
- div_binding,
2505
- div_elementresize_handler
2506
- ];
2422
+ return [floorIndex, floorplanData, boundingWidth, boundingHeight];
2507
2423
  }
2508
2424
 
2509
2425
  class RoomHighlight extends internal.SvelteComponent {
2510
2426
  constructor(options) {
2511
2427
  super();
2512
-
2513
- internal.init(
2514
- this,
2515
- options,
2516
- instance$2,
2517
- create_fragment$2,
2518
- internal.safe_not_equal,
2519
- {
2520
- five: 7,
2521
- pxmm: 0,
2522
- floorIndex: 1,
2523
- floorplanData: 2,
2524
- onRoomHeightClick: 8
2525
- },
2526
- add_css$2
2527
- );
2428
+ internal.init(this, options, instance$2, create_fragment$2, internal.safe_not_equal, { floorIndex: 0, floorplanData: 1 }, add_css$2);
2528
2429
  }
2529
2430
  }
2530
2431
 
2531
- /* src/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte generated by Svelte v3.47.0 */
2432
+ /* src/floorplan/Components/CurrentFloor.svelte generated by Svelte v3.47.0 */
2532
2433
 
2533
2434
  function add_css$1(target) {
2534
- internal.append_styles(target, "svelte-3pdgs4", ".floorplan-current-floor.svelte-3pdgs4{position:relative;width:100%;height:100%}");
2435
+ internal.append_styles(target, "svelte-bl8zrz", ".floorplan-plugin__floor.svelte-bl8zrz{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-bl8zrz{opacity:1;pointer-events:auto}");
2535
2436
  }
2536
2437
 
2537
- // (19:2) {#if hoverEnable}
2438
+ // (17:2) {#if hoverEnable}
2538
2439
  function create_if_block_2(ctx) {
2539
2440
  let roomhighlight;
2540
2441
  let current;
2541
2442
 
2542
2443
  const roomhighlight_spread_levels = [
2543
2444
  {
2544
- five: /*five*/ ctx[1],
2545
- pxmm: /*pxmm*/ ctx[0],
2546
- floorIndex: /*floorIndex*/ ctx[2],
2547
- floorplanData: /*floorplanData*/ ctx[6],
2548
- onRoomHeightClick: /*onRoomHeightClick*/ ctx[7]
2445
+ floorIndex: /*floorIndex*/ ctx[1],
2446
+ floorplanData: /*floorplanData*/ ctx[5]
2549
2447
  }
2550
2448
  ];
2551
2449
 
@@ -2566,14 +2464,11 @@ function create_if_block_2(ctx) {
2566
2464
  current = true;
2567
2465
  },
2568
2466
  p(ctx, dirty) {
2569
- const roomhighlight_changes = (dirty & /*five, pxmm, floorIndex, floorplanData, onRoomHeightClick*/ 199)
2467
+ const roomhighlight_changes = (dirty & /*floorIndex, floorplanData*/ 34)
2570
2468
  ? internal.get_spread_update(roomhighlight_spread_levels, [
2571
2469
  {
2572
- five: /*five*/ ctx[1],
2573
- pxmm: /*pxmm*/ ctx[0],
2574
- floorIndex: /*floorIndex*/ ctx[2],
2575
- floorplanData: /*floorplanData*/ ctx[6],
2576
- onRoomHeightClick: /*onRoomHeightClick*/ ctx[7]
2470
+ floorIndex: /*floorIndex*/ ctx[1],
2471
+ floorplanData: /*floorplanData*/ ctx[5]
2577
2472
  }
2578
2473
  ])
2579
2474
  : {};
@@ -2595,16 +2490,16 @@ function create_if_block_2(ctx) {
2595
2490
  };
2596
2491
  }
2597
2492
 
2598
- // (23:2) {#if roomLabelsEnable}
2493
+ // (21:2) {#if roomLabelsEnable}
2599
2494
  function create_if_block_1$1(ctx) {
2600
2495
  let roomlabels;
2601
2496
  let current;
2602
2497
 
2603
2498
  const roomlabels_spread_levels = [
2604
2499
  {
2605
- floorplanData: /*floorplanData*/ ctx[6],
2606
- floorIndex: /*floorIndex*/ ctx[2],
2607
- getLabelElement: /*getLabelElement*/ ctx[8]
2500
+ floorplanData: /*floorplanData*/ ctx[5],
2501
+ floorIndex: /*floorIndex*/ ctx[1],
2502
+ getLabelElement: /*getLabelElement*/ ctx[6]
2608
2503
  }
2609
2504
  ];
2610
2505
 
@@ -2625,12 +2520,12 @@ function create_if_block_1$1(ctx) {
2625
2520
  current = true;
2626
2521
  },
2627
2522
  p(ctx, dirty) {
2628
- const roomlabels_changes = (dirty & /*floorplanData, floorIndex, getLabelElement*/ 324)
2523
+ const roomlabels_changes = (dirty & /*floorplanData, floorIndex, getLabelElement*/ 98)
2629
2524
  ? internal.get_spread_update(roomlabels_spread_levels, [
2630
2525
  {
2631
- floorplanData: /*floorplanData*/ ctx[6],
2632
- floorIndex: /*floorIndex*/ ctx[2],
2633
- getLabelElement: /*getLabelElement*/ ctx[8]
2526
+ floorplanData: /*floorplanData*/ ctx[5],
2527
+ floorIndex: /*floorIndex*/ ctx[1],
2528
+ getLabelElement: /*getLabelElement*/ ctx[6]
2634
2529
  }
2635
2530
  ])
2636
2531
  : {};
@@ -2652,16 +2547,15 @@ function create_if_block_1$1(ctx) {
2652
2547
  };
2653
2548
  }
2654
2549
 
2655
- // (26:2) {#if ruleLabelsEnable}
2550
+ // (24:2) {#if ruleLabelsEnable}
2656
2551
  function create_if_block$1(ctx) {
2657
2552
  let rulelabels;
2658
2553
  let current;
2659
2554
 
2660
2555
  const rulelabels_spread_levels = [
2661
2556
  {
2662
- floorplanData: /*floorplanData*/ ctx[6],
2663
- floorIndex: /*floorIndex*/ ctx[2],
2664
- pxmm: /*pxmm*/ ctx[0]
2557
+ floorplanData: /*floorplanData*/ ctx[5],
2558
+ floorIndex: /*floorIndex*/ ctx[1]
2665
2559
  }
2666
2560
  ];
2667
2561
 
@@ -2682,12 +2576,11 @@ function create_if_block$1(ctx) {
2682
2576
  current = true;
2683
2577
  },
2684
2578
  p(ctx, dirty) {
2685
- const rulelabels_changes = (dirty & /*floorplanData, floorIndex, pxmm*/ 69)
2579
+ const rulelabels_changes = (dirty & /*floorplanData, floorIndex*/ 34)
2686
2580
  ? internal.get_spread_update(rulelabels_spread_levels, [
2687
2581
  {
2688
- floorplanData: /*floorplanData*/ ctx[6],
2689
- floorIndex: /*floorIndex*/ ctx[2],
2690
- pxmm: /*pxmm*/ ctx[0]
2582
+ floorplanData: /*floorplanData*/ ctx[5],
2583
+ floorIndex: /*floorIndex*/ ctx[1]
2691
2584
  }
2692
2585
  ])
2693
2586
  : {};
@@ -2717,13 +2610,13 @@ function create_fragment$1(ctx) {
2717
2610
  let baseimage;
2718
2611
  let t2;
2719
2612
  let t3;
2613
+ let div_class_value;
2720
2614
  let current;
2721
2615
 
2722
2616
  const roommaterial_spread_levels = [
2723
2617
  {
2724
- floorIndex: /*floorIndex*/ ctx[2],
2725
- floorplanData: /*floorplanData*/ ctx[6],
2726
- pxmm: /*pxmm*/ ctx[0]
2618
+ floorIndex: /*floorIndex*/ ctx[1],
2619
+ floorplanData: /*floorplanData*/ ctx[5]
2727
2620
  }
2728
2621
  ];
2729
2622
 
@@ -2734,12 +2627,12 @@ function create_fragment$1(ctx) {
2734
2627
  }
2735
2628
 
2736
2629
  roommaterial = new RoomMaterial({ props: roommaterial_props });
2737
- let if_block0 = /*hoverEnable*/ ctx[3] && create_if_block_2(ctx);
2630
+ let if_block0 = /*hoverEnable*/ ctx[2] && create_if_block_2(ctx);
2738
2631
 
2739
2632
  const baseimage_spread_levels = [
2740
2633
  {
2741
- floorplanData: /*floorplanData*/ ctx[6],
2742
- floorIndex: /*floorIndex*/ ctx[2]
2634
+ floorplanData: /*floorplanData*/ ctx[5],
2635
+ floorIndex: /*floorIndex*/ ctx[1]
2743
2636
  }
2744
2637
  ];
2745
2638
 
@@ -2750,8 +2643,8 @@ function create_fragment$1(ctx) {
2750
2643
  }
2751
2644
 
2752
2645
  baseimage = new BaseImage({ props: baseimage_props });
2753
- let if_block1 = /*roomLabelsEnable*/ ctx[4] && create_if_block_1$1(ctx);
2754
- let if_block2 = /*ruleLabelsEnable*/ ctx[5] && create_if_block$1(ctx);
2646
+ let if_block1 = /*roomLabelsEnable*/ ctx[3] && create_if_block_1$1(ctx);
2647
+ let if_block2 = /*ruleLabelsEnable*/ ctx[4] && create_if_block$1(ctx);
2755
2648
 
2756
2649
  return {
2757
2650
  c() {
@@ -2765,7 +2658,10 @@ function create_fragment$1(ctx) {
2765
2658
  if (if_block1) if_block1.c();
2766
2659
  t3 = internal.space();
2767
2660
  if (if_block2) if_block2.c();
2768
- internal.attr(div, "class", "floorplan-current-floor svelte-3pdgs4");
2661
+
2662
+ internal.attr(div, "class", div_class_value = "" + (internal.null_to_empty(`floorplan-plugin__floor${/*isCurrent*/ ctx[0]
2663
+ ? ' floorplan-plugin__floor--is-current'
2664
+ : ''}`) + " svelte-bl8zrz"));
2769
2665
  },
2770
2666
  m(target, anchor) {
2771
2667
  internal.insert(target, div, anchor);
@@ -2781,23 +2677,22 @@ function create_fragment$1(ctx) {
2781
2677
  current = true;
2782
2678
  },
2783
2679
  p(ctx, [dirty]) {
2784
- const roommaterial_changes = (dirty & /*floorIndex, floorplanData, pxmm*/ 69)
2680
+ const roommaterial_changes = (dirty & /*floorIndex, floorplanData*/ 34)
2785
2681
  ? internal.get_spread_update(roommaterial_spread_levels, [
2786
2682
  {
2787
- floorIndex: /*floorIndex*/ ctx[2],
2788
- floorplanData: /*floorplanData*/ ctx[6],
2789
- pxmm: /*pxmm*/ ctx[0]
2683
+ floorIndex: /*floorIndex*/ ctx[1],
2684
+ floorplanData: /*floorplanData*/ ctx[5]
2790
2685
  }
2791
2686
  ])
2792
2687
  : {};
2793
2688
 
2794
2689
  roommaterial.$set(roommaterial_changes);
2795
2690
 
2796
- if (/*hoverEnable*/ ctx[3]) {
2691
+ if (/*hoverEnable*/ ctx[2]) {
2797
2692
  if (if_block0) {
2798
2693
  if_block0.p(ctx, dirty);
2799
2694
 
2800
- if (dirty & /*hoverEnable*/ 8) {
2695
+ if (dirty & /*hoverEnable*/ 4) {
2801
2696
  internal.transition_in(if_block0, 1);
2802
2697
  }
2803
2698
  } else {
@@ -2816,22 +2711,22 @@ function create_fragment$1(ctx) {
2816
2711
  internal.check_outros();
2817
2712
  }
2818
2713
 
2819
- const baseimage_changes = (dirty & /*floorplanData, floorIndex*/ 68)
2714
+ const baseimage_changes = (dirty & /*floorplanData, floorIndex*/ 34)
2820
2715
  ? internal.get_spread_update(baseimage_spread_levels, [
2821
2716
  {
2822
- floorplanData: /*floorplanData*/ ctx[6],
2823
- floorIndex: /*floorIndex*/ ctx[2]
2717
+ floorplanData: /*floorplanData*/ ctx[5],
2718
+ floorIndex: /*floorIndex*/ ctx[1]
2824
2719
  }
2825
2720
  ])
2826
2721
  : {};
2827
2722
 
2828
2723
  baseimage.$set(baseimage_changes);
2829
2724
 
2830
- if (/*roomLabelsEnable*/ ctx[4]) {
2725
+ if (/*roomLabelsEnable*/ ctx[3]) {
2831
2726
  if (if_block1) {
2832
2727
  if_block1.p(ctx, dirty);
2833
2728
 
2834
- if (dirty & /*roomLabelsEnable*/ 16) {
2729
+ if (dirty & /*roomLabelsEnable*/ 8) {
2835
2730
  internal.transition_in(if_block1, 1);
2836
2731
  }
2837
2732
  } else {
@@ -2850,11 +2745,11 @@ function create_fragment$1(ctx) {
2850
2745
  internal.check_outros();
2851
2746
  }
2852
2747
 
2853
- if (/*ruleLabelsEnable*/ ctx[5]) {
2748
+ if (/*ruleLabelsEnable*/ ctx[4]) {
2854
2749
  if (if_block2) {
2855
2750
  if_block2.p(ctx, dirty);
2856
2751
 
2857
- if (dirty & /*ruleLabelsEnable*/ 32) {
2752
+ if (dirty & /*ruleLabelsEnable*/ 16) {
2858
2753
  internal.transition_in(if_block2, 1);
2859
2754
  }
2860
2755
  } else {
@@ -2872,6 +2767,12 @@ function create_fragment$1(ctx) {
2872
2767
 
2873
2768
  internal.check_outros();
2874
2769
  }
2770
+
2771
+ if (!current || dirty & /*isCurrent*/ 1 && div_class_value !== (div_class_value = "" + (internal.null_to_empty(`floorplan-plugin__floor${/*isCurrent*/ ctx[0]
2772
+ ? ' floorplan-plugin__floor--is-current'
2773
+ : ''}`) + " svelte-bl8zrz"))) {
2774
+ internal.attr(div, "class", div_class_value);
2775
+ }
2875
2776
  },
2876
2777
  i(local) {
2877
2778
  if (current) return;
@@ -2902,37 +2803,31 @@ function create_fragment$1(ctx) {
2902
2803
  }
2903
2804
 
2904
2805
  function instance$1($$self, $$props, $$invalidate) {
2905
- let { pxmm } = $$props;
2906
- let { five } = $$props;
2806
+ let { isCurrent } = $$props;
2907
2807
  let { floorIndex } = $$props;
2908
2808
  let { hoverEnable } = $$props;
2909
2809
  let { roomLabelsEnable } = $$props;
2910
2810
  let { ruleLabelsEnable } = $$props;
2911
2811
  let { floorplanData } = $$props;
2912
- let { onRoomHeightClick } = $$props;
2913
2812
  let { getLabelElement } = $$props;
2914
2813
 
2915
2814
  $$self.$$set = $$props => {
2916
- if ('pxmm' in $$props) $$invalidate(0, pxmm = $$props.pxmm);
2917
- if ('five' in $$props) $$invalidate(1, five = $$props.five);
2918
- if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
2919
- if ('hoverEnable' in $$props) $$invalidate(3, hoverEnable = $$props.hoverEnable);
2920
- if ('roomLabelsEnable' in $$props) $$invalidate(4, roomLabelsEnable = $$props.roomLabelsEnable);
2921
- if ('ruleLabelsEnable' in $$props) $$invalidate(5, ruleLabelsEnable = $$props.ruleLabelsEnable);
2922
- if ('floorplanData' in $$props) $$invalidate(6, floorplanData = $$props.floorplanData);
2923
- if ('onRoomHeightClick' in $$props) $$invalidate(7, onRoomHeightClick = $$props.onRoomHeightClick);
2924
- if ('getLabelElement' in $$props) $$invalidate(8, getLabelElement = $$props.getLabelElement);
2815
+ if ('isCurrent' in $$props) $$invalidate(0, isCurrent = $$props.isCurrent);
2816
+ if ('floorIndex' in $$props) $$invalidate(1, floorIndex = $$props.floorIndex);
2817
+ if ('hoverEnable' in $$props) $$invalidate(2, hoverEnable = $$props.hoverEnable);
2818
+ if ('roomLabelsEnable' in $$props) $$invalidate(3, roomLabelsEnable = $$props.roomLabelsEnable);
2819
+ if ('ruleLabelsEnable' in $$props) $$invalidate(4, ruleLabelsEnable = $$props.ruleLabelsEnable);
2820
+ if ('floorplanData' in $$props) $$invalidate(5, floorplanData = $$props.floorplanData);
2821
+ if ('getLabelElement' in $$props) $$invalidate(6, getLabelElement = $$props.getLabelElement);
2925
2822
  };
2926
2823
 
2927
2824
  return [
2928
- pxmm,
2929
- five,
2825
+ isCurrent,
2930
2826
  floorIndex,
2931
2827
  hoverEnable,
2932
2828
  roomLabelsEnable,
2933
2829
  ruleLabelsEnable,
2934
2830
  floorplanData,
2935
- onRoomHeightClick,
2936
2831
  getLabelElement
2937
2832
  ];
2938
2833
  }
@@ -2948,65 +2843,56 @@ class CurrentFloor extends internal.SvelteComponent {
2948
2843
  create_fragment$1,
2949
2844
  internal.safe_not_equal,
2950
2845
  {
2951
- pxmm: 0,
2952
- five: 1,
2953
- floorIndex: 2,
2954
- hoverEnable: 3,
2955
- roomLabelsEnable: 4,
2956
- ruleLabelsEnable: 5,
2957
- floorplanData: 6,
2958
- onRoomHeightClick: 7,
2959
- getLabelElement: 8
2846
+ isCurrent: 0,
2847
+ floorIndex: 1,
2848
+ hoverEnable: 2,
2849
+ roomLabelsEnable: 3,
2850
+ ruleLabelsEnable: 4,
2851
+ floorplanData: 5,
2852
+ getLabelElement: 6
2960
2853
  },
2961
2854
  add_css$1
2962
2855
  );
2963
2856
  }
2964
2857
  }
2965
2858
 
2966
- /* src/floorplan/ModelFloorplanPlugin/Components/Main.svelte generated by Svelte v3.47.0 */
2859
+ /* src/floorplan/Components/Main.svelte generated by Svelte v3.47.0 */
2967
2860
 
2968
2861
  function add_css(target) {
2969
- internal.append_styles(target, "svelte-177x2q7", ".floorplan-main.svelte-177x2q7{width:100%;height:100%}");
2862
+ internal.append_styles(target, "svelte-q5wdnn", ".floorplan-main.svelte-q5wdnn{width:100%;height:100%}");
2863
+ }
2864
+
2865
+ function get_each_context(ctx, list, i) {
2866
+ const child_ctx = ctx.slice();
2867
+ child_ctx[13] = list[i];
2868
+ return child_ctx;
2970
2869
  }
2971
2870
 
2972
- // (24:0) {#if visible}
2871
+ // (21:0) {#if visible}
2973
2872
  function create_if_block(ctx) {
2974
2873
  let div;
2975
- let currentfloor;
2976
2874
  let t0;
2977
2875
  let camera;
2978
2876
  let t1;
2979
2877
  let div_intro;
2980
2878
  let current;
2879
+ let each_value = /*floorplanData*/ ctx[9].floorDatas;
2880
+ let each_blocks = [];
2981
2881
 
2982
- const currentfloor_spread_levels = [
2983
- {
2984
- five: /*five*/ ctx[2],
2985
- pxmm: /*pxmm*/ ctx[1],
2986
- floorIndex: /*floorIndex*/ ctx[6],
2987
- hoverEnable: /*hoverEnable*/ ctx[7],
2988
- floorplanData: /*floorplanData*/ ctx[11],
2989
- getLabelElement: /*getLabelElement*/ ctx[15],
2990
- roomLabelsEnable: /*roomLabelsEnable*/ ctx[9],
2991
- ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[10],
2992
- onRoomHeightClick: /*onRoomHeightClick*/ ctx[14]
2993
- }
2994
- ];
2995
-
2996
- let currentfloor_props = {};
2997
-
2998
- for (let i = 0; i < currentfloor_spread_levels.length; i += 1) {
2999
- currentfloor_props = internal.assign(currentfloor_props, currentfloor_spread_levels[i]);
2882
+ for (let i = 0; i < each_value.length; i += 1) {
2883
+ each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
3000
2884
  }
3001
2885
 
3002
- currentfloor = new CurrentFloor({ props: currentfloor_props });
2886
+ const out = i => internal.transition_out(each_blocks[i], 1, 1, () => {
2887
+ each_blocks[i] = null;
2888
+ });
3003
2889
 
3004
2890
  const camera_spread_levels = [
3005
2891
  {
3006
- panoIndex: /*panoIndex*/ ctx[5],
3007
- floorplanData: /*floorplanData*/ ctx[11],
3008
- lastPanoramaLongitude: /*lastPanoramaLongitude*/ ctx[12],
3009
- cameraImageUrl: /*cameraImageUrl*/ ctx[13]
2892
+ panoIndex: /*panoIndex*/ ctx[3],
2893
+ floorplanData: /*floorplanData*/ ctx[9],
2894
+ lastPanoramaLongitude: /*lastPanoramaLongitude*/ ctx[10],
2895
+ cameraImageUrl: /*cameraImageUrl*/ ctx[11]
3010
2896
  }
3011
2897
  ];
3012
2898
 
@@ -3017,21 +2903,29 @@ function create_if_block(ctx) {
3017
2903
  }
3018
2904
 
3019
2905
  camera = new Camera({ props: camera_props });
3020
- let if_block = /*compassEnable*/ ctx[8] && create_if_block_1(ctx);
2906
+ let if_block = /*compassEnable*/ ctx[6] && create_if_block_1(ctx);
3021
2907
 
3022
2908
  return {
3023
2909
  c() {
3024
2910
  div = internal.element("div");
3025
- internal.create_component(currentfloor.$$.fragment);
2911
+
2912
+ for (let i = 0; i < each_blocks.length; i += 1) {
2913
+ each_blocks[i].c();
2914
+ }
2915
+
3026
2916
  t0 = internal.space();
3027
2917
  internal.create_component(camera.$$.fragment);
3028
2918
  t1 = internal.space();
3029
2919
  if (if_block) if_block.c();
3030
- internal.attr(div, "class", "floorplan-main svelte-177x2q7");
2920
+ internal.attr(div, "class", "floorplan-main svelte-q5wdnn");
3031
2921
  },
3032
2922
  m(target, anchor) {
3033
2923
  internal.insert(target, div, anchor);
3034
- internal.mount_component(currentfloor, div, null);
2924
+
2925
+ for (let i = 0; i < each_blocks.length; i += 1) {
2926
+ each_blocks[i].m(div, null);
2927
+ }
2928
+
3035
2929
  internal.append(div, t0);
3036
2930
  internal.mount_component(camera, div, null);
3037
2931
  internal.append(div, t1);
@@ -3041,42 +2935,51 @@ function create_if_block(ctx) {
3041
2935
  p(new_ctx, dirty) {
3042
2936
  ctx = new_ctx;
3043
2937
 
3044
- const currentfloor_changes = (dirty & /*five, pxmm, floorIndex, hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable, onRoomHeightClick*/ 52934)
3045
- ? internal.get_spread_update(currentfloor_spread_levels, [
3046
- {
3047
- five: /*five*/ ctx[2],
3048
- pxmm: /*pxmm*/ ctx[1],
3049
- floorIndex: /*floorIndex*/ ctx[6],
3050
- hoverEnable: /*hoverEnable*/ ctx[7],
3051
- floorplanData: /*floorplanData*/ ctx[11],
3052
- getLabelElement: /*getLabelElement*/ ctx[15],
3053
- roomLabelsEnable: /*roomLabelsEnable*/ ctx[9],
3054
- ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[10],
3055
- onRoomHeightClick: /*onRoomHeightClick*/ ctx[14]
2938
+ if (dirty & /*hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable, floorIndex*/ 5040) {
2939
+ each_value = /*floorplanData*/ ctx[9].floorDatas;
2940
+ let i;
2941
+
2942
+ for (i = 0; i < each_value.length; i += 1) {
2943
+ const child_ctx = get_each_context(ctx, each_value, i);
2944
+
2945
+ if (each_blocks[i]) {
2946
+ each_blocks[i].p(child_ctx, dirty);
2947
+ internal.transition_in(each_blocks[i], 1);
2948
+ } else {
2949
+ each_blocks[i] = create_each_block(child_ctx);
2950
+ each_blocks[i].c();
2951
+ internal.transition_in(each_blocks[i], 1);
2952
+ each_blocks[i].m(div, t0);
3056
2953
  }
3057
- ])
3058
- : {};
2954
+ }
3059
2955
 
3060
- currentfloor.$set(currentfloor_changes);
2956
+ internal.group_outros();
2957
+
2958
+ for (i = each_value.length; i < each_blocks.length; i += 1) {
2959
+ out(i);
2960
+ }
2961
+
2962
+ internal.check_outros();
2963
+ }
3061
2964
 
3062
- const camera_changes = (dirty & /*panoIndex, floorplanData, lastPanoramaLongitude, cameraImageUrl*/ 14368)
2965
+ const camera_changes = (dirty & /*panoIndex, floorplanData, lastPanoramaLongitude, cameraImageUrl*/ 3592)
3063
2966
  ? internal.get_spread_update(camera_spread_levels, [
3064
2967
  {
3065
- panoIndex: /*panoIndex*/ ctx[5],
3066
- floorplanData: /*floorplanData*/ ctx[11],
3067
- lastPanoramaLongitude: /*lastPanoramaLongitude*/ ctx[12],
3068
- cameraImageUrl: /*cameraImageUrl*/ ctx[13]
2968
+ panoIndex: /*panoIndex*/ ctx[3],
2969
+ floorplanData: /*floorplanData*/ ctx[9],
2970
+ lastPanoramaLongitude: /*lastPanoramaLongitude*/ ctx[10],
2971
+ cameraImageUrl: /*cameraImageUrl*/ ctx[11]
3069
2972
  }
3070
2973
  ])
3071
2974
  : {};
3072
2975
 
3073
2976
  camera.$set(camera_changes);
3074
2977
 
3075
- if (/*compassEnable*/ ctx[8]) {
2978
+ if (/*compassEnable*/ ctx[6]) {
3076
2979
  if (if_block) {
3077
2980
  if_block.p(ctx, dirty);
3078
2981
 
3079
- if (dirty & /*compassEnable*/ 256) {
2982
+ if (dirty & /*compassEnable*/ 64) {
3080
2983
  internal.transition_in(if_block, 1);
3081
2984
  }
3082
2985
  } else {
@@ -3097,14 +3000,18 @@ function create_if_block(ctx) {
3097
3000
  },
3098
3001
  i(local) {
3099
3002
  if (current) return;
3100
- internal.transition_in(currentfloor.$$.fragment, local);
3003
+
3004
+ for (let i = 0; i < each_value.length; i += 1) {
3005
+ internal.transition_in(each_blocks[i]);
3006
+ }
3007
+
3101
3008
  internal.transition_in(camera.$$.fragment, local);
3102
3009
  internal.transition_in(if_block);
3103
3010
 
3104
3011
  if (!div_intro) {
3105
3012
  internal.add_render_callback(() => {
3106
3013
  div_intro = internal.create_in_transition(div, transition.fade, {
3107
- duration: /*duration*/ ctx[3],
3014
+ duration: /*duration*/ ctx[0],
3108
3015
  easing: easing.linear
3109
3016
  });
3110
3017
 
@@ -3115,29 +3022,107 @@ function create_if_block(ctx) {
3115
3022
  current = true;
3116
3023
  },
3117
3024
  o(local) {
3118
- internal.transition_out(currentfloor.$$.fragment, local);
3025
+ each_blocks = each_blocks.filter(Boolean);
3026
+
3027
+ for (let i = 0; i < each_blocks.length; i += 1) {
3028
+ internal.transition_out(each_blocks[i]);
3029
+ }
3030
+
3119
3031
  internal.transition_out(camera.$$.fragment, local);
3120
3032
  internal.transition_out(if_block);
3121
3033
  current = false;
3122
3034
  },
3123
3035
  d(detaching) {
3124
3036
  if (detaching) internal.detach(div);
3125
- internal.destroy_component(currentfloor);
3037
+ internal.destroy_each(each_blocks, detaching);
3126
3038
  internal.destroy_component(camera);
3127
3039
  if (if_block) if_block.d();
3128
3040
  }
3129
3041
  };
3130
3042
  }
3131
3043
 
3132
- // (40:4) {#if compassEnable}
3044
+ // (23:4) {#each floorplanData.floorDatas as floorData}
3045
+ function create_each_block(ctx) {
3046
+ let currentfloor;
3047
+ let current;
3048
+
3049
+ const currentfloor_spread_levels = [
3050
+ {
3051
+ hoverEnable: /*hoverEnable*/ ctx[5],
3052
+ floorplanData: /*floorplanData*/ ctx[9],
3053
+ getLabelElement: /*getLabelElement*/ ctx[12],
3054
+ roomLabelsEnable: /*roomLabelsEnable*/ ctx[7],
3055
+ ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[8]
3056
+ },
3057
+ {
3058
+ floorIndex: /*floorData*/ ctx[13].floorIndex
3059
+ },
3060
+ {
3061
+ isCurrent: /*floorData*/ ctx[13].floorIndex === /*floorIndex*/ ctx[4]
3062
+ }
3063
+ ];
3064
+
3065
+ let currentfloor_props = {};
3066
+
3067
+ for (let i = 0; i < currentfloor_spread_levels.length; i += 1) {
3068
+ currentfloor_props = internal.assign(currentfloor_props, currentfloor_spread_levels[i]);
3069
+ }
3070
+
3071
+ currentfloor = new CurrentFloor({ props: currentfloor_props });
3072
+
3073
+ return {
3074
+ c() {
3075
+ internal.create_component(currentfloor.$$.fragment);
3076
+ },
3077
+ m(target, anchor) {
3078
+ internal.mount_component(currentfloor, target, anchor);
3079
+ current = true;
3080
+ },
3081
+ p(ctx, dirty) {
3082
+ const currentfloor_changes = (dirty & /*hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable, floorIndex*/ 5040)
3083
+ ? internal.get_spread_update(currentfloor_spread_levels, [
3084
+ dirty & /*hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable*/ 5024 && {
3085
+ hoverEnable: /*hoverEnable*/ ctx[5],
3086
+ floorplanData: /*floorplanData*/ ctx[9],
3087
+ getLabelElement: /*getLabelElement*/ ctx[12],
3088
+ roomLabelsEnable: /*roomLabelsEnable*/ ctx[7],
3089
+ ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[8]
3090
+ },
3091
+ dirty & /*floorplanData*/ 512 && {
3092
+ floorIndex: /*floorData*/ ctx[13].floorIndex
3093
+ },
3094
+ dirty & /*floorplanData, floorIndex*/ 528 && {
3095
+ isCurrent: /*floorData*/ ctx[13].floorIndex === /*floorIndex*/ ctx[4]
3096
+ }
3097
+ ])
3098
+ : {};
3099
+
3100
+ currentfloor.$set(currentfloor_changes);
3101
+ },
3102
+ i(local) {
3103
+ if (current) return;
3104
+ internal.transition_in(currentfloor.$$.fragment, local);
3105
+ current = true;
3106
+ },
3107
+ o(local) {
3108
+ internal.transition_out(currentfloor.$$.fragment, local);
3109
+ current = false;
3110
+ },
3111
+ d(detaching) {
3112
+ internal.destroy_component(currentfloor, detaching);
3113
+ }
3114
+ };
3115
+ }
3116
+
3117
+ // (37:4) {#if compassEnable}
3133
3118
  function create_if_block_1(ctx) {
3134
3119
  let compass;
3135
3120
  let current;
3136
3121
 
3137
3122
  compass = new Compass({
3138
3123
  props: {
3139
- floorplanData: /*floorplanData*/ ctx[11],
3140
- northDesc: /*northDesc*/ ctx[0]
3124
+ floorplanData: /*floorplanData*/ ctx[9],
3125
+ northDesc: /*northDesc*/ ctx[2]
3141
3126
  }
3142
3127
  });
3143
3128
 
@@ -3151,8 +3136,8 @@ function create_if_block_1(ctx) {
3151
3136
  },
3152
3137
  p(ctx, dirty) {
3153
3138
  const compass_changes = {};
3154
- if (dirty & /*floorplanData*/ 2048) compass_changes.floorplanData = /*floorplanData*/ ctx[11];
3155
- if (dirty & /*northDesc*/ 1) compass_changes.northDesc = /*northDesc*/ ctx[0];
3139
+ if (dirty & /*floorplanData*/ 512) compass_changes.floorplanData = /*floorplanData*/ ctx[9];
3140
+ if (dirty & /*northDesc*/ 4) compass_changes.northDesc = /*northDesc*/ ctx[2];
3156
3141
  compass.$set(compass_changes);
3157
3142
  },
3158
3143
  i(local) {
@@ -3173,7 +3158,7 @@ function create_if_block_1(ctx) {
3173
3158
  function create_fragment(ctx) {
3174
3159
  let if_block_anchor;
3175
3160
  let current;
3176
- let if_block = /*visible*/ ctx[4] && create_if_block(ctx);
3161
+ let if_block = /*visible*/ ctx[1] && create_if_block(ctx);
3177
3162
 
3178
3163
  return {
3179
3164
  c() {
@@ -3186,11 +3171,11 @@ function create_fragment(ctx) {
3186
3171
  current = true;
3187
3172
  },
3188
3173
  p(ctx, [dirty]) {
3189
- if (/*visible*/ ctx[4]) {
3174
+ if (/*visible*/ ctx[1]) {
3190
3175
  if (if_block) {
3191
3176
  if_block.p(ctx, dirty);
3192
3177
 
3193
- if (dirty & /*visible*/ 16) {
3178
+ if (dirty & /*visible*/ 2) {
3194
3179
  internal.transition_in(if_block, 1);
3195
3180
  }
3196
3181
  } else {
@@ -3226,11 +3211,9 @@ function create_fragment(ctx) {
3226
3211
  }
3227
3212
 
3228
3213
  function instance($$self, $$props, $$invalidate) {
3229
- let { northDesc } = $$props;
3230
- let { pxmm } = $$props;
3231
- let { five } = $$props;
3232
3214
  let { duration = 0 } = $$props;
3233
3215
  let { visible } = $$props;
3216
+ let { northDesc } = $$props;
3234
3217
  let { panoIndex } = $$props;
3235
3218
  let { floorIndex } = $$props;
3236
3219
  let { hoverEnable } = $$props;
@@ -3240,34 +3223,28 @@ function instance($$self, $$props, $$invalidate) {
3240
3223
  let { floorplanData } = $$props;
3241
3224
  let { lastPanoramaLongitude } = $$props;
3242
3225
  let { cameraImageUrl } = $$props;
3243
- let { onRoomHeightClick } = $$props;
3244
3226
  let { getLabelElement } = $$props;
3245
3227
 
3246
3228
  $$self.$$set = $$props => {
3247
- if ('northDesc' in $$props) $$invalidate(0, northDesc = $$props.northDesc);
3248
- if ('pxmm' in $$props) $$invalidate(1, pxmm = $$props.pxmm);
3249
- if ('five' in $$props) $$invalidate(2, five = $$props.five);
3250
- if ('duration' in $$props) $$invalidate(3, duration = $$props.duration);
3251
- if ('visible' in $$props) $$invalidate(4, visible = $$props.visible);
3252
- if ('panoIndex' in $$props) $$invalidate(5, panoIndex = $$props.panoIndex);
3253
- if ('floorIndex' in $$props) $$invalidate(6, floorIndex = $$props.floorIndex);
3254
- if ('hoverEnable' in $$props) $$invalidate(7, hoverEnable = $$props.hoverEnable);
3255
- if ('compassEnable' in $$props) $$invalidate(8, compassEnable = $$props.compassEnable);
3256
- if ('roomLabelsEnable' in $$props) $$invalidate(9, roomLabelsEnable = $$props.roomLabelsEnable);
3257
- if ('ruleLabelsEnable' in $$props) $$invalidate(10, ruleLabelsEnable = $$props.ruleLabelsEnable);
3258
- if ('floorplanData' in $$props) $$invalidate(11, floorplanData = $$props.floorplanData);
3259
- if ('lastPanoramaLongitude' in $$props) $$invalidate(12, lastPanoramaLongitude = $$props.lastPanoramaLongitude);
3260
- if ('cameraImageUrl' in $$props) $$invalidate(13, cameraImageUrl = $$props.cameraImageUrl);
3261
- if ('onRoomHeightClick' in $$props) $$invalidate(14, onRoomHeightClick = $$props.onRoomHeightClick);
3262
- if ('getLabelElement' in $$props) $$invalidate(15, getLabelElement = $$props.getLabelElement);
3229
+ if ('duration' in $$props) $$invalidate(0, duration = $$props.duration);
3230
+ if ('visible' in $$props) $$invalidate(1, visible = $$props.visible);
3231
+ if ('northDesc' in $$props) $$invalidate(2, northDesc = $$props.northDesc);
3232
+ if ('panoIndex' in $$props) $$invalidate(3, panoIndex = $$props.panoIndex);
3233
+ if ('floorIndex' in $$props) $$invalidate(4, floorIndex = $$props.floorIndex);
3234
+ if ('hoverEnable' in $$props) $$invalidate(5, hoverEnable = $$props.hoverEnable);
3235
+ if ('compassEnable' in $$props) $$invalidate(6, compassEnable = $$props.compassEnable);
3236
+ if ('roomLabelsEnable' in $$props) $$invalidate(7, roomLabelsEnable = $$props.roomLabelsEnable);
3237
+ if ('ruleLabelsEnable' in $$props) $$invalidate(8, ruleLabelsEnable = $$props.ruleLabelsEnable);
3238
+ if ('floorplanData' in $$props) $$invalidate(9, floorplanData = $$props.floorplanData);
3239
+ if ('lastPanoramaLongitude' in $$props) $$invalidate(10, lastPanoramaLongitude = $$props.lastPanoramaLongitude);
3240
+ if ('cameraImageUrl' in $$props) $$invalidate(11, cameraImageUrl = $$props.cameraImageUrl);
3241
+ if ('getLabelElement' in $$props) $$invalidate(12, getLabelElement = $$props.getLabelElement);
3263
3242
  };
3264
3243
 
3265
3244
  return [
3266
- northDesc,
3267
- pxmm,
3268
- five,
3269
3245
  duration,
3270
3246
  visible,
3247
+ northDesc,
3271
3248
  panoIndex,
3272
3249
  floorIndex,
3273
3250
  hoverEnable,
@@ -3277,7 +3254,6 @@ function instance($$self, $$props, $$invalidate) {
3277
3254
  floorplanData,
3278
3255
  lastPanoramaLongitude,
3279
3256
  cameraImageUrl,
3280
- onRoomHeightClick,
3281
3257
  getLabelElement
3282
3258
  ];
3283
3259
  }
@@ -3293,22 +3269,19 @@ class Main extends internal.SvelteComponent {
3293
3269
  create_fragment,
3294
3270
  internal.safe_not_equal,
3295
3271
  {
3296
- northDesc: 0,
3297
- pxmm: 1,
3298
- five: 2,
3299
- duration: 3,
3300
- visible: 4,
3301
- panoIndex: 5,
3302
- floorIndex: 6,
3303
- hoverEnable: 7,
3304
- compassEnable: 8,
3305
- roomLabelsEnable: 9,
3306
- ruleLabelsEnable: 10,
3307
- floorplanData: 11,
3308
- lastPanoramaLongitude: 12,
3309
- cameraImageUrl: 13,
3310
- onRoomHeightClick: 14,
3311
- getLabelElement: 15
3272
+ duration: 0,
3273
+ visible: 1,
3274
+ northDesc: 2,
3275
+ panoIndex: 3,
3276
+ floorIndex: 4,
3277
+ hoverEnable: 5,
3278
+ compassEnable: 6,
3279
+ roomLabelsEnable: 7,
3280
+ ruleLabelsEnable: 8,
3281
+ floorplanData: 9,
3282
+ lastPanoramaLongitude: 10,
3283
+ cameraImageUrl: 11,
3284
+ getLabelElement: 12
3312
3285
  },
3313
3286
  add_css
3314
3287
  );
@@ -3418,32 +3391,58 @@ class TopviewFloorplanPluginController {
3418
3391
  value: () => {
3419
3392
  var _a, _b;
3420
3393
  this.hide();
3421
- (_a = this.container) === null || _a === void 0 ? void 0 : _a.remove();
3422
- (_b = this.app) === null || _b === void 0 ? void 0 : _b.$destroy();
3423
- this.five.off('modeChange', this.handleModeChange);
3424
- this.five.off('panoArrived', this.handlePanoArrived);
3425
- this.five.off('modelLoaded', this.handleModelLoaded);
3426
- this.five.off('wantsMoveToPano', this.handleWantsMoveToPano);
3427
- this.five.off('wantsPanGesture', this.handleWantsPanGesture);
3428
- this.five.off('initAnimationEnded', this.handleInitAnimationEnded);
3394
+ (_a = this.app) === null || _a === void 0 ? void 0 : _a.$destroy();
3395
+ (_b = this.container) === null || _b === void 0 ? void 0 : _b.remove();
3396
+ this.five.off('modeChange', this.onFiveModeChange);
3397
+ this.five.off('panGesture', this.onFivePanGesture);
3398
+ this.five.off('panoArrived', this.onFivePanoArrived);
3399
+ this.five.off('modelLoaded', this.onFiveModelLoaded);
3400
+ this.five.off('pinchGesture', this.onFivePinchGesture);
3401
+ this.five.off('wantsGesture', this.onFiveWantsGesture);
3402
+ this.five.off('wantsMoveToPano', this.onFiveWantsMoveToPano);
3403
+ this.five.off('initAnimationEnded', this.onFiveInitAnimationEnded);
3429
3404
  this.five.off('modelShownFloorChange', this.onModelShownFloorChange);
3430
3405
  }
3431
3406
  });
3432
- /** 模型楼层高亮改变时,自动进行楼层切换 */
3407
+ Object.defineProperty(this, "onFiveWantsMoveToPano", {
3408
+ enumerable: true,
3409
+ configurable: true,
3410
+ writable: true,
3411
+ value: () => {
3412
+ if (this.visible && this.configs.preventRoomClick)
3413
+ return false;
3414
+ }
3415
+ });
3416
+ Object.defineProperty(this, "onFiveWantsGesture", {
3417
+ enumerable: true,
3418
+ configurable: true,
3419
+ writable: true,
3420
+ value: (type) => {
3421
+ if (type !== 'pan' && type !== 'pinch' && type !== 'mouseWheel')
3422
+ return;
3423
+ if (this.visible && !this.configs.gestureEnable)
3424
+ return false;
3425
+ }
3426
+ });
3433
3427
  Object.defineProperty(this, "onModelShownFloorChange", {
3434
3428
  enumerable: true,
3435
3429
  configurable: true,
3436
3430
  writable: true,
3437
3431
  value: (shownFloor) => {
3438
- if (shownFloor === null)
3432
+ if (this.floorIndex === shownFloor)
3439
3433
  return;
3434
+ if (shownFloor === null) {
3435
+ const panoIndex = this.five.getCurrentState().panoIndex;
3436
+ this.floorIndex = this.five.work.observers[panoIndex].floorIndex;
3437
+ return;
3438
+ }
3439
+ // 模型楼层高亮改变时,自动进行楼层切换
3440
3440
  this.floorIndex = shownFloor;
3441
3441
  this.updateSize();
3442
3442
  this.render();
3443
3443
  }
3444
3444
  });
3445
- /** panoIndex 改变时,更新 floorIndex */
3446
- Object.defineProperty(this, "handlePanoArrived", {
3445
+ Object.defineProperty(this, "onFivePanoArrived", {
3447
3446
  enumerable: true,
3448
3447
  configurable: true,
3449
3448
  writable: true,
@@ -3455,31 +3454,28 @@ class TopviewFloorplanPluginController {
3455
3454
  this.floorIndex = this.five.work.observers[index].floorIndex;
3456
3455
  }
3457
3456
  });
3458
- /** 配置了 preventRoomClick 后,在户型图展示时阻止 Five 走点 */
3459
- Object.defineProperty(this, "handleWantsMoveToPano", {
3457
+ Object.defineProperty(this, "onFivePanGesture", {
3460
3458
  enumerable: true,
3461
3459
  configurable: true,
3462
3460
  writable: true,
3463
3461
  value: () => {
3464
3462
  if (!this.visible)
3465
3463
  return;
3466
- if (this.configs.preventRoomClick)
3467
- return false;
3468
- return;
3464
+ this.updatePosition();
3469
3465
  }
3470
3466
  });
3471
- /** 在户型图展示时阻止 Five 滑动行为 */
3472
- Object.defineProperty(this, "handleWantsPanGesture", {
3467
+ Object.defineProperty(this, "onFivePinchGesture", {
3473
3468
  enumerable: true,
3474
3469
  configurable: true,
3475
3470
  writable: true,
3476
3471
  value: () => {
3477
3472
  if (!this.visible)
3478
3473
  return;
3479
- return false;
3474
+ this.updatePosition();
3475
+ this.updateSize();
3480
3476
  }
3481
3477
  });
3482
- Object.defineProperty(this, "handleModelLoaded", {
3478
+ Object.defineProperty(this, "onFiveModelLoaded", {
3483
3479
  enumerable: true,
3484
3480
  configurable: true,
3485
3481
  writable: true,
@@ -3496,7 +3492,7 @@ class TopviewFloorplanPluginController {
3496
3492
  }
3497
3493
  });
3498
3494
  /** 非 Topview 态隐藏户型图 */
3499
- Object.defineProperty(this, "handleModeChange", {
3495
+ Object.defineProperty(this, "onFiveModeChange", {
3500
3496
  enumerable: true,
3501
3497
  configurable: true,
3502
3498
  writable: true,
@@ -3506,7 +3502,7 @@ class TopviewFloorplanPluginController {
3506
3502
  }
3507
3503
  });
3508
3504
  /** 动画结束后是 Topview 态就展示户型图 */
3509
- Object.defineProperty(this, "handleInitAnimationEnded", {
3505
+ Object.defineProperty(this, "onFiveInitAnimationEnded", {
3510
3506
  enumerable: true,
3511
3507
  configurable: true,
3512
3508
  writable: true,
@@ -3546,24 +3542,30 @@ class TopviewFloorplanPluginController {
3546
3542
  this.five = five;
3547
3543
  this.selector = params.selector;
3548
3544
  this.configs = omit(params, ['selector']);
3545
+ this.five.addExtraElement(this.container);
3549
3546
  // 设置 container 样式
3550
3547
  this.container.classList.add('floorplan-plugin');
3551
3548
  Object.assign(this.container.style, pluginStyle);
3552
3549
  // 如果初始化的时候模型已经加载完毕了,就不用再等 modelLoaded
3553
- this.five.model.loaded ? this.handleModelLoaded() : five.once('modelLoaded', this.handleModelLoaded);
3550
+ this.five.model.loaded
3551
+ ? this.onFiveModelLoaded()
3552
+ : five.once('modelLoaded', this.onFiveModelLoaded);
3554
3553
  this.five.once('dispose', this.dispose);
3555
- this.five.on('modeChange', this.handleModeChange);
3556
- this.five.on('panoArrived', this.handlePanoArrived);
3557
- this.five.on('initAnimationEnded', this.handleInitAnimationEnded);
3554
+ this.five.on('modeChange', this.onFiveModeChange);
3555
+ this.five.on('panGesture', this.onFivePanGesture);
3556
+ this.five.on('mouseWheel', this.onFivePinchGesture);
3557
+ this.five.on('panoArrived', this.onFivePanoArrived);
3558
+ this.five.on('pinchGesture', this.onFivePinchGesture);
3559
+ this.five.on('wantsGesture', this.onFiveWantsGesture);
3560
+ this.five.on('wantsMoveToPano', this.onFiveWantsMoveToPano);
3561
+ this.five.on('initAnimationEnded', this.onFiveInitAnimationEnded);
3558
3562
  this.five.on('modelShownFloorChange', this.onModelShownFloorChange);
3559
3563
  }
3560
3564
  /** 加载户型图数据 */
3561
- load(data) {
3562
- return __awaiter(this, void 0, void 0, function* () {
3563
- const copyData = JSON.parse(JSON.stringify(data));
3564
- this.floorplanData = yield formatData(copyData);
3565
- this.render();
3566
- });
3565
+ async load(data) {
3566
+ const copyData = JSON.parse(JSON.stringify(data));
3567
+ this.floorplanData = await formatData(copyData);
3568
+ this.render();
3567
3569
  }
3568
3570
  /** 把插件的渲染DOM插入到对应的容器中去 */
3569
3571
  appendTo(wrapper) {
@@ -3574,6 +3576,7 @@ class TopviewFloorplanPluginController {
3574
3576
  show() {
3575
3577
  this.visible = true;
3576
3578
  this.five.model.show(this.floorIndex);
3579
+ this.updatePosition();
3577
3580
  this.updateSize();
3578
3581
  const renderDuration = 500;
3579
3582
  const modelOpacity = this.configs.modelOpacity;
@@ -3581,8 +3584,6 @@ class TopviewFloorplanPluginController {
3581
3584
  changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
3582
3585
  }
3583
3586
  this.render(renderDuration);
3584
- this.five.on('wantsMoveToPano', this.handleWantsMoveToPano);
3585
- this.five.on('wantsPanGesture', this.handleWantsPanGesture);
3586
3587
  }
3587
3588
  hide() {
3588
3589
  const modelOpacity = 1;
@@ -3590,20 +3591,28 @@ class TopviewFloorplanPluginController {
3590
3591
  this.visible = false;
3591
3592
  changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
3592
3593
  this.render();
3593
- this.five.on('wantsMoveToPano', this.handleWantsMoveToPano);
3594
- this.five.on('wantsPanGesture', this.handleWantsPanGesture);
3594
+ }
3595
+ /** 更新户型图位置 */
3596
+ updatePosition() {
3597
+ var _a;
3598
+ const modelCenter = (_a = this.five.model) === null || _a === void 0 ? void 0 : _a.bounding.getCenter(new THREE__namespace.Vector3());
3599
+ if (!modelCenter)
3600
+ return;
3601
+ const ndcModelCenter = modelCenter.clone().project(this.five.camera);
3602
+ const left = (ndcModelCenter.x + 1) / 2;
3603
+ const top = -(ndcModelCenter.y - 1) / 2;
3604
+ this.container.style.left = left * 100 + '%';
3605
+ this.container.style.top = top * 100 + '%';
3595
3606
  }
3596
3607
  render(duration) {
3597
3608
  if (!this.container || !this.floorplanData)
3598
3609
  return;
3599
3610
  if (this.size.width === 0)
3600
3611
  return;
3601
- const { northDesc, getLabelElement, cameraImageUrl, preventRoomClick, hoverEnable, compassEnable, roomLabelsEnable, ruleLabelsEnable, } = this.configs;
3602
- const handleClick = preventRoomClick ? () => false : undefined;
3612
+ const { northDesc, getLabelElement, cameraImageUrl, hoverEnable, compassEnable, roomLabelsEnable, ruleLabelsEnable, } = this.configs;
3603
3613
  const props = {
3614
+ getLabelElement,
3604
3615
  northDesc: northDesc !== null && northDesc !== void 0 ? northDesc : '北',
3605
- five: this.five,
3606
- pxmm: this.pxmm,
3607
3616
  cameraImageUrl,
3608
3617
  visible: this.visible,
3609
3618
  duration: duration !== null && duration !== void 0 ? duration : 0,
@@ -3615,8 +3624,6 @@ class TopviewFloorplanPluginController {
3615
3624
  ruleLabelsEnable: ruleLabelsEnable !== null && ruleLabelsEnable !== void 0 ? ruleLabelsEnable : true,
3616
3625
  roomLabelsEnable: roomLabelsEnable !== null && roomLabelsEnable !== void 0 ? roomLabelsEnable : true,
3617
3626
  lastPanoramaLongitude: this.lastPanoramaLongitude,
3618
- getLabelElement,
3619
- onRoomHeightClick: handleClick,
3620
3627
  };
3621
3628
  if (!this.app) {
3622
3629
  this.app = new Main({