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

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 (115) hide show
  1. package/dist/PanoSpatialTagPlugin/Plugin.d.ts +2 -0
  2. package/dist/PanoSpatialTagPlugin/index.js +57 -48
  3. package/dist/index.es.js +57 -48
  4. package/dist/index.js +57 -48
  5. package/dist/index.umd.js +57 -48
  6. package/docs/assets/search.js +1 -1
  7. package/docs/classes/Magnifier.html +4 -4
  8. package/docs/classes/ModelRoomLabelController.html +4 -4
  9. package/docs/classes/PanoFloorplanRadarPluginController.html +2 -2
  10. package/docs/enums/CameraMovementEffect.html +2 -2
  11. package/docs/enums/DIRECTION.html +1 -1
  12. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
  13. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  14. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
  15. package/docs/enums/ModelFloorplanErrorType.html +1 -1
  16. package/docs/enums/Rotation.html +2 -2
  17. package/docs/index.html +1 -1
  18. package/docs/interfaces/CSS3DRenderPluginExportType.html +2 -2
  19. package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
  20. package/docs/interfaces/FloorplanBounding.html +4 -4
  21. package/docs/interfaces/FloorplanData.html +2 -2
  22. package/docs/interfaces/FloorplanEntrance.html +7 -7
  23. package/docs/interfaces/FloorplanExtraObject.html +3 -3
  24. package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
  25. package/docs/interfaces/FloorplanFloorData.html +2 -2
  26. package/docs/interfaces/FloorplanImagePosition.html +2 -2
  27. package/docs/interfaces/FloorplanObserver.html +2 -2
  28. package/docs/interfaces/FloorplanOutlineItem.html +2 -2
  29. package/docs/interfaces/FloorplanPosition.html +2 -2
  30. package/docs/interfaces/FloorplanRoomItem.html +6 -6
  31. package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
  32. package/docs/interfaces/FloorplanServerBounding.html +4 -4
  33. package/docs/interfaces/FloorplanServerComputedData.html +1 -1
  34. package/docs/interfaces/FloorplanServerData.html +2 -2
  35. package/docs/interfaces/FloorplanServerEntrance.html +7 -7
  36. package/docs/interfaces/FloorplanServerFloorData.html +2 -2
  37. package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
  38. package/docs/interfaces/FloorplanServerObserver.html +2 -2
  39. package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
  40. package/docs/interfaces/FloorplanServerPosition.html +2 -2
  41. package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
  42. package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
  43. package/docs/interfaces/ItemLabelPluginData.html +1 -1
  44. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
  45. package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
  46. package/docs/interfaces/LineJson.html +1 -1
  47. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  48. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  49. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  50. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  51. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  52. package/docs/interfaces/ModelFloorplanParameterType.html +1 -1
  53. package/docs/interfaces/ModelFloorplanViewEvent.html +2 -2
  54. package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
  55. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
  56. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
  57. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  58. package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
  59. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
  60. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
  61. package/docs/interfaces/ModelViewPluginExportType.html +1 -1
  62. package/docs/interfaces/OpenParameter.html +2 -2
  63. package/docs/interfaces/PanoCompassPluginData.html +1 -1
  64. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
  65. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
  66. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
  67. package/docs/interfaces/PanoFloorplanRadarPluginControllerParameter.html +1 -1
  68. package/docs/interfaces/PanoMeasureParameterType.html +1 -1
  69. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  70. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  71. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  72. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
  73. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
  74. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  75. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
  76. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  77. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
  78. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  79. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
  80. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
  81. package/docs/interfaces/Point.html +1 -1
  82. package/docs/interfaces/PointJson.html +1 -1
  83. package/docs/interfaces/Room.html +1 -1
  84. package/docs/interfaces/RoomInfo.html +1 -1
  85. package/docs/interfaces/RoomLabel.html +7 -7
  86. package/docs/interfaces/RoomRules.html +1 -1
  87. package/docs/interfaces/Rooms.html +1 -1
  88. package/docs/interfaces/TopviewFloorplanPluginParameterType.html +9 -9
  89. package/docs/modules.html +20 -20
  90. package/libs/ModelSimulationPlugin/index.d.ts +33 -0
  91. package/libs/ModelSimulationPlugin/index.js +166 -0
  92. package/libs/ModelSimulationPlugin/shaders/fragment.d.ts +2 -0
  93. package/libs/ModelSimulationPlugin/shaders/fragment.js +96 -0
  94. package/libs/ModelSimulationPlugin/shaders/vertex.d.ts +2 -0
  95. package/libs/ModelSimulationPlugin/shaders/vertex.js +23 -0
  96. package/libs/PanoSpatialTagPlugin/Components/tag.js +2 -2
  97. package/libs/PanoSpatialTagPlugin/Plugin.d.ts +2 -0
  98. package/libs/PanoSpatialTagPlugin/Plugin.js +55 -46
  99. package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.d.ts +1 -0
  100. package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.js +1 -0
  101. package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.js +120 -0
  102. package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.js +106 -0
  103. package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.js +463 -0
  104. package/libs/floorplan/ModelFloorplanPlugin/Components/Main.js +375 -0
  105. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.js +171 -0
  106. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.js +265 -0
  107. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +301 -0
  108. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.js +219 -0
  109. package/libs/shared-utils/five/useFivePlugin.d.ts +1 -0
  110. package/libs/shared-utils/five/useFivePlugin.js +8 -0
  111. package/libs/shared-utils/useDebounce.d.ts +8 -0
  112. package/libs/shared-utils/useDebounce.js +22 -0
  113. package/libs/shared-utils/useThrottle.d.ts +8 -0
  114. package/libs/shared-utils/useThrottle.js +25 -0
  115. package/package.json +1 -1
