@realsee/dnalogel 2.0.0-alpha.35 → 2.0.0-alpha.38

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 (237) hide show
  1. package/dist/ItemLabelPlugin/index.js +21 -41
  2. package/dist/ModelItemLabelPlugin/index.js +16 -36
  3. package/dist/ModelViewPlugin/Plugin.d.ts +4 -4
  4. package/dist/ModelViewPlugin/index.js +2 -3
  5. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +1 -1
  6. package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +0 -4
  7. package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +0 -3
  8. package/dist/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
  9. package/dist/PanoMeasurePlugin/Modules/UIController/{NewMainBtnController.d.ts → mobileMainBtnController.d.ts} +1 -1
  10. package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +0 -3
  11. package/dist/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +1 -1
  12. package/dist/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +2 -0
  13. package/dist/PanoMeasurePlugin/index.js +298 -331
  14. package/dist/PanoMeasurePlugin/typings/data.d.ts +5 -0
  15. package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +6 -1
  16. package/dist/PanoRulerProPlugin/Controller.d.ts +15 -0
  17. package/dist/PanoRulerProPlugin/index.d.ts +8 -0
  18. package/dist/PanoRulerProPlugin/index.js +1006 -0
  19. package/dist/PanoRulerProPlugin/typings.d.ts +46 -0
  20. package/dist/base/BasePlugin.d.ts +100 -0
  21. package/dist/base/BasePluginWithData.d.ts +34 -0
  22. package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +71 -78
  23. package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +5 -7
  24. package/dist/floorplan/ModelFloorplanPlugin/index.js +1064 -567
  25. package/dist/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
  26. package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +23 -14
  27. package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +5 -6
  28. package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +489 -129
  29. package/dist/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
  30. package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +50 -58
  31. package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +5 -3
  32. package/dist/floorplan/TopviewFloorplanPlugin/index.js +1031 -443
  33. package/dist/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
  34. package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/utils/constant.d.ts +10 -3
  35. package/{libs/floorplan/ModelFloorplanPlugin → dist/floorplan}/utils/correctFiveState.d.ts +2 -1
  36. package/dist/index.d.ts +1 -0
  37. package/dist/index.es.js +3173 -1633
  38. package/dist/index.js +3194 -1653
  39. package/dist/index.umd.js +3090 -1549
  40. package/dist/shared-utils/five/changeMode.d.ts +4 -1
  41. package/dist/shared-utils/getPxmm.d.ts +8 -0
  42. package/dist/shared-utils/logger.d.ts +16 -0
  43. package/docs/assets/search.js +1 -1
  44. package/docs/classes/Magnifier.html +4 -4
  45. package/docs/classes/ModelRoomLabelController.html +4 -4
  46. package/docs/enums/CameraMovementEffect.html +2 -2
  47. package/docs/enums/DIRECTION.html +1 -1
  48. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
  49. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  50. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
  51. package/docs/enums/Rotation.html +2 -2
  52. package/docs/index.html +2 -2
  53. package/docs/interfaces/CSS3DRenderPluginExportType.html +2 -2
  54. package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
  55. package/docs/interfaces/FloorplanBounding.html +4 -4
  56. package/docs/interfaces/FloorplanData.html +2 -2
  57. package/docs/interfaces/FloorplanEntrance.html +7 -7
  58. package/docs/interfaces/FloorplanExtraObject.html +3 -3
  59. package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
  60. package/docs/interfaces/FloorplanFloorData.html +2 -2
  61. package/docs/interfaces/FloorplanImagePosition.html +2 -2
  62. package/docs/interfaces/FloorplanObserver.html +2 -2
  63. package/docs/interfaces/FloorplanOutlineItem.html +2 -2
  64. package/docs/interfaces/FloorplanPosition.html +2 -2
  65. package/docs/interfaces/FloorplanRoomItem.html +6 -6
  66. package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
  67. package/docs/interfaces/FloorplanServerBounding.html +4 -4
  68. package/docs/interfaces/FloorplanServerComputedData.html +1 -1
  69. package/docs/interfaces/FloorplanServerData.html +2 -2
  70. package/docs/interfaces/FloorplanServerEntrance.html +7 -7
  71. package/docs/interfaces/FloorplanServerFloorData.html +2 -2
  72. package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
  73. package/docs/interfaces/FloorplanServerObserver.html +2 -2
  74. package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
  75. package/docs/interfaces/FloorplanServerPosition.html +2 -2
  76. package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
  77. package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
  78. package/docs/interfaces/ItemLabelPluginData.html +1 -1
  79. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
  80. package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
  81. package/docs/interfaces/LineJson.html +1 -1
  82. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  83. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  84. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  85. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  86. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  87. package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
  88. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
  89. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
  90. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  91. package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
  92. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
  93. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
  94. package/docs/interfaces/ModelViewPluginExportType.html +1 -1
  95. package/docs/interfaces/OpenParameter.html +2 -2
  96. package/docs/interfaces/PanoCompassPluginData.html +1 -1
  97. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
  98. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
  99. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
  100. package/docs/interfaces/PanoMeasureParameterType.html +1 -1
  101. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  102. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  103. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  104. package/docs/interfaces/PanoRulerProPluginExportType.html +1 -0
  105. package/docs/interfaces/PanoRulerProPluginOptions.html +1 -0
  106. package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -0
  107. package/docs/interfaces/PanoRulerProPluginState.html +1 -0
  108. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
  109. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
  110. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  111. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
  112. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  113. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
  114. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  115. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
  116. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
  117. package/docs/interfaces/Point.html +1 -1
  118. package/docs/interfaces/PointJson.html +1 -1
  119. package/docs/interfaces/Room.html +1 -1
  120. package/docs/interfaces/RoomInfo.html +1 -1
  121. package/docs/interfaces/RoomLabel.html +7 -7
  122. package/docs/interfaces/RoomRules.html +1 -1
  123. package/docs/interfaces/Rooms.html +1 -1
  124. package/docs/modules.html +19 -27
  125. package/libs/ItemLabelPlugin/ItemLabelComponent.js +21 -41
  126. package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +16 -36
  127. package/libs/ModelViewPlugin/Plugin.d.ts +4 -4
  128. package/libs/ModelViewPlugin/Plugin.js +2 -3
  129. package/libs/PanoMeasurePlugin/Controller/index.js +4 -2
  130. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +1 -1
  131. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +1 -1
  132. package/libs/PanoMeasurePlugin/Modules/GuideController.js +2 -2
  133. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +0 -4
  134. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +66 -55
  135. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +0 -3
  136. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +51 -73
  137. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +7 -4
  138. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +10 -12
  139. package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
  140. package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +2 -2
  141. package/libs/PanoMeasurePlugin/Modules/UIController/{NewMainBtnController.d.ts → mobileMainBtnController.d.ts} +1 -1
  142. package/libs/PanoMeasurePlugin/Modules/UIController/{NewMainBtnController.js → mobileMainBtnController.js} +4 -4
  143. package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +0 -3
  144. package/libs/PanoMeasurePlugin/Modules/UIController/style.js +7 -24
  145. package/libs/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +1 -1
  146. package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +1 -1
  147. package/libs/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +2 -0
  148. package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +1 -2
  149. package/libs/PanoMeasurePlugin/typings/data.d.ts +5 -0
  150. package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +6 -1
  151. package/libs/PanoMeasurePlugin/utils/mouseGroup.js +55 -7
  152. package/libs/PanoRulerProPlugin/Controller.d.ts +15 -0
  153. package/libs/PanoRulerProPlugin/Controller.js +110 -0
  154. package/libs/PanoRulerProPlugin/RulerItem.js +314 -0
  155. package/libs/PanoRulerProPlugin/RulerItems.js +377 -0
  156. package/libs/PanoRulerProPlugin/index.d.ts +8 -0
  157. package/libs/PanoRulerProPlugin/index.js +8 -0
  158. package/libs/PanoRulerProPlugin/typings.d.ts +46 -0
  159. package/libs/{floorplan/ModelFloorplanPlugin/typings/events.type.js → PanoRulerProPlugin/typings.js} +0 -0
  160. package/libs/base/BasePlugin.d.ts +100 -0
  161. package/libs/base/BasePlugin.js +31 -0
  162. package/libs/base/BasePluginWithData.d.ts +34 -0
  163. package/libs/base/BasePluginWithData.js +4 -0
  164. package/libs/floorplan/Components/Compass.js +11 -11
  165. package/libs/floorplan/Components/CurrentFloor.js +24 -11
  166. package/libs/floorplan/Components/Main.js +21 -15
  167. package/libs/floorplan/Components/RoomHighlight/Room.js +44 -5
  168. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +29 -12
  169. package/libs/floorplan/Components/RoomLabels/RoomLabel.js +164 -15
  170. package/libs/floorplan/Components/RoomLabels/RoomLabels.js +68 -24
  171. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +1 -0
  172. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +11 -9
  173. package/libs/floorplan/Components/RuleLabels/RuleItem.js +2 -2
  174. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +71 -78
  175. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +439 -272
  176. package/libs/floorplan/ModelFloorplanPlugin/index.d.ts +5 -7
  177. package/libs/floorplan/ModelFloorplanPlugin/index.js +2 -2
  178. package/libs/floorplan/ModelFloorplanPlugin/typing.d.ts +107 -0
  179. package/libs/floorplan/ModelFloorplanPlugin/typing.js +1 -0
  180. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +5 -5
  181. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +114 -53
  182. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +23 -14
  183. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +162 -52
  184. package/libs/floorplan/PanoFloorplanRadarPlugin/index.d.ts +5 -6
  185. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +2 -2
  186. package/libs/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
  187. package/libs/floorplan/PanoFloorplanRadarPlugin/typing.js +1 -0
  188. package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +50 -58
  189. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +320 -174
  190. package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +5 -3
  191. package/libs/floorplan/TopviewFloorplanPlugin/index.js +2 -2
  192. package/libs/floorplan/TopviewFloorplanPlugin/style.js +1 -1
  193. package/libs/floorplan/TopviewFloorplanPlugin/typing.d.ts +86 -0
  194. package/libs/floorplan/TopviewFloorplanPlugin/typing.js +1 -0
  195. package/{dist/floorplan/ModelFloorplanPlugin → libs/floorplan}/utils/constant.d.ts +10 -3
  196. package/libs/floorplan/{ModelFloorplanPlugin/utils → utils}/constant.js +9 -2
  197. package/{dist/floorplan/ModelFloorplanPlugin → libs/floorplan}/utils/correctFiveState.d.ts +2 -1
  198. package/libs/floorplan/{ModelFloorplanPlugin/utils → utils}/correctFiveState.js +16 -16
  199. package/libs/index.d.ts +1 -0
  200. package/libs/index.js +2 -0
  201. package/libs/shared-utils/five/changeMode.d.ts +4 -1
  202. package/libs/shared-utils/five/changeMode.js +34 -13
  203. package/libs/shared-utils/getPxmm.d.ts +8 -0
  204. package/libs/shared-utils/getPxmm.js +25 -20
  205. package/libs/shared-utils/logger.d.ts +16 -0
  206. package/libs/shared-utils/logger.js +47 -0
  207. package/package.json +2 -2
  208. package/dist/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +0 -23
  209. package/docs/classes/PanoFloorplanRadarPluginController.html +0 -3
  210. package/docs/enums/ModelFloorplanErrorType.html +0 -1
  211. package/docs/interfaces/ModelFloorplanParameterType.html +0 -1
  212. package/docs/interfaces/ModelFloorplanViewEvent.html +0 -5
  213. package/docs/interfaces/PanoFloorplanRadarPluginControllerParameter.html +0 -1
  214. package/docs/interfaces/TopviewFloorplanPluginParameterType.html +0 -19
  215. package/libs/ModelSimulationPlugin/index.d.ts +0 -33
  216. package/libs/ModelSimulationPlugin/index.js +0 -166
  217. package/libs/ModelSimulationPlugin/shaders/fragment.d.ts +0 -2
  218. package/libs/ModelSimulationPlugin/shaders/fragment.js +0 -96
  219. package/libs/ModelSimulationPlugin/shaders/vertex.d.ts +0 -2
  220. package/libs/ModelSimulationPlugin/shaders/vertex.js +0 -23
  221. package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.d.ts +0 -1
  222. package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.js +0 -1
  223. package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.js +0 -120
  224. package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.js +0 -106
  225. package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.js +0 -463
  226. package/libs/floorplan/ModelFloorplanPlugin/Components/Main.js +0 -375
  227. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.js +0 -171
  228. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.js +0 -265
  229. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +0 -301
  230. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.js +0 -219
  231. package/libs/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +0 -23
  232. package/libs/shared-utils/five/useFivePlugin.d.ts +0 -1
  233. package/libs/shared-utils/five/useFivePlugin.js +0 -8
  234. package/libs/shared-utils/useDebounce.d.ts +0 -8
  235. package/libs/shared-utils/useDebounce.js +0 -22
  236. package/libs/shared-utils/useThrottle.d.ts +0 -8
  237. package/libs/shared-utils/useThrottle.js +0 -25