@@ -0,0 +1,120 @@
1
+ /* generated by Svelte v3.47.0 */
2
+ import {
3
+ SvelteComponent,
4
+ append,
5
+ append_styles,
6
+ attr,
7
+ detach,
8
+ element,
9
+ init,
10
+ insert,
11
+ noop,
12
+ safe_not_equal,
13
+ set_style
14
+ } from "svelte/internal";
15
+
16
+ import { CAMERA_IMAGE } from '../../Assets/camera';
17
+ import rad2Deg from '../../../shared-utils/math/rad2Deg';
18
+
19
+ function add_css(target) {
20
+ append_styles(target, "svelte-e8a2kn", ".floorplan__camera-position-e8a2kn{position:absolute;width:0;height:0}.floorplan__camera-rotate-e8a2kn{position:absolute;background-repeat:no-repeat;background-size:100%}");
21
+ }
22
+
23
+ function create_fragment(ctx) {
24
+ let div1;
25
+ let div0;
26
+
27
+ return {
28
+ c() {
29
+ div1 = element("div");
30
+ div0 = element("div");
31
+ attr(div0, "class", "floorplan__camera-rotate svelte-e8a2kn");
32
+ set_style(div0, "background-image", `url(${/*cameraImageUrl*/ ctx[0] || CAMERA_IMAGE})`);
33
+ set_style(div0, "width", /*domSizeStyle*/ ctx[4], false);
34
+ set_style(div0, "height", /*domSizeStyle*/ ctx[4], false);
35
+ set_style(div0, "left", '-' + /*domSizeStyle*/ ctx[4], false);
36
+ set_style(div0, "top", '-' + /*domSizeStyle*/ ctx[4], false);
37
+ set_style(div0, "transform", `rotate(${/*rotate*/ ctx[3]}deg)`, false);
38
+ set_style(div0, "transform-origin", `${/*domSizeStyle*/ ctx[4]} ${/*domSizeStyle*/ ctx[4]}`, false);
39
+ attr(div1, "class", "floorplan__camera-position svelte-e8a2kn");
40
+ set_style(div1, "left", /*positionLeft*/ ctx[1], false);
41
+ set_style(div1, "top", /*positionTop*/ ctx[2], false);
42
+ },
43
+ m(target, anchor) {
44
+ insert(target, div1, anchor);
45
+ append(div1, div0);
46
+ },
47
+ p(ctx, [dirty]) {
48
+ if (dirty & /*cameraImageUrl*/ 1) {
49
+ set_style(div0, "background-image", `url(${/*cameraImageUrl*/ ctx[0] || CAMERA_IMAGE})`);
50
+ }
51
+ },
52
+ i: noop,
53
+ o: noop,
54
+ d(detaching) {
55
+ if (detaching) detach(div1);
56
+ }
57
+ };
58
+ }
59
+
60
+ function instance($$self, $$props, $$invalidate) {
61
+ let { panoIndex } = $$props;
62
+ let { floorplanData } = $$props;
63
+ let { lastPanoramaLongitude } = $$props;
64
+ let { cameraImageUrl } = $$props;
65
+ const { observers } = floorplanData;
66
+ const observer = observers[panoIndex];
67
+ const leftRatio = observer.positionInImage.x;
68
+ const topRatio = observer.positionInImage.y;
69
+ const positionLeft = leftRatio * 100 + '%';
70
+ const positionTop = topRatio * 100 + '%';
71
+ const rotate = -rad2Deg(lastPanoramaLongitude) + 45;
72
+
73
+ // TODO: 统一这里的判断条件,目前写了多处
74
+ const bodyWidth = document.body.clientWidth;
75
+
76
+ const bodyHeight = document.body.clientHeight;
77
+ const size = bodyWidth < 500 || bodyHeight < 500 ? 17 : 37;
78
+ const domSizeStyle = `${size / 16}rem`;
79
+
80
+ $$self.$$set = $$props => {
81
+ if ('panoIndex' in $$props) $$invalidate(5, panoIndex = $$props.panoIndex);
82
+ if ('floorplanData' in $$props) $$invalidate(6, floorplanData = $$props.floorplanData);
83
+ if ('lastPanoramaLongitude' in $$props) $$invalidate(7, lastPanoramaLongitude = $$props.lastPanoramaLongitude);
84
+ if ('cameraImageUrl' in $$props) $$invalidate(0, cameraImageUrl = $$props.cameraImageUrl);
85
+ };
86
+
87
+ return [
88
+ cameraImageUrl,
89
+ positionLeft,
90
+ positionTop,
91
+ rotate,
92
+ domSizeStyle,
93
+ panoIndex,
94
+ floorplanData,
95
+ lastPanoramaLongitude
96
+ ];
97
+ }
98
+
99
+ class Component extends SvelteComponent {
100
+ constructor(options) {
101
+ super();
102
+
103
+ init(
104
+ this,
105
+ options,
106
+ instance,
107
+ create_fragment,
108
+ safe_not_equal,
109
+ {
110
+ panoIndex: 5,
111
+ floorplanData: 6,
112
+ lastPanoramaLongitude: 7,
113
+ cameraImageUrl: 0
114
+ },
115
+ add_css
116
+ );
117
+ }
118
+ }
119
+
120
+ export default Component;
@@ -0,0 +1,106 @@
1
+ /* generated by Svelte v3.47.0 */
2
+ import {
3
+ SvelteComponent,
4
+ append,
5
+ append_styles,
6
+ attr,
7
+ detach,
8
+ element,
9
+ empty,
10
+ init,
11
+ insert,
12
+ noop,
13
+ safe_not_equal,
14
+ set_style,
15
+ space
16
+ } from "svelte/internal";
17
+
18
+ import { COMPASS_IMAGE } from '../Assets/compass';
19
+
20
+ function add_css(target) {
21
+ append_styles(target, "svelte-5l80pv", ".floorplan-plugin__compass-5l80pv{position:absolute;left:50%;top:-46px;width:231px;height:41px;will-change:opacity;transform-origin:center 184px}.floorplan-plugin__compass-image-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-5l80pv{position:absolute;left:50%;top:15px;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:10px;color:#fff}");
22
+ }
23
+
24
+ // (11:0) {#if northRad}
25
+ function create_if_block(ctx) {
26
+ let div1;
27
+ let div0;
28
+ let t0;
29
+ let span;
30
+
31
+ return {
32
+ c() {
33
+ div1 = element("div");
34
+ div0 = element("div");
35
+ t0 = space();
36
+ span = element("span");
37
+ span.textContent = "北";
38
+ attr(div0, "class", "floorplan-plugin__compass-image svelte-5l80pv");
39
+ set_style(div0, "background-image", `url(${COMPASS_IMAGE})`);
40
+ attr(span, "class", "floorplan-plugin__compass-text svelte-5l80pv");
41
+ attr(div1, "class", "floorplan-plugin__compass svelte-5l80pv");
42
+ set_style(div1, "transform", /*compassTransformStyle*/ ctx[1], false);
43
+ },
44
+ m(target, anchor) {
45
+ insert(target, div1, anchor);
46
+ append(div1, div0);
47
+ append(div1, t0);
48
+ append(div1, span);
49
+ },
50
+ p: noop,
51
+ d(detaching) {
52
+ if (detaching) detach(div1);
53
+ }
54
+ };
55
+ }
56
+
57
+ function create_fragment(ctx) {
58
+ let if_block_anchor;
59
+ let if_block = /*northRad*/ ctx[0] && create_if_block(ctx);
60
+
61
+ return {
62
+ c() {
63
+ if (if_block) if_block.c();
64
+ if_block_anchor = empty();
65
+ },
66
+ m(target, anchor) {
67
+ if (if_block) if_block.m(target, anchor);
68
+ insert(target, if_block_anchor, anchor);
69
+ },
70
+ p(ctx, [dirty]) {
71
+ if (/*northRad*/ ctx[0]) if_block.p(ctx, dirty);
72
+ },
73
+ i: noop,
74
+ o: noop,
75
+ d(detaching) {
76
+ if (if_block) if_block.d(detaching);
77
+ if (detaching) detach(if_block_anchor);
78
+ }
79
+ };
80
+ }
81
+
82
+ function rad2Deg(rad) {
83
+ return rad / Math.PI * 180;
84
+ }
85
+
86
+ function instance($$self, $$props, $$invalidate) {
87
+ let { floorplanData } = $$props;
88
+ const northRad = floorplanData.entrance?.northRad;
89
+ const rotate = !northRad ? 0 : rad2Deg(northRad);
90
+ const compassTransformStyle = `translateX(-50%) translateZ(10px) rotate(${-rotate + 90}deg)`;
91
+
92
+ $$self.$$set = $$props => {
93
+ if ('floorplanData' in $$props) $$invalidate(2, floorplanData = $$props.floorplanData);
94
+ };
95
+
96
+ return [northRad, compassTransformStyle, floorplanData];
97
+ }
98
+
99
+ class Component extends SvelteComponent {
100
+ constructor(options) {
101
+ super();
102
+ init(this, options, instance, create_fragment, safe_not_equal, { floorplanData: 2 }, add_css);
103
+ }
104
+ }
105
+
106
+ export default Component;
@@ -0,0 +1,463 @@
1
+ /* generated by Svelte v3.47.0 */
2
+ import {
3
+ SvelteComponent,
4
+ append,
5
+ append_styles,
6
+ assign,
7
+ attr,
8
+ check_outros,
9
+ create_component,
10
+ destroy_component,
11
+ detach,
12
+ element,
13
+ get_spread_update,
14
+ group_outros,
15
+ init,
16
+ insert,
17
+ mount_component,
18
+ safe_not_equal,
19
+ space,
20
+ transition_in,
21
+ transition_out
22
+ } from "svelte/internal";
23
+
24
+ import RoomLabels from '../RoomLabels/RoomLabels';
25
+ import RuleLabels from '../RuleLabels/RuleLabels';
26
+ import BaseImage from '../../../Components/BaseImage';
27
+ import RoomMaterial from '../../../Components/RoomMaterials/RoomMaterial';
28
+ import RoomHighlight from '../../../Components/RoomHighlight/RoomHighlight';
29
+
30
+ function add_css(target) {
31
+ append_styles(target, "svelte-3pdgs4", ".floorplan-current-floor-3pdgs4{position:relative;width:100%;height:100%}");
32
+ }
33
+
34
+ // (19:2) {#if hoverEnable}
35
+ function create_if_block_2(ctx) {
36
+ let roomhighlight;
37
+ let current;
38
+
39
+ const roomhighlight_spread_levels = [
40
+ {
41
+ five: /*five*/ ctx[1],
42
+ pxmm: /*pxmm*/ ctx[0],
43
+ floorIndex: /*floorIndex*/ ctx[2],
44
+ floorplanData: /*floorplanData*/ ctx[6],
45
+ onRoomHeightClick: /*onRoomHeightClick*/ ctx[7]
46
+ }
47
+ ];
48
+
49
+ let roomhighlight_props = {};
50
+
51
+ for (let i = 0; i < roomhighlight_spread_levels.length; i += 1) {
52
+ roomhighlight_props = assign(roomhighlight_props, roomhighlight_spread_levels[i]);
53
+ }
54
+
55
+ roomhighlight = new RoomHighlight({ props: roomhighlight_props });
56
+
57
+ return {
58
+ c() {
59
+ create_component(roomhighlight.$$.fragment);
60
+ },
61
+ m(target, anchor) {
62
+ mount_component(roomhighlight, target, anchor);
63
+ current = true;
64
+ },
65
+ p(ctx, dirty) {
66
+ const roomhighlight_changes = (dirty & /*five, pxmm, floorIndex, floorplanData, onRoomHeightClick*/ 199)
67
+ ? get_spread_update(roomhighlight_spread_levels, [
68
+ {
69
+ five: /*five*/ ctx[1],
70
+ pxmm: /*pxmm*/ ctx[0],
71
+ floorIndex: /*floorIndex*/ ctx[2],
72
+ floorplanData: /*floorplanData*/ ctx[6],
73
+ onRoomHeightClick: /*onRoomHeightClick*/ ctx[7]
74
+ }
75
+ ])
76
+ : {};
77
+
78
+ roomhighlight.$set(roomhighlight_changes);
79
+ },
80
+ i(local) {
81
+ if (current) return;
82
+ transition_in(roomhighlight.$$.fragment, local);
83
+ current = true;
84
+ },
85
+ o(local) {
86
+ transition_out(roomhighlight.$$.fragment, local);
87
+ current = false;
88
+ },
89
+ d(detaching) {
90
+ destroy_component(roomhighlight, detaching);
91
+ }
92
+ };
93
+ }
94
+
95
+ // (23:2) {#if roomLabelsEnable}
96
+ function create_if_block_1(ctx) {
97
+ let roomlabels;
98
+ let current;
99
+
100
+ const roomlabels_spread_levels = [
101
+ {
102
+ floorplanData: /*floorplanData*/ ctx[6],
103
+ floorIndex: /*floorIndex*/ ctx[2],
104
+ getLabelElement: /*getLabelElement*/ ctx[8]
105
+ }
106
+ ];
107
+
108
+ let roomlabels_props = {};
109
+
110
+ for (let i = 0; i < roomlabels_spread_levels.length; i += 1) {
111
+ roomlabels_props = assign(roomlabels_props, roomlabels_spread_levels[i]);
112
+ }
113
+
114
+ roomlabels = new RoomLabels({ props: roomlabels_props });
115
+
116
+ return {
117
+ c() {
118
+ create_component(roomlabels.$$.fragment);
119
+ },
120
+ m(target, anchor) {
121
+ mount_component(roomlabels, target, anchor);
122
+ current = true;
123
+ },
124
+ p(ctx, dirty) {
125
+ const roomlabels_changes = (dirty & /*floorplanData, floorIndex, getLabelElement*/ 324)
126
+ ? get_spread_update(roomlabels_spread_levels, [
127
+ {
128
+ floorplanData: /*floorplanData*/ ctx[6],
129
+ floorIndex: /*floorIndex*/ ctx[2],
130
+ getLabelElement: /*getLabelElement*/ ctx[8]
131
+ }
132
+ ])
133
+ : {};
134
+
135
+ roomlabels.$set(roomlabels_changes);
136
+ },
137
+ i(local) {
138
+ if (current) return;
139
+ transition_in(roomlabels.$$.fragment, local);
140
+ current = true;
141
+ },
142
+ o(local) {
143
+ transition_out(roomlabels.$$.fragment, local);
144
+ current = false;
145
+ },
146
+ d(detaching) {
147
+ destroy_component(roomlabels, detaching);
148
+ }
149
+ };
150
+ }
151
+
152
+ // (26:2) {#if ruleLabelsEnable}
153
+ function create_if_block(ctx) {
154
+ let rulelabels;
155
+ let current;
156
+
157
+ const rulelabels_spread_levels = [
158
+ {
159
+ floorplanData: /*floorplanData*/ ctx[6],
160
+ floorIndex: /*floorIndex*/ ctx[2],
161
+ pxmm: /*pxmm*/ ctx[0]
162
+ }
163
+ ];
164
+
165
+ let rulelabels_props = {};
166
+
167
+ for (let i = 0; i < rulelabels_spread_levels.length; i += 1) {
168
+ rulelabels_props = assign(rulelabels_props, rulelabels_spread_levels[i]);
169
+ }
170
+
171
+ rulelabels = new RuleLabels({ props: rulelabels_props });
172
+
173
+ return {
174
+ c() {
175
+ create_component(rulelabels.$$.fragment);
176
+ },
177
+ m(target, anchor) {
178
+ mount_component(rulelabels, target, anchor);
179
+ current = true;
180
+ },
181
+ p(ctx, dirty) {
182
+ const rulelabels_changes = (dirty & /*floorplanData, floorIndex, pxmm*/ 69)
183
+ ? get_spread_update(rulelabels_spread_levels, [
184
+ {
185
+ floorplanData: /*floorplanData*/ ctx[6],
186
+ floorIndex: /*floorIndex*/ ctx[2],
187
+ pxmm: /*pxmm*/ ctx[0]
188
+ }
189
+ ])
190
+ : {};
191
+
192
+ rulelabels.$set(rulelabels_changes);
193
+ },
194
+ i(local) {
195
+ if (current) return;
196
+ transition_in(rulelabels.$$.fragment, local);
197
+ current = true;
198
+ },
199
+ o(local) {
200
+ transition_out(rulelabels.$$.fragment, local);
201
+ current = false;
202
+ },
203
+ d(detaching) {
204
+ destroy_component(rulelabels, detaching);
205
+ }
206
+ };
207
+ }
208
+
209
+ function create_fragment(ctx) {
210
+ let div;
211
+ let roommaterial;
212
+ let t0;
213
+ let t1;
214
+ let baseimage;
215
+ let t2;
216
+ let t3;
217
+ let current;
218
+
219
+ const roommaterial_spread_levels = [
220
+ {
221
+ floorIndex: /*floorIndex*/ ctx[2],
222
+ floorplanData: /*floorplanData*/ ctx[6],
223
+ pxmm: /*pxmm*/ ctx[0]
224
+ }
225
+ ];
226
+
227
+ let roommaterial_props = {};
228
+
229
+ for (let i = 0; i < roommaterial_spread_levels.length; i += 1) {
230
+ roommaterial_props = assign(roommaterial_props, roommaterial_spread_levels[i]);
231
+ }
232
+
233
+ roommaterial = new RoomMaterial({ props: roommaterial_props });
234
+ let if_block0 = /*hoverEnable*/ ctx[3] && create_if_block_2(ctx);
235
+
236
+ const baseimage_spread_levels = [
237
+ {
238
+ floorplanData: /*floorplanData*/ ctx[6],
239
+ floorIndex: /*floorIndex*/ ctx[2]
240
+ }
241
+ ];
242
+
243
+ let baseimage_props = {};
244
+
245
+ for (let i = 0; i < baseimage_spread_levels.length; i += 1) {
246
+ baseimage_props = assign(baseimage_props, baseimage_spread_levels[i]);
247
+ }
248
+
249
+ baseimage = new BaseImage({ props: baseimage_props });
250
+ let if_block1 = /*roomLabelsEnable*/ ctx[4] && create_if_block_1(ctx);
251
+ let if_block2 = /*ruleLabelsEnable*/ ctx[5] && create_if_block(ctx);
252
+
253
+ return {
254
+ c() {
255
+ div = element("div");
256
+ create_component(roommaterial.$$.fragment);
257
+ t0 = space();
258
+ if (if_block0) if_block0.c();
259
+ t1 = space();
260
+ create_component(baseimage.$$.fragment);
261
+ t2 = space();
262
+ if (if_block1) if_block1.c();
263
+ t3 = space();
264
+ if (if_block2) if_block2.c();
265
+ attr(div, "class", "floorplan-current-floor svelte-3pdgs4");
266
+ },
267
+ m(target, anchor) {
268
+ insert(target, div, anchor);
269
+ mount_component(roommaterial, div, null);
270
+ append(div, t0);
271
+ if (if_block0) if_block0.m(div, null);
272
+ append(div, t1);
273
+ mount_component(baseimage, div, null);
274
+ append(div, t2);
275
+ if (if_block1) if_block1.m(div, null);
276
+ append(div, t3);
277
+ if (if_block2) if_block2.m(div, null);
278
+ current = true;
279
+ },
280
+ p(ctx, [dirty]) {
281
+ const roommaterial_changes = (dirty & /*floorIndex, floorplanData, pxmm*/ 69)
282
+ ? get_spread_update(roommaterial_spread_levels, [
283
+ {
284
+ floorIndex: /*floorIndex*/ ctx[2],
285
+ floorplanData: /*floorplanData*/ ctx[6],
286
+ pxmm: /*pxmm*/ ctx[0]
287
+ }
288
+ ])
289
+ : {};
290
+
291
+ roommaterial.$set(roommaterial_changes);
292
+
293
+ if (/*hoverEnable*/ ctx[3]) {
294
+ if (if_block0) {
295
+ if_block0.p(ctx, dirty);
296
+
297
+ if (dirty & /*hoverEnable*/ 8) {
298
+ transition_in(if_block0, 1);
299
+ }
300
+ } else {
301
+ if_block0 = create_if_block_2(ctx);
302
+ if_block0.c();
303
+ transition_in(if_block0, 1);
304
+ if_block0.m(div, t1);
305
+ }
306
+ } else if (if_block0) {
307
+ group_outros();
308
+
309
+ transition_out(if_block0, 1, 1, () => {
310
+ if_block0 = null;
311
+ });
312
+
313
+ check_outros();
314
+ }
315
+
316
+ const baseimage_changes = (dirty & /*floorplanData, floorIndex*/ 68)
317
+ ? get_spread_update(baseimage_spread_levels, [
318
+ {
319
+ floorplanData: /*floorplanData*/ ctx[6],
320
+ floorIndex: /*floorIndex*/ ctx[2]
321
+ }
322
+ ])
323
+ : {};
324
+
325
+ baseimage.$set(baseimage_changes);
326
+
327
+ if (/*roomLabelsEnable*/ ctx[4]) {
328
+ if (if_block1) {
329
+ if_block1.p(ctx, dirty);
330
+
331
+ if (dirty & /*roomLabelsEnable*/ 16) {
332
+ transition_in(if_block1, 1);
333
+ }
334
+ } else {
335
+ if_block1 = create_if_block_1(ctx);
336
+ if_block1.c();
337
+ transition_in(if_block1, 1);
338
+ if_block1.m(div, t3);
339
+ }
340
+ } else if (if_block1) {
341
+ group_outros();
342
+
343
+ transition_out(if_block1, 1, 1, () => {
344
+ if_block1 = null;
345
+ });
346
+
347
+ check_outros();
348
+ }
349
+
350
+ if (/*ruleLabelsEnable*/ ctx[5]) {
351
+ if (if_block2) {
352
+ if_block2.p(ctx, dirty);
353
+
354
+ if (dirty & /*ruleLabelsEnable*/ 32) {
355
+ transition_in(if_block2, 1);
356
+ }
357
+ } else {
358
+ if_block2 = create_if_block(ctx);
359
+ if_block2.c();
360
+ transition_in(if_block2, 1);
361
+ if_block2.m(div, null);
362
+ }
363
+ } else if (if_block2) {
364
+ group_outros();
365
+
366
+ transition_out(if_block2, 1, 1, () => {
367
+ if_block2 = null;
368
+ });
369
+
370
+ check_outros();
371
+ }
372
+ },
373
+ i(local) {
374
+ if (current) return;
375
+ transition_in(roommaterial.$$.fragment, local);
376
+ transition_in(if_block0);
377
+ transition_in(baseimage.$$.fragment, local);
378
+ transition_in(if_block1);
379
+ transition_in(if_block2);
380
+ current = true;
381
+ },
382
+ o(local) {
383
+ transition_out(roommaterial.$$.fragment, local);
384
+ transition_out(if_block0);
385
+ transition_out(baseimage.$$.fragment, local);
386
+ transition_out(if_block1);
387
+ transition_out(if_block2);
388
+ current = false;
389
+ },
390
+ d(detaching) {
391
+ if (detaching) detach(div);
392
+ destroy_component(roommaterial);
393
+ if (if_block0) if_block0.d();
394
+ destroy_component(baseimage);
395
+ if (if_block1) if_block1.d();
396
+ if (if_block2) if_block2.d();
397
+ }
398
+ };
399
+ }
400
+
401
+ function instance($$self, $$props, $$invalidate) {
402
+ let { pxmm } = $$props;
403
+ let { five } = $$props;
404
+ let { floorIndex } = $$props;
405
+ let { hoverEnable } = $$props;
406
+ let { roomLabelsEnable } = $$props;
407
+ let { ruleLabelsEnable } = $$props;
408
+ let { floorplanData } = $$props;
409
+ let { onRoomHeightClick } = $$props;
410
+ let { getLabelElement } = $$props;
411
+
412
+ $$self.$$set = $$props => {
413
+ if ('pxmm' in $$props) $$invalidate(0, pxmm = $$props.pxmm);
414
+ if ('five' in $$props) $$invalidate(1, five = $$props.five);
415
+ if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
416
+ if ('hoverEnable' in $$props) $$invalidate(3, hoverEnable = $$props.hoverEnable);
417
+ if ('roomLabelsEnable' in $$props) $$invalidate(4, roomLabelsEnable = $$props.roomLabelsEnable);
418
+ if ('ruleLabelsEnable' in $$props) $$invalidate(5, ruleLabelsEnable = $$props.ruleLabelsEnable);
419
+ if ('floorplanData' in $$props) $$invalidate(6, floorplanData = $$props.floorplanData);
420
+ if ('onRoomHeightClick' in $$props) $$invalidate(7, onRoomHeightClick = $$props.onRoomHeightClick);
421
+ if ('getLabelElement' in $$props) $$invalidate(8, getLabelElement = $$props.getLabelElement);
422
+ };
423
+
424
+ return [
425
+ pxmm,
426
+ five,
427
+ floorIndex,
428
+ hoverEnable,
429
+ roomLabelsEnable,
430
+ ruleLabelsEnable,
431
+ floorplanData,
432
+ onRoomHeightClick,
433
+ getLabelElement
434
+ ];
435
+ }
436
+
437
+ class Component extends SvelteComponent {
438
+ constructor(options) {
439
+ super();
440
+
441
+ init(
442
+ this,
443
+ options,
444
+ instance,
445
+ create_fragment,
446
+ safe_not_equal,
447
+ {
448
+ pxmm: 0,
449
+ five: 1,
450
+ floorIndex: 2,
451
+ hoverEnable: 3,
452
+ roomLabelsEnable: 4,
453
+ ruleLabelsEnable: 5,
454
+ floorplanData: 6,
455
+ onRoomHeightClick: 7,
456
+ getLabelElement: 8
457
+ },
458
+ add_css
459
+ );
460
+ }
461
+ }
462
+
463
+ export default Component;