@@ -1,265 +0,0 @@
1
- /* generated by Svelte v3.47.0 */
2
- import {
3
- SvelteComponent,
4
- append_styles,
5
- assign,
6
- attr,
7
- check_outros,
8
- create_component,
9
- destroy_component,
10
- detach,
11
- element,
12
- empty,
13
- get_spread_update,
14
- group_outros,
15
- init,
16
- insert,
17
- mount_component,
18
- outro_and_destroy_block,
19
- safe_not_equal,
20
- transition_in,
21
- transition_out,
22
- update_keyed_each
23
- } from "svelte/internal";
24
-
25
- import RoomLabel from './RoomLabel';
26
-
27
- function add_css(target) {
28
- append_styles(target, "svelte-sw25w3", ".floorplan-plugin__room-labels-sw25w3{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20}");
29
- }
30
-
31
- function get_each_context(ctx, list, i) {
32
- const child_ctx = ctx.slice();
33
- child_ctx[4] = list[i];
34
- return child_ctx;
35
- }
36
-
37
- // (8:0) {#if rooms}
38
- function create_if_block(ctx) {
39
- let div;
40
- let each_blocks = [];
41
- let each_1_lookup = new Map();
42
- let current;
43
- let each_value = /*rooms*/ ctx[1];
44
- const get_key = ctx => /*room*/ ctx[4].id;
45
-
46
- for (let i = 0; i < each_value.length; i += 1) {
47
- let child_ctx = get_each_context(ctx, each_value, i);
48
- let key = get_key(child_ctx);
49
- each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx));
50
- }
51
-
52
- return {
53
- c() {
54
- div = element("div");
55
-
56
- for (let i = 0; i < each_blocks.length; i += 1) {
57
- each_blocks[i].c();
58
- }
59
-
60
- attr(div, "class", "floorplan-plugin__room-labels svelte-sw25w3");
61
- },
62
- m(target, anchor) {
63
- insert(target, div, anchor);
64
-
65
- for (let i = 0; i < each_blocks.length; i += 1) {
66
- each_blocks[i].m(div, null);
67
- }
68
-
69
- current = true;
70
- },
71
- p(ctx, dirty) {
72
- if (dirty & /*rooms, getLabelElement*/ 3) {
73
- each_value = /*rooms*/ ctx[1];
74
- group_outros();
75
- each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, outro_and_destroy_block, create_each_block, null, get_each_context);
76
- check_outros();
77
- }
78
- },
79
- i(local) {
80
- if (current) return;
81
-
82
- for (let i = 0; i < each_value.length; i += 1) {
83
- transition_in(each_blocks[i]);
84
- }
85
-
86
- current = true;
87
- },
88
- o(local) {
89
- for (let i = 0; i < each_blocks.length; i += 1) {
90
- transition_out(each_blocks[i]);
91
- }
92
-
93
- current = false;
94
- },
95
- d(detaching) {
96
- if (detaching) detach(div);
97
-
98
- for (let i = 0; i < each_blocks.length; i += 1) {
99
- each_blocks[i].d();
100
- }
101
- }
102
- };
103
- }
104
-
105
- // (10:4) {#each rooms as room (room.id)}
106
- function create_each_block(key_1, ctx) {
107
- let first;
108
- let roomlabel;
109
- let current;
110
-
111
- const roomlabel_spread_levels = [
112
- {
113
- room: /*room*/ ctx[4],
114
- getLabelElement: /*getLabelElement*/ ctx[0]
115
- }
116
- ];
117
-
118
- let roomlabel_props = {};
119
-
120
- for (let i = 0; i < roomlabel_spread_levels.length; i += 1) {
121
- roomlabel_props = assign(roomlabel_props, roomlabel_spread_levels[i]);
122
- }
123
-
124
- roomlabel = new RoomLabel({ props: roomlabel_props });
125
-
126
- return {
127
- key: key_1,
128
- first: null,
129
- c() {
130
- first = empty();
131
- create_component(roomlabel.$$.fragment);
132
- this.first = first;
133
- },
134
- m(target, anchor) {
135
- insert(target, first, anchor);
136
- mount_component(roomlabel, target, anchor);
137
- current = true;
138
- },
139
- p(new_ctx, dirty) {
140
- ctx = new_ctx;
141
-
142
- const roomlabel_changes = (dirty & /*rooms, getLabelElement*/ 3)
143
- ? get_spread_update(roomlabel_spread_levels, [
144
- {
145
- room: /*room*/ ctx[4],
146
- getLabelElement: /*getLabelElement*/ ctx[0]
147
- }
148
- ])
149
- : {};
150
-
151
- roomlabel.$set(roomlabel_changes);
152
- },
153
- i(local) {
154
- if (current) return;
155
- transition_in(roomlabel.$$.fragment, local);
156
- current = true;
157
- },
158
- o(local) {
159
- transition_out(roomlabel.$$.fragment, local);
160
- current = false;
161
- },
162
- d(detaching) {
163
- if (detaching) detach(first);
164
- destroy_component(roomlabel, detaching);
165
- }
166
- };
167
- }
168
-
169
- function create_fragment(ctx) {
170
- let if_block_anchor;
171
- let current;
172
- let if_block = /*rooms*/ ctx[1] && create_if_block(ctx);
173
-
174
- return {
175
- c() {
176
- if (if_block) if_block.c();
177
- if_block_anchor = empty();
178
- },
179
- m(target, anchor) {
180
- if (if_block) if_block.m(target, anchor);
181
- insert(target, if_block_anchor, anchor);
182
- current = true;
183
- },
184
- p(ctx, [dirty]) {
185
- if (/*rooms*/ ctx[1]) {
186
- if (if_block) {
187
- if_block.p(ctx, dirty);
188
-
189
- if (dirty & /*rooms*/ 2) {
190
- transition_in(if_block, 1);
191
- }
192
- } else {
193
- if_block = create_if_block(ctx);
194
- if_block.c();
195
- transition_in(if_block, 1);
196
- if_block.m(if_block_anchor.parentNode, if_block_anchor);
197
- }
198
- } else if (if_block) {
199
- group_outros();
200
-
201
- transition_out(if_block, 1, 1, () => {
202
- if_block = null;
203
- });
204
-
205
- check_outros();
206
- }
207
- },
208
- i(local) {
209
- if (current) return;
210
- transition_in(if_block);
211
- current = true;
212
- },
213
- o(local) {
214
- transition_out(if_block);
215
- current = false;
216
- },
217
- d(detaching) {
218
- if (if_block) if_block.d(detaching);
219
- if (detaching) detach(if_block_anchor);
220
- }
221
- };
222
- }
223
-
224
- function instance($$self, $$props, $$invalidate) {
225
- let rooms;
226
- let { floorIndex } = $$props;
227
- let { floorplanData } = $$props;
228
- let { getLabelElement } = $$props;
229
-
230
- $$self.$$set = $$props => {
231
- if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
232
- if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
233
- if ('getLabelElement' in $$props) $$invalidate(0, getLabelElement = $$props.getLabelElement);
234
- };
235
-
236
- $$self.$$.update = () => {
237
- if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 12) {
238
- $: $$invalidate(1, rooms = floorplanData.floorDatas[floorIndex].rooms);
239
- }
240
- };
241
-
242
- return [getLabelElement, rooms, floorIndex, floorplanData];
243
- }
244
-
245
- class Component extends SvelteComponent {
246
- constructor(options) {
247
- super();
248
-
249
- init(
250
- this,
251
- options,
252
- instance,
253
- create_fragment,
254
- safe_not_equal,
255
- {
256
- floorIndex: 2,
257
- floorplanData: 3,
258
- getLabelElement: 0
259
- },
260
- add_css
261
- );
262
- }
263
- }
264
-
265
- export default Component;
@@ -1,301 +0,0 @@
1
- /* generated by Svelte v3.47.0 */
2
- import {
3
- SvelteComponent,
4
- append,
5
- append_styles,
6
- attr,
7
- destroy_block,
8
- detach,
9
- element,
10
- init,
11
- insert,
12
- noop,
13
- safe_not_equal,
14
- set_style,
15
- space,
16
- text,
17
- toggle_class,
18
- update_keyed_each
19
- } from "svelte/internal";
20
-
21
- import { notNil } from '../../../../shared-utils/isNil';
22
-
23
- function add_css(target) {
24
- append_styles(target, "svelte-1rr09in", ".floorplan-plugin__rule-labels-1rr09in{position:absolute;height:5px;display:flex;align-items:center}.floorplan-plugin__rule-labels-top-1rr09in{left:0;top:0}.floorplan-plugin__rule-labels-bottom-1rr09in{left:0;bottom:0}.floorplan-plugin__rule-labels-left-1rr09in{bottom:0;left:0}.floorplan-plugin__rule-labels-right-1rr09in{bottom:0;right:0}.floorplan-plugin__rule-line-1rr09in{background:#fff;opacity:0.05;width:100%;height:1px}.floorplan-plugin__rule-scale-1rr09in{position:absolute;background:#fff;opacity:0.05;transform-origin:center;width:1px;height:5px}.floorplan-plugin__text-wrapper-1rr09in{width:0;height:0;position:absolute}.floorplan-plugin__text-wrapper.floorplan-plugin__text-wrapper--is-left-or-top-1rr09in{top:10px}.floorplan-plugin__text-wrapper.floorplan-plugin__text-wrapper-is-right-or-bottom-1rr09in{bottom:10px}.floorplan-plugin__rule-text-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-1rr09in{transform:translate(-50%, -50%)}");
25
- }
26
-
27
- function get_each_context(ctx, list, i) {
28
- const child_ctx = ctx.slice();
29
- child_ctx[24] = list[i];
30
- child_ctx[26] = i;
31
- return child_ctx;
32
- }
33
-
34
- function get_each_context_1(ctx, list, i) {
35
- const child_ctx = ctx.slice();
36
- child_ctx[27] = list[i];
37
- child_ctx[29] = i;
38
- return child_ctx;
39
- }
40
-
41
- // (66:2) {#each positionPxArray as position, positionIndex (positionIndex)}
42
- function create_each_block_1(key_1, ctx) {
43
- let div;
44
- let style_left = `${/*position*/ ctx[27]}px`;
45
-
46
- return {
47
- key: key_1,
48
- first: null,
49
- c() {
50
- div = element("div");
51
- attr(div, "class", "floorplan-plugin__rule-scale svelte-1rr09in");
52
- set_style(div, "left", style_left, false);
53
- this.first = div;
54
- },
55
- m(target, anchor) {
56
- insert(target, div, anchor);
57
- },
58
- p(new_ctx, dirty) {
59
- ctx = new_ctx;
60
- },
61
- d(detaching) {
62
- if (detaching) detach(div);
63
- }
64
- };
65
- }
66
-
67
- // (69:2) {#each textArray as textItem, textItemIndex (textItemIndex)}
68
- function create_each_block(key_1, ctx) {
69
- let div;
70
- let span;
71
- let t0_value = /*textItem*/ ctx[24].distance + "";
72
- let t0;
73
- let t1;
74
- let style_left = `${/*textItem*/ ctx[24].positionPx}px`;
75
-
76
- return {
77
- key: key_1,
78
- first: null,
79
- c() {
80
- div = element("div");
81
- span = element("span");
82
- t0 = text(t0_value);
83
- t1 = space();
84
- attr(span, "class", "floorplan-plugin__rule-text svelte-1rr09in");
85
- toggle_class(span, "is-row", /*isRow*/ ctx[5]);
86
- attr(div, "class", "floorplan-plugin__text-wrapper svelte-1rr09in");
87
- toggle_class(div, "floorplan-plugin__text-wrapper--is-left-or-top", /*isLeft*/ ctx[3] || /*isTop*/ ctx[1]);
88
- toggle_class(div, "floorplan-plugin__text-wrapper-is-right-or-bottom", /*isRight*/ ctx[4] || /*isBottom*/ ctx[2]);
89
- set_style(div, "left", style_left, false);
90
- this.first = div;
91
- },
92
- m(target, anchor) {
93
- insert(target, div, anchor);
94
- append(div, span);
95
- append(span, t0);
96
- append(div, t1);
97
- },
98
- p(new_ctx, dirty) {
99
- ctx = new_ctx;
100
- },
101
- d(detaching) {
102
- if (detaching) detach(div);
103
- }
104
- };
105
- }
106
-
107
- function create_fragment(ctx) {
108
- let div1;
109
- let div0;
110
- let t0;
111
- let each_blocks_1 = [];
112
- let each0_lookup = new Map();
113
- let t1;
114
- let each_blocks = [];
115
- let each1_lookup = new Map();
116
- let div1_class_value;
117
- let each_value_1 = /*positionPxArray*/ ctx[6];
118
- const get_key = ctx => /*positionIndex*/ ctx[29];
119
-
120
- for (let i = 0; i < each_value_1.length; i += 1) {
121
- let child_ctx = get_each_context_1(ctx, each_value_1, i);
122
- let key = get_key(child_ctx);
123
- each0_lookup.set(key, each_blocks_1[i] = create_each_block_1(key, child_ctx));
124
- }
125
-
126
- let each_value = /*textArray*/ ctx[10];
127
- const get_key_1 = ctx => /*textItemIndex*/ ctx[26];
128
-
129
- for (let i = 0; i < each_value.length; i += 1) {
130
- let child_ctx = get_each_context(ctx, each_value, i);
131
- let key = get_key_1(child_ctx);
132
- each1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx));
133
- }
134
-
135
- return {
136
- c() {
137
- div1 = element("div");
138
- div0 = element("div");
139
- t0 = space();
140
-
141
- for (let i = 0; i < each_blocks_1.length; i += 1) {
142
- each_blocks_1[i].c();
143
- }
144
-
145
- t1 = space();
146
-
147
- for (let i = 0; i < each_blocks.length; i += 1) {
148
- each_blocks[i].c();
149
- }
150
-
151
- attr(div0, "class", "floorplan-plugin__rule-line svelte-1rr09in");
152
- attr(div1, "class", div1_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels-" + /*type*/ ctx[0] + " svelte-1rr09in");
153
- set_style(div1, "width", /*width*/ ctx[9], false);
154
- set_style(div1, "transform", /*transform*/ ctx[7], false);
155
- set_style(div1, "transform-origin", /*transformOrigin*/ ctx[8], false);
156
- },
157
- m(target, anchor) {
158
- insert(target, div1, anchor);
159
- append(div1, div0);
160
- append(div1, t0);
161
-
162
- for (let i = 0; i < each_blocks_1.length; i += 1) {
163
- each_blocks_1[i].m(div1, null);
164
- }
165
-
166
- append(div1, t1);
167
-
168
- for (let i = 0; i < each_blocks.length; i += 1) {
169
- each_blocks[i].m(div1, null);
170
- }
171
- },
172
- p(ctx, [dirty]) {
173
- if (dirty & /*positionPxArray*/ 64) {
174
- each_value_1 = /*positionPxArray*/ ctx[6];
175
- each_blocks_1 = update_keyed_each(each_blocks_1, dirty, get_key, 1, ctx, each_value_1, each0_lookup, div1, destroy_block, create_each_block_1, t1, get_each_context_1);
176
- }
177
-
178
- if (dirty & /*isLeft, isTop, isRight, isBottom, textArray, isRow*/ 1086) {
179
- each_value = /*textArray*/ ctx[10];
180
- each_blocks = update_keyed_each(each_blocks, dirty, get_key_1, 1, ctx, each_value, each1_lookup, div1, destroy_block, create_each_block, null, get_each_context);
181
- }
182
-
183
- if (dirty & /*type*/ 1 && div1_class_value !== (div1_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels-" + /*type*/ ctx[0] + " svelte-1rr09in")) {
184
- attr(div1, "class", div1_class_value);
185
- }
186
- },
187
- i: noop,
188
- o: noop,
189
- d(detaching) {
190
- if (detaching) detach(div1);
191
-
192
- for (let i = 0; i < each_blocks_1.length; i += 1) {
193
- each_blocks_1[i].d();
194
- }
195
-
196
- for (let i = 0; i < each_blocks.length; i += 1) {
197
- each_blocks[i].d();
198
- }
199
- }
200
- };
201
- }
202
-
203
- const padding = 1000;
204
-
205
- function instance($$self, $$props, $$invalidate) {
206
- let { pxmm } = $$props;
207
- let { type } = $$props;
208
- let { data } = $$props;
209
- let { bounding } = $$props;
210
- const isTop = type === 'top';
211
- const isBottom = type === 'bottom';
212
- const isLeft = type === 'left';
213
- const isRight = type === 'right';
214
- const isRow = isTop || isBottom;
215
-
216
- // 计算每一段墙的长度,以及墙两侧点距离标尺初始点的像素值
217
- const positionArray = data.map(([start, end]) => isRow ? [start.x, end.x] : [start.y, end.y]).flat().sort().filter((x, index, arr) => {
218
- if (index === 0) return true;
219
- return x !== arr[index - 1];
220
- });
221
-
222
- const minPosition = positionArray[0];
223
- const maxPosition = positionArray.slice(-1)[0];
224
- const length = maxPosition - minPosition;
225
- const minBounding = isRow ? bounding.min.x : bounding.min.y;
226
- const lengthPx = length * pxmm;
227
- const positionPxArray = positionArray.map(x => (x - minPosition) / length * lengthPx);
228
-
229
- // 在主要方向上的偏移量,上下的标尺是距离图片左侧的长度,左右的标尺是距离图片底部的距离
230
- const translateMain = (minPosition - minBounding) * pxmm;
231
-
232
- // 在次要方向的偏移量,希望达到的效果是标尺轴距离户型图边界 27px,但是图片自身是带有 1000mm 的边界,所以在计算时需要减去这个边界
233
- const translateSecond = 27 - padding * pxmm;
234
-
235
- const translate = (() => {
236
- if (isTop) return `translate(${translateMain}px, ${-translateSecond}px)`;
237
- if (isBottom) return `translate(${translateMain}px, ${translateSecond}px)`;
238
- if (isLeft) return `translate(${-translateSecond}px, ${-translateMain}px)`;
239
- if (isRight) return `translate(${translateSecond}px, ${-translateMain - lengthPx}px)`;
240
- })();
241
-
242
- const rotate = isRow ? 'rotate(0)' : 'rotate(-90deg)';
243
- const transform = `${translate} ${rotate}`;
244
- const transformOrigin = `${isRight ? 'right' : 'left'} ${isTop ? 'top' : 'bottom'}`;
245
- const width = lengthPx + 'px';
246
-
247
- // 把点位的户型图坐标转成距离起始位置的像素值
248
- const textArray = positionArray.map((position, index, array) => {
249
- if (index === 0) return null;
250
- const distance = position - array[index - 1];
251
- const positionPx = (array[index - 1] + distance / 2 - minPosition) / length * lengthPx;
252
- return { distance, positionPx };
253
- }).filter(notNil).filter(item => item.distance / length > 0.12);
254
-
255
- $$self.$$set = $$props => {
256
- if ('pxmm' in $$props) $$invalidate(11, pxmm = $$props.pxmm);
257
- if ('type' in $$props) $$invalidate(0, type = $$props.type);
258
- if ('data' in $$props) $$invalidate(12, data = $$props.data);
259
- if ('bounding' in $$props) $$invalidate(13, bounding = $$props.bounding);
260
- };
261
-
262
- return [
263
- type,
264
- isTop,
265
- isBottom,
266
- isLeft,
267
- isRight,
268
- isRow,
269
- positionPxArray,
270
- transform,
271
- transformOrigin,
272
- width,
273
- textArray,
274
- pxmm,
275
- data,
276
- bounding
277
- ];
278
- }
279
-
280
- class Component extends SvelteComponent {
281
- constructor(options) {
282
- super();
283
-
284
- init(
285
- this,
286
- options,
287
- instance,
288
- create_fragment,
289
- safe_not_equal,
290
- {
291
- pxmm: 11,
292
- type: 0,
293
- data: 12,
294
- bounding: 13
295
- },
296
- add_css
297
- );
298
- }
299
- }
300
-
301
- export default Component;