@realsee/dnalogel 2.0.0-alpha.36 → 2.0.0-alpha.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ItemLabelPlugin/index.js +60 -36
- package/dist/ItemLabelPlugin/typings.d.ts +4 -0
- package/dist/ModelViewPlugin/Plugin.d.ts +4 -4
- package/dist/ModelViewPlugin/index.js +2 -3
- package/dist/PanoRulerProPlugin/Controller.d.ts +15 -0
- package/dist/PanoRulerProPlugin/index.d.ts +8 -0
- package/dist/PanoRulerProPlugin/index.js +1006 -0
- package/dist/PanoRulerProPlugin/typings.d.ts +46 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -1
- package/dist/floorplan/ModelFloorplanPlugin/index.js +8 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +1036 -243
- package/dist/index.js +1037 -242
- package/dist/index.umd.js +1037 -242
- package/dist/shared-utils/logger.d.ts +16 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/Magnifier.html +4 -4
- package/docs/classes/ModelRoomLabelController.html +4 -4
- package/docs/enums/CameraMovementEffect.html +2 -2
- package/docs/enums/DIRECTION.html +1 -1
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/Rotation.html +2 -2
- package/docs/index.html +2 -2
- package/docs/interfaces/CSS3DRenderPluginExportType.html +2 -2
- package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
- package/docs/interfaces/FloorplanBounding.html +4 -4
- package/docs/interfaces/FloorplanData.html +2 -2
- package/docs/interfaces/FloorplanEntrance.html +7 -7
- package/docs/interfaces/FloorplanExtraObject.html +3 -3
- package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
- package/docs/interfaces/FloorplanFloorData.html +2 -2
- package/docs/interfaces/FloorplanImagePosition.html +2 -2
- package/docs/interfaces/FloorplanObserver.html +2 -2
- package/docs/interfaces/FloorplanOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanPosition.html +2 -2
- package/docs/interfaces/FloorplanRoomItem.html +6 -6
- package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
- package/docs/interfaces/FloorplanServerBounding.html +4 -4
- package/docs/interfaces/FloorplanServerComputedData.html +1 -1
- package/docs/interfaces/FloorplanServerData.html +2 -2
- package/docs/interfaces/FloorplanServerEntrance.html +7 -7
- package/docs/interfaces/FloorplanServerFloorData.html +2 -2
- package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
- package/docs/interfaces/FloorplanServerObserver.html +2 -2
- package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanServerPosition.html +2 -2
- package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
- package/docs/interfaces/ItemLabelPluginData.html +1 -1
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/LineJson.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/ModelViewPluginExportType.html +1 -1
- package/docs/interfaces/OpenParameter.html +2 -2
- package/docs/interfaces/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
- package/docs/interfaces/PanoMeasureParameterType.html +1 -1
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginExportType.html +1 -0
- package/docs/interfaces/PanoRulerProPluginOptions.html +1 -0
- package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -0
- package/docs/interfaces/PanoRulerProPluginState.html +1 -0
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
- package/docs/interfaces/Point.html +1 -1
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/Room.html +1 -1
- package/docs/interfaces/RoomInfo.html +1 -1
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/RoomRules.html +1 -1
- package/docs/interfaces/Rooms.html +1 -1
- package/docs/modules.html +19 -17
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +34 -21
- package/libs/ItemLabelPlugin/Plugin.js +16 -10
- package/libs/ItemLabelPlugin/typings.d.ts +4 -0
- package/libs/ItemLabelPlugin/utils/parseData.js +1 -1
- package/libs/ModelViewPlugin/Plugin.d.ts +4 -4
- package/libs/ModelViewPlugin/Plugin.js +2 -3
- package/libs/PanoRulerProPlugin/Controller.d.ts +15 -0
- package/libs/PanoRulerProPlugin/Controller.js +110 -0
- package/libs/PanoRulerProPlugin/RulerItem.js +314 -0
- package/libs/PanoRulerProPlugin/RulerItems.js +377 -0
- package/libs/PanoRulerProPlugin/index.d.ts +8 -0
- package/libs/PanoRulerProPlugin/index.js +8 -0
- package/libs/PanoRulerProPlugin/typings.d.ts +46 -0
- package/libs/PanoRulerProPlugin/typings.js +1 -0
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +8 -1
- package/libs/index.d.ts +2 -0
- package/libs/index.js +3 -0
- package/libs/shared-utils/logger.d.ts +16 -0
- package/libs/shared-utils/logger.js +47 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -64,8 +64,7 @@ const ModelViewPlugin = (five) => {
|
|
|
64
64
|
};
|
|
65
65
|
const handleModelLoaded = () => {
|
|
66
66
|
function cloneMaterial(material) {
|
|
67
|
-
material
|
|
68
|
-
material.uniforms.modelAlpha.value = 1;
|
|
67
|
+
material.clone().uniforms.modelAlpha.value = 1;
|
|
69
68
|
if (material.uniforms.map.value) {
|
|
70
69
|
material.uniforms.map.value.needsUpdate = true;
|
|
71
70
|
}
|
|
@@ -113,7 +112,7 @@ const ModelViewPlugin = (five) => {
|
|
|
113
112
|
return;
|
|
114
113
|
const element = renderer.domElement;
|
|
115
114
|
const container = element.parentNode;
|
|
116
|
-
if (container
|
|
115
|
+
if (container === null || container === void 0 ? void 0 : container.nodeName) {
|
|
117
116
|
const { width = container.offsetWidth, height = container.offsetHeight } = size;
|
|
118
117
|
renderer.setSize(width, height);
|
|
119
118
|
// 修改摄像机 aspect 比值
|
|
@@ -463,11 +462,11 @@ const ROOM_LABEL_BG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAY
|
|
|
463
462
|
|
|
464
463
|
/* src/ModelRoomLabelPlugin/RoomLabelItem.svelte generated by Svelte v3.47.0 */
|
|
465
464
|
|
|
466
|
-
function add_css$
|
|
465
|
+
function add_css$p(target) {
|
|
467
466
|
append_styles(target, "svelte-1ak9fbs", ".room-label-item.svelte-1ak9fbs{position:absolute;font-size:0.41667rem;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.room-label-item__text.svelte-1ak9fbs{position:absolute;left:0;top:-3.33333rem;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center;height:1.04167rem;min-width:1.66667rem;padding:0 0.3125rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap}.room-label-item__bar.svelte-1ak9fbs{position:absolute;top:-2.29167rem;height:2.5rem;width:1px;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))}.wide.svelte-1ak9fbs{font-size:0.52083rem}");
|
|
468
467
|
}
|
|
469
468
|
|
|
470
|
-
function create_fragment$
|
|
469
|
+
function create_fragment$u(ctx) {
|
|
471
470
|
let div1;
|
|
472
471
|
let span;
|
|
473
472
|
let t0_value = /*roomLabel*/ ctx[0].name + "";
|
|
@@ -534,7 +533,7 @@ function create_fragment$s(ctx) {
|
|
|
534
533
|
};
|
|
535
534
|
}
|
|
536
535
|
|
|
537
|
-
function instance$
|
|
536
|
+
function instance$u($$self, $$props, $$invalidate) {
|
|
538
537
|
let { five } = $$props;
|
|
539
538
|
let { roomLabel } = $$props;
|
|
540
539
|
|
|
@@ -557,7 +556,7 @@ function instance$s($$self, $$props, $$invalidate) {
|
|
|
557
556
|
class RoomLabelItem extends SvelteComponent {
|
|
558
557
|
constructor(options) {
|
|
559
558
|
super();
|
|
560
|
-
init(this, options, instance$
|
|
559
|
+
init(this, options, instance$u, create_fragment$u, safe_not_equal, { five: 2, roomLabel: 0 }, add_css$p);
|
|
561
560
|
}
|
|
562
561
|
}
|
|
563
562
|
|
|
@@ -565,18 +564,18 @@ class RoomLabelItem extends SvelteComponent {
|
|
|
565
564
|
|
|
566
565
|
const { Map: Map_1 } = globals;
|
|
567
566
|
|
|
568
|
-
function add_css$
|
|
567
|
+
function add_css$o(target) {
|
|
569
568
|
append_styles(target, "svelte-9eg4zi", ".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}");
|
|
570
569
|
}
|
|
571
570
|
|
|
572
|
-
function get_each_context$
|
|
571
|
+
function get_each_context$c(ctx, list, i) {
|
|
573
572
|
const child_ctx = ctx.slice();
|
|
574
573
|
child_ctx[12] = list[i];
|
|
575
574
|
return child_ctx;
|
|
576
575
|
}
|
|
577
576
|
|
|
578
577
|
// (82:2) {#each roomLabels as roomLableItem (roomLableItem.id)}
|
|
579
|
-
function create_each_block$
|
|
578
|
+
function create_each_block$c(key_1, ctx) {
|
|
580
579
|
let first;
|
|
581
580
|
let roomlabelitem;
|
|
582
581
|
let current;
|
|
@@ -624,7 +623,7 @@ function create_each_block$a(key_1, ctx) {
|
|
|
624
623
|
};
|
|
625
624
|
}
|
|
626
625
|
|
|
627
|
-
function create_fragment$
|
|
626
|
+
function create_fragment$t(ctx) {
|
|
628
627
|
let div;
|
|
629
628
|
let each_blocks = [];
|
|
630
629
|
let each_1_lookup = new Map_1();
|
|
@@ -634,9 +633,9 @@ function create_fragment$r(ctx) {
|
|
|
634
633
|
const get_key = ctx => /*roomLableItem*/ ctx[12].id;
|
|
635
634
|
|
|
636
635
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
637
|
-
let child_ctx = get_each_context$
|
|
636
|
+
let child_ctx = get_each_context$c(ctx, each_value, i);
|
|
638
637
|
let key = get_key(child_ctx);
|
|
639
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block$
|
|
638
|
+
each_1_lookup.set(key, each_blocks[i] = create_each_block$c(key, child_ctx));
|
|
640
639
|
}
|
|
641
640
|
|
|
642
641
|
return {
|
|
@@ -664,7 +663,7 @@ function create_fragment$r(ctx) {
|
|
|
664
663
|
if (dirty & /*roomLabels, five*/ 3) {
|
|
665
664
|
each_value = /*roomLabels*/ ctx[0];
|
|
666
665
|
group_outros();
|
|
667
|
-
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$
|
|
666
|
+
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$c, null, get_each_context$c);
|
|
668
667
|
check_outros();
|
|
669
668
|
}
|
|
670
669
|
},
|
|
@@ -696,7 +695,7 @@ function create_fragment$r(ctx) {
|
|
|
696
695
|
};
|
|
697
696
|
}
|
|
698
697
|
|
|
699
|
-
function instance$
|
|
698
|
+
function instance$t($$self, $$props, $$invalidate) {
|
|
700
699
|
let rendererSize;
|
|
701
700
|
let { five } = $$props;
|
|
702
701
|
let { roomLabels } = $$props;
|
|
@@ -821,7 +820,7 @@ function instance$r($$self, $$props, $$invalidate) {
|
|
|
821
820
|
class RoomLabelItems extends SvelteComponent {
|
|
822
821
|
constructor(options) {
|
|
823
822
|
super();
|
|
824
|
-
init(this, options, instance$
|
|
823
|
+
init(this, options, instance$t, create_fragment$t, safe_not_equal, { five: 1, roomLabels: 0 }, add_css$o);
|
|
825
824
|
}
|
|
826
825
|
}
|
|
827
826
|
|
|
@@ -1109,11 +1108,11 @@ function rad2Deg$1(rad) {
|
|
|
1109
1108
|
|
|
1110
1109
|
/* src/floorplan/Components/Camera.svelte generated by Svelte v3.47.0 */
|
|
1111
1110
|
|
|
1112
|
-
function add_css$
|
|
1111
|
+
function add_css$n(target) {
|
|
1113
1112
|
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%}");
|
|
1114
1113
|
}
|
|
1115
1114
|
|
|
1116
|
-
function create_fragment$
|
|
1115
|
+
function create_fragment$s(ctx) {
|
|
1117
1116
|
let div1;
|
|
1118
1117
|
let div0;
|
|
1119
1118
|
|
|
@@ -1150,7 +1149,7 @@ function create_fragment$q(ctx) {
|
|
|
1150
1149
|
};
|
|
1151
1150
|
}
|
|
1152
1151
|
|
|
1153
|
-
function instance$
|
|
1152
|
+
function instance$s($$self, $$props, $$invalidate) {
|
|
1154
1153
|
let { panoIndex } = $$props;
|
|
1155
1154
|
let { floorplanData } = $$props;
|
|
1156
1155
|
let { lastPanoramaLongitude } = $$props;
|
|
@@ -1196,8 +1195,8 @@ class Camera$1 extends SvelteComponent {
|
|
|
1196
1195
|
init(
|
|
1197
1196
|
this,
|
|
1198
1197
|
options,
|
|
1199
|
-
instance$
|
|
1200
|
-
create_fragment$
|
|
1198
|
+
instance$s,
|
|
1199
|
+
create_fragment$s,
|
|
1201
1200
|
safe_not_equal,
|
|
1202
1201
|
{
|
|
1203
1202
|
panoIndex: 5,
|
|
@@ -1205,7 +1204,7 @@ class Camera$1 extends SvelteComponent {
|
|
|
1205
1204
|
lastPanoramaLongitude: 7,
|
|
1206
1205
|
cameraImageUrl: 0
|
|
1207
1206
|
},
|
|
1208
|
-
add_css$
|
|
1207
|
+
add_css$n
|
|
1209
1208
|
);
|
|
1210
1209
|
}
|
|
1211
1210
|
}
|
|
@@ -1214,12 +1213,12 @@ const COMPASS_IMAGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArUAAAB7CAM
|
|
|
1214
1213
|
|
|
1215
1214
|
/* src/floorplan/Components/Compass.svelte generated by Svelte v3.47.0 */
|
|
1216
1215
|
|
|
1217
|
-
function add_css$
|
|
1216
|
+
function add_css$m(target) {
|
|
1218
1217
|
append_styles(target, "svelte-z9kwkx", ".floorplan-plugin__compass.svelte-z9kwkx{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-z9kwkx{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-z9kwkx{position:absolute;left:50%;top:0.78125rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.52083rem;color:#fff}");
|
|
1219
1218
|
}
|
|
1220
1219
|
|
|
1221
1220
|
// (14:0) {#if canCompassShow}
|
|
1222
|
-
function create_if_block$
|
|
1221
|
+
function create_if_block$b(ctx) {
|
|
1223
1222
|
let div1;
|
|
1224
1223
|
let div0;
|
|
1225
1224
|
let t0;
|
|
@@ -1255,9 +1254,9 @@ function create_if_block$a(ctx) {
|
|
|
1255
1254
|
};
|
|
1256
1255
|
}
|
|
1257
1256
|
|
|
1258
|
-
function create_fragment$
|
|
1257
|
+
function create_fragment$r(ctx) {
|
|
1259
1258
|
let if_block_anchor;
|
|
1260
|
-
let if_block = /*canCompassShow*/ ctx[1] && create_if_block$
|
|
1259
|
+
let if_block = /*canCompassShow*/ ctx[1] && create_if_block$b(ctx);
|
|
1261
1260
|
|
|
1262
1261
|
return {
|
|
1263
1262
|
c() {
|
|
@@ -1284,7 +1283,7 @@ function rad2Deg(rad) {
|
|
|
1284
1283
|
return rad / Math.PI * 180;
|
|
1285
1284
|
}
|
|
1286
1285
|
|
|
1287
|
-
function instance$
|
|
1286
|
+
function instance$r($$self, $$props, $$invalidate) {
|
|
1288
1287
|
var _a;
|
|
1289
1288
|
let { floorplanData } = $$props;
|
|
1290
1289
|
let { northDesc } = $$props;
|
|
@@ -1308,17 +1307,17 @@ function instance$p($$self, $$props, $$invalidate) {
|
|
|
1308
1307
|
class Compass extends SvelteComponent {
|
|
1309
1308
|
constructor(options) {
|
|
1310
1309
|
super();
|
|
1311
|
-
init(this, options, instance$
|
|
1310
|
+
init(this, options, instance$r, create_fragment$r, safe_not_equal, { floorplanData: 3, northDesc: 0 }, add_css$m);
|
|
1312
1311
|
}
|
|
1313
1312
|
}
|
|
1314
1313
|
|
|
1315
1314
|
/* src/floorplan/Components/Normalmage.svelte generated by Svelte v3.47.0 */
|
|
1316
1315
|
|
|
1317
|
-
function add_css$
|
|
1316
|
+
function add_css$l(target) {
|
|
1318
1317
|
append_styles(target, "svelte-1gfoniz", "img.svelte-1gfoniz{width:100%;height:100%}");
|
|
1319
1318
|
}
|
|
1320
1319
|
|
|
1321
|
-
function create_fragment$
|
|
1320
|
+
function create_fragment$q(ctx) {
|
|
1322
1321
|
let img;
|
|
1323
1322
|
let img_src_value;
|
|
1324
1323
|
|
|
@@ -1345,7 +1344,7 @@ function create_fragment$o(ctx) {
|
|
|
1345
1344
|
};
|
|
1346
1345
|
}
|
|
1347
1346
|
|
|
1348
|
-
function instance$
|
|
1347
|
+
function instance$q($$self, $$props, $$invalidate) {
|
|
1349
1348
|
let { url } = $$props;
|
|
1350
1349
|
|
|
1351
1350
|
$$self.$$set = $$props => {
|
|
@@ -1358,17 +1357,17 @@ function instance$o($$self, $$props, $$invalidate) {
|
|
|
1358
1357
|
class Normalmage extends SvelteComponent {
|
|
1359
1358
|
constructor(options) {
|
|
1360
1359
|
super();
|
|
1361
|
-
init(this, options, instance$
|
|
1360
|
+
init(this, options, instance$q, create_fragment$q, safe_not_equal, { url: 0 }, add_css$l);
|
|
1362
1361
|
}
|
|
1363
1362
|
}
|
|
1364
1363
|
|
|
1365
1364
|
/* src/floorplan/Components/SvgImage.svelte generated by Svelte v3.47.0 */
|
|
1366
1365
|
|
|
1367
|
-
function add_css$
|
|
1366
|
+
function add_css$k(target) {
|
|
1368
1367
|
append_styles(target, "svelte-ub47ya", ".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}");
|
|
1369
1368
|
}
|
|
1370
1369
|
|
|
1371
|
-
function create_fragment$
|
|
1370
|
+
function create_fragment$p(ctx) {
|
|
1372
1371
|
let div;
|
|
1373
1372
|
let html_tag;
|
|
1374
1373
|
let t;
|
|
@@ -1401,7 +1400,7 @@ function create_fragment$n(ctx) {
|
|
|
1401
1400
|
};
|
|
1402
1401
|
}
|
|
1403
1402
|
|
|
1404
|
-
function instance$
|
|
1403
|
+
function instance$p($$self, $$props, $$invalidate) {
|
|
1405
1404
|
let { content } = $$props;
|
|
1406
1405
|
|
|
1407
1406
|
const svgStyle = `
|
|
@@ -1425,13 +1424,13 @@ function instance$n($$self, $$props, $$invalidate) {
|
|
|
1425
1424
|
class SvgImage extends SvelteComponent {
|
|
1426
1425
|
constructor(options) {
|
|
1427
1426
|
super();
|
|
1428
|
-
init(this, options, instance$
|
|
1427
|
+
init(this, options, instance$p, create_fragment$p, safe_not_equal, { content: 0 }, add_css$k);
|
|
1429
1428
|
}
|
|
1430
1429
|
}
|
|
1431
1430
|
|
|
1432
1431
|
/* src/floorplan/Components/BaseImage.svelte generated by Svelte v3.47.0 */
|
|
1433
1432
|
|
|
1434
|
-
function add_css$
|
|
1433
|
+
function add_css$j(target) {
|
|
1435
1434
|
append_styles(target, "svelte-ozpg4a", ".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}");
|
|
1436
1435
|
}
|
|
1437
1436
|
|
|
@@ -1470,7 +1469,7 @@ function create_if_block_1$5(ctx) {
|
|
|
1470
1469
|
}
|
|
1471
1470
|
|
|
1472
1471
|
// (11:2) {#if svgContent}
|
|
1473
|
-
function create_if_block$
|
|
1472
|
+
function create_if_block$a(ctx) {
|
|
1474
1473
|
let svgimage;
|
|
1475
1474
|
let current;
|
|
1476
1475
|
|
|
@@ -1506,12 +1505,12 @@ function create_if_block$9(ctx) {
|
|
|
1506
1505
|
};
|
|
1507
1506
|
}
|
|
1508
1507
|
|
|
1509
|
-
function create_fragment$
|
|
1508
|
+
function create_fragment$o(ctx) {
|
|
1510
1509
|
let div;
|
|
1511
1510
|
let current_block_type_index;
|
|
1512
1511
|
let if_block;
|
|
1513
1512
|
let current;
|
|
1514
|
-
const if_block_creators = [create_if_block$
|
|
1513
|
+
const if_block_creators = [create_if_block$a, create_if_block_1$5];
|
|
1515
1514
|
const if_blocks = [];
|
|
1516
1515
|
|
|
1517
1516
|
function select_block_type(ctx, dirty) {
|
|
@@ -1594,7 +1593,7 @@ function create_fragment$m(ctx) {
|
|
|
1594
1593
|
};
|
|
1595
1594
|
}
|
|
1596
1595
|
|
|
1597
|
-
function instance$
|
|
1596
|
+
function instance$o($$self, $$props, $$invalidate) {
|
|
1598
1597
|
let imageData;
|
|
1599
1598
|
let svgContent;
|
|
1600
1599
|
var _a, _b;
|
|
@@ -1626,13 +1625,13 @@ function instance$m($$self, $$props, $$invalidate) {
|
|
|
1626
1625
|
class BaseImage extends SvelteComponent {
|
|
1627
1626
|
constructor(options) {
|
|
1628
1627
|
super();
|
|
1629
|
-
init(this, options, instance$
|
|
1628
|
+
init(this, options, instance$o, create_fragment$o, safe_not_equal, { floorIndex: 2, floorplanData: 3 }, add_css$j);
|
|
1630
1629
|
}
|
|
1631
1630
|
}
|
|
1632
1631
|
|
|
1633
1632
|
/* src/floorplan/Components/RoomLabels/RoomLabel.svelte generated by Svelte v3.47.0 */
|
|
1634
1633
|
|
|
1635
|
-
function add_css$
|
|
1634
|
+
function add_css$i(target) {
|
|
1636
1635
|
append_styles(target, "svelte-12pzct5", ".floorplan-plugin__room-label-item.svelte-12pzct5{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__room-size.svelte-12pzct5{opacity:0.45}");
|
|
1637
1636
|
}
|
|
1638
1637
|
|
|
@@ -1663,7 +1662,7 @@ function create_if_block_1$4(ctx) {
|
|
|
1663
1662
|
}
|
|
1664
1663
|
|
|
1665
1664
|
// (89:2) {#if getLabelElement === undefined}
|
|
1666
|
-
function create_if_block$
|
|
1665
|
+
function create_if_block$9(ctx) {
|
|
1667
1666
|
let span0;
|
|
1668
1667
|
let t0_value = /*room*/ ctx[0].name + "";
|
|
1669
1668
|
let t0;
|
|
@@ -1697,11 +1696,11 @@ function create_if_block$8(ctx) {
|
|
|
1697
1696
|
};
|
|
1698
1697
|
}
|
|
1699
1698
|
|
|
1700
|
-
function create_fragment$
|
|
1699
|
+
function create_fragment$n(ctx) {
|
|
1701
1700
|
let div;
|
|
1702
1701
|
|
|
1703
1702
|
function select_block_type(ctx, dirty) {
|
|
1704
|
-
if (/*getLabelElement*/ ctx[1] === undefined) return create_if_block$
|
|
1703
|
+
if (/*getLabelElement*/ ctx[1] === undefined) return create_if_block$9;
|
|
1705
1704
|
if (/*userConfigElement*/ ctx[4]) return create_if_block_1$4;
|
|
1706
1705
|
}
|
|
1707
1706
|
|
|
@@ -1771,7 +1770,7 @@ function isPointInPolygon(point, polygon) {
|
|
|
1771
1770
|
return inside;
|
|
1772
1771
|
}
|
|
1773
1772
|
|
|
1774
|
-
function instance$
|
|
1773
|
+
function instance$n($$self, $$props, $$invalidate) {
|
|
1775
1774
|
let isLabelInRoom;
|
|
1776
1775
|
let userConfigElement;
|
|
1777
1776
|
let labelVisible;
|
|
@@ -1915,8 +1914,8 @@ class RoomLabel extends SvelteComponent {
|
|
|
1915
1914
|
init(
|
|
1916
1915
|
this,
|
|
1917
1916
|
options,
|
|
1918
|
-
instance$
|
|
1919
|
-
create_fragment$
|
|
1917
|
+
instance$n,
|
|
1918
|
+
create_fragment$n,
|
|
1920
1919
|
safe_not_equal,
|
|
1921
1920
|
{
|
|
1922
1921
|
pxmm: 9,
|
|
@@ -1925,25 +1924,25 @@ class RoomLabel extends SvelteComponent {
|
|
|
1925
1924
|
getLabelElement: 1,
|
|
1926
1925
|
adaptiveRoomLabelVisibleEnable: 11
|
|
1927
1926
|
},
|
|
1928
|
-
add_css$
|
|
1927
|
+
add_css$i
|
|
1929
1928
|
);
|
|
1930
1929
|
}
|
|
1931
1930
|
}
|
|
1932
1931
|
|
|
1933
1932
|
/* src/floorplan/Components/RoomLabels/RoomLabels.svelte generated by Svelte v3.47.0 */
|
|
1934
1933
|
|
|
1935
|
-
function add_css$
|
|
1934
|
+
function add_css$h(target) {
|
|
1936
1935
|
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}");
|
|
1937
1936
|
}
|
|
1938
1937
|
|
|
1939
|
-
function get_each_context$
|
|
1938
|
+
function get_each_context$b(ctx, list, i) {
|
|
1940
1939
|
const child_ctx = ctx.slice();
|
|
1941
1940
|
child_ctx[9] = list[i];
|
|
1942
1941
|
return child_ctx;
|
|
1943
1942
|
}
|
|
1944
1943
|
|
|
1945
1944
|
// (17:0) {#if rooms}
|
|
1946
|
-
function create_if_block$
|
|
1945
|
+
function create_if_block$8(ctx) {
|
|
1947
1946
|
let div;
|
|
1948
1947
|
let each_blocks = [];
|
|
1949
1948
|
let each_1_lookup = new Map();
|
|
@@ -1953,9 +1952,9 @@ function create_if_block$7(ctx) {
|
|
|
1953
1952
|
const get_key = ctx => /*room*/ ctx[9].id;
|
|
1954
1953
|
|
|
1955
1954
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
1956
|
-
let child_ctx = get_each_context$
|
|
1955
|
+
let child_ctx = get_each_context$b(ctx, each_value, i);
|
|
1957
1956
|
let key = get_key(child_ctx);
|
|
1958
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block$
|
|
1957
|
+
each_1_lookup.set(key, each_blocks[i] = create_each_block$b(key, child_ctx));
|
|
1959
1958
|
}
|
|
1960
1959
|
|
|
1961
1960
|
return {
|
|
@@ -1983,7 +1982,7 @@ function create_if_block$7(ctx) {
|
|
|
1983
1982
|
if (dirty & /*pxmm, rooms, getLabelElement, hoveredRoom, adaptiveRoomLabelVisibleEnable*/ 55) {
|
|
1984
1983
|
each_value = /*rooms*/ ctx[5];
|
|
1985
1984
|
group_outros();
|
|
1986
|
-
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$
|
|
1985
|
+
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$b, null, get_each_context$b);
|
|
1987
1986
|
check_outros();
|
|
1988
1987
|
}
|
|
1989
1988
|
},
|
|
@@ -2016,7 +2015,7 @@ function create_if_block$7(ctx) {
|
|
|
2016
2015
|
}
|
|
2017
2016
|
|
|
2018
2017
|
// (19:4) {#each rooms as room (room.id)}
|
|
2019
|
-
function create_each_block$
|
|
2018
|
+
function create_each_block$b(key_1, ctx) {
|
|
2020
2019
|
let first;
|
|
2021
2020
|
let roomlabel;
|
|
2022
2021
|
let current;
|
|
@@ -2085,10 +2084,10 @@ function create_each_block$9(key_1, ctx) {
|
|
|
2085
2084
|
};
|
|
2086
2085
|
}
|
|
2087
2086
|
|
|
2088
|
-
function create_fragment$
|
|
2087
|
+
function create_fragment$m(ctx) {
|
|
2089
2088
|
let if_block_anchor;
|
|
2090
2089
|
let current;
|
|
2091
|
-
let if_block = /*rooms*/ ctx[5] && create_if_block$
|
|
2090
|
+
let if_block = /*rooms*/ ctx[5] && create_if_block$8(ctx);
|
|
2092
2091
|
|
|
2093
2092
|
return {
|
|
2094
2093
|
c() {
|
|
@@ -2109,7 +2108,7 @@ function create_fragment$k(ctx) {
|
|
|
2109
2108
|
transition_in(if_block, 1);
|
|
2110
2109
|
}
|
|
2111
2110
|
} else {
|
|
2112
|
-
if_block = create_if_block$
|
|
2111
|
+
if_block = create_if_block$8(ctx);
|
|
2113
2112
|
if_block.c();
|
|
2114
2113
|
transition_in(if_block, 1);
|
|
2115
2114
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
@@ -2140,7 +2139,7 @@ function create_fragment$k(ctx) {
|
|
|
2140
2139
|
};
|
|
2141
2140
|
}
|
|
2142
2141
|
|
|
2143
|
-
function instance$
|
|
2142
|
+
function instance$m($$self, $$props, $$invalidate) {
|
|
2144
2143
|
let rooms;
|
|
2145
2144
|
let { floorIndex } = $$props;
|
|
2146
2145
|
let { floorplanData } = $$props;
|
|
@@ -2197,8 +2196,8 @@ class RoomLabels extends SvelteComponent {
|
|
|
2197
2196
|
init(
|
|
2198
2197
|
this,
|
|
2199
2198
|
options,
|
|
2200
|
-
instance$
|
|
2201
|
-
create_fragment$
|
|
2199
|
+
instance$m,
|
|
2200
|
+
create_fragment$m,
|
|
2202
2201
|
safe_not_equal,
|
|
2203
2202
|
{
|
|
2204
2203
|
floorIndex: 6,
|
|
@@ -2207,18 +2206,18 @@ class RoomLabels extends SvelteComponent {
|
|
|
2207
2206
|
getLabelElement: 1,
|
|
2208
2207
|
adaptiveRoomLabelVisibleEnable: 2
|
|
2209
2208
|
},
|
|
2210
|
-
add_css$
|
|
2209
|
+
add_css$h
|
|
2211
2210
|
);
|
|
2212
2211
|
}
|
|
2213
2212
|
}
|
|
2214
2213
|
|
|
2215
2214
|
/* src/floorplan/Components/RuleLabels/RuleItem.svelte generated by Svelte v3.47.0 */
|
|
2216
2215
|
|
|
2217
|
-
function add_css$
|
|
2216
|
+
function add_css$g(target) {
|
|
2218
2217
|
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}");
|
|
2219
2218
|
}
|
|
2220
2219
|
|
|
2221
|
-
function get_each_context$
|
|
2220
|
+
function get_each_context$a(ctx, list, i) {
|
|
2222
2221
|
const child_ctx = ctx.slice();
|
|
2223
2222
|
child_ctx[10] = list[i];
|
|
2224
2223
|
child_ctx[12] = i;
|
|
@@ -2253,7 +2252,7 @@ function create_each_block_1(ctx) {
|
|
|
2253
2252
|
}
|
|
2254
2253
|
|
|
2255
2254
|
// (56:4) {#each rulerTexts as textItem, textItemIndex (textItemIndex)}
|
|
2256
|
-
function create_each_block$
|
|
2255
|
+
function create_each_block$a(key_1, ctx) {
|
|
2257
2256
|
let div1;
|
|
2258
2257
|
let div0;
|
|
2259
2258
|
let t0_value = /*textItem*/ ctx[10].distance + "";
|
|
@@ -2290,7 +2289,7 @@ function create_each_block$8(key_1, ctx) {
|
|
|
2290
2289
|
};
|
|
2291
2290
|
}
|
|
2292
2291
|
|
|
2293
|
-
function create_fragment$
|
|
2292
|
+
function create_fragment$l(ctx) {
|
|
2294
2293
|
let div3;
|
|
2295
2294
|
let div0;
|
|
2296
2295
|
let t0;
|
|
@@ -2311,9 +2310,9 @@ function create_fragment$j(ctx) {
|
|
|
2311
2310
|
const get_key = ctx => /*textItemIndex*/ ctx[12];
|
|
2312
2311
|
|
|
2313
2312
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
2314
|
-
let child_ctx = get_each_context$
|
|
2313
|
+
let child_ctx = get_each_context$a(ctx, each_value, i);
|
|
2315
2314
|
let key = get_key(child_ctx);
|
|
2316
|
-
each1_lookup.set(key, each_blocks[i] = create_each_block$
|
|
2315
|
+
each1_lookup.set(key, each_blocks[i] = create_each_block$a(key, child_ctx));
|
|
2317
2316
|
}
|
|
2318
2317
|
|
|
2319
2318
|
return {
|
|
@@ -2386,7 +2385,7 @@ function create_fragment$j(ctx) {
|
|
|
2386
2385
|
|
|
2387
2386
|
if (dirty & /*rulerTexts, isRow*/ 10) {
|
|
2388
2387
|
each_value = /*rulerTexts*/ ctx[3];
|
|
2389
|
-
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each1_lookup, div2, destroy_block, create_each_block$
|
|
2388
|
+
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each1_lookup, div2, destroy_block, create_each_block$a, null, get_each_context$a);
|
|
2390
2389
|
}
|
|
2391
2390
|
|
|
2392
2391
|
if (dirty & /*type*/ 1 && div3_class_value !== (div3_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels--" + /*type*/ ctx[0] + " svelte-xt7p1v")) {
|
|
@@ -2413,7 +2412,7 @@ function create_fragment$j(ctx) {
|
|
|
2413
2412
|
const padding$1 = 1000;
|
|
2414
2413
|
const exteriorWallOffset$1 = 180;
|
|
2415
2414
|
|
|
2416
|
-
function instance$
|
|
2415
|
+
function instance$l($$self, $$props, $$invalidate) {
|
|
2417
2416
|
let { type } = $$props;
|
|
2418
2417
|
let { data } = $$props;
|
|
2419
2418
|
let { bounding } = $$props;
|
|
@@ -2472,17 +2471,17 @@ function instance$j($$self, $$props, $$invalidate) {
|
|
|
2472
2471
|
class RuleItem extends SvelteComponent {
|
|
2473
2472
|
constructor(options) {
|
|
2474
2473
|
super();
|
|
2475
|
-
init(this, options, instance$
|
|
2474
|
+
init(this, options, instance$l, create_fragment$l, safe_not_equal, { type: 0, data: 4, bounding: 5 }, add_css$g);
|
|
2476
2475
|
}
|
|
2477
2476
|
}
|
|
2478
2477
|
|
|
2479
2478
|
/* src/floorplan/Components/RuleLabels/RuleLabels.svelte generated by Svelte v3.47.0 */
|
|
2480
2479
|
|
|
2481
|
-
function add_css$
|
|
2480
|
+
function add_css$f(target) {
|
|
2482
2481
|
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}");
|
|
2483
2482
|
}
|
|
2484
2483
|
|
|
2485
|
-
function get_each_context$
|
|
2484
|
+
function get_each_context$9(ctx, list, i) {
|
|
2486
2485
|
const child_ctx = ctx.slice();
|
|
2487
2486
|
child_ctx[12] = list[i][0];
|
|
2488
2487
|
child_ctx[13] = list[i][1];
|
|
@@ -2490,7 +2489,7 @@ function get_each_context$7(ctx, list, i) {
|
|
|
2490
2489
|
}
|
|
2491
2490
|
|
|
2492
2491
|
// (19:2) {#each ruleLabelArray as [type, data] (type)}
|
|
2493
|
-
function create_each_block$
|
|
2492
|
+
function create_each_block$9(key_1, ctx) {
|
|
2494
2493
|
let first;
|
|
2495
2494
|
let ruleitem;
|
|
2496
2495
|
let current;
|
|
@@ -2555,7 +2554,7 @@ function create_each_block$7(key_1, ctx) {
|
|
|
2555
2554
|
};
|
|
2556
2555
|
}
|
|
2557
2556
|
|
|
2558
|
-
function create_fragment$
|
|
2557
|
+
function create_fragment$k(ctx) {
|
|
2559
2558
|
let div;
|
|
2560
2559
|
let each_blocks = [];
|
|
2561
2560
|
let each_1_lookup = new Map();
|
|
@@ -2564,9 +2563,9 @@ function create_fragment$i(ctx) {
|
|
|
2564
2563
|
const get_key = ctx => /*type*/ ctx[12];
|
|
2565
2564
|
|
|
2566
2565
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
2567
|
-
let child_ctx = get_each_context$
|
|
2566
|
+
let child_ctx = get_each_context$9(ctx, each_value, i);
|
|
2568
2567
|
let key = get_key(child_ctx);
|
|
2569
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block$
|
|
2568
|
+
each_1_lookup.set(key, each_blocks[i] = create_each_block$9(key, child_ctx));
|
|
2570
2569
|
}
|
|
2571
2570
|
|
|
2572
2571
|
return {
|
|
@@ -2594,7 +2593,7 @@ function create_fragment$i(ctx) {
|
|
|
2594
2593
|
if (dirty & /*ruleLabelArray, bounding*/ 9) {
|
|
2595
2594
|
each_value = /*ruleLabelArray*/ ctx[3];
|
|
2596
2595
|
group_outros();
|
|
2597
|
-
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$
|
|
2596
|
+
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$9, null, get_each_context$9);
|
|
2598
2597
|
check_outros();
|
|
2599
2598
|
}
|
|
2600
2599
|
|
|
@@ -2635,7 +2634,7 @@ function create_fragment$i(ctx) {
|
|
|
2635
2634
|
const padding = 1000;
|
|
2636
2635
|
const exteriorWallOffset = 180;
|
|
2637
2636
|
|
|
2638
|
-
function instance$
|
|
2637
|
+
function instance$k($$self, $$props, $$invalidate) {
|
|
2639
2638
|
let bounding;
|
|
2640
2639
|
let ruleLabelData;
|
|
2641
2640
|
let ruleLabelDataKeys;
|
|
@@ -2715,7 +2714,7 @@ function instance$i($$self, $$props, $$invalidate) {
|
|
|
2715
2714
|
class RuleLabels extends SvelteComponent {
|
|
2716
2715
|
constructor(options) {
|
|
2717
2716
|
super();
|
|
2718
|
-
init(this, options, instance$
|
|
2717
|
+
init(this, options, instance$k, create_fragment$k, safe_not_equal, { floorIndex: 4, floorplanData: 5 }, add_css$f);
|
|
2719
2718
|
}
|
|
2720
2719
|
}
|
|
2721
2720
|
|
|
@@ -2772,7 +2771,7 @@ function getFloorIndexFromModelPosition(position, five) {
|
|
|
2772
2771
|
|
|
2773
2772
|
/* src/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte generated by Svelte v3.47.0 */
|
|
2774
2773
|
|
|
2775
|
-
function create_fragment$
|
|
2774
|
+
function create_fragment$j(ctx) {
|
|
2776
2775
|
let path_1;
|
|
2777
2776
|
|
|
2778
2777
|
return {
|
|
@@ -2797,7 +2796,7 @@ function create_fragment$h(ctx) {
|
|
|
2797
2796
|
};
|
|
2798
2797
|
}
|
|
2799
2798
|
|
|
2800
|
-
function instance$
|
|
2799
|
+
function instance$j($$self, $$props, $$invalidate) {
|
|
2801
2800
|
let d;
|
|
2802
2801
|
let { path } = $$props;
|
|
2803
2802
|
|
|
@@ -2817,13 +2816,13 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
2817
2816
|
class RoomMaterial_0 extends SvelteComponent {
|
|
2818
2817
|
constructor(options) {
|
|
2819
2818
|
super();
|
|
2820
|
-
init(this, options, instance$
|
|
2819
|
+
init(this, options, instance$j, create_fragment$j, safe_not_equal, { path: 1 });
|
|
2821
2820
|
}
|
|
2822
2821
|
}
|
|
2823
2822
|
|
|
2824
2823
|
/* src/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte generated by Svelte v3.47.0 */
|
|
2825
2824
|
|
|
2826
|
-
function create_fragment$
|
|
2825
|
+
function create_fragment$i(ctx) {
|
|
2827
2826
|
let defs;
|
|
2828
2827
|
let pattern;
|
|
2829
2828
|
let rect;
|
|
@@ -2884,7 +2883,7 @@ function create_fragment$g(ctx) {
|
|
|
2884
2883
|
|
|
2885
2884
|
const halfWidth = 6;
|
|
2886
2885
|
|
|
2887
|
-
function instance$
|
|
2886
|
+
function instance$i($$self, $$props, $$invalidate) {
|
|
2888
2887
|
let d;
|
|
2889
2888
|
let { path } = $$props;
|
|
2890
2889
|
const width = halfWidth * 2;
|
|
@@ -2906,13 +2905,13 @@ function instance$g($$self, $$props, $$invalidate) {
|
|
|
2906
2905
|
class RoomMaterial_1 extends SvelteComponent {
|
|
2907
2906
|
constructor(options) {
|
|
2908
2907
|
super();
|
|
2909
|
-
init(this, options, instance$
|
|
2908
|
+
init(this, options, instance$i, create_fragment$i, safe_not_equal, { path: 3 });
|
|
2910
2909
|
}
|
|
2911
2910
|
}
|
|
2912
2911
|
|
|
2913
2912
|
/* src/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte generated by Svelte v3.47.0 */
|
|
2914
2913
|
|
|
2915
|
-
function create_fragment$
|
|
2914
|
+
function create_fragment$h(ctx) {
|
|
2916
2915
|
let defs;
|
|
2917
2916
|
let pattern0;
|
|
2918
2917
|
let rect0;
|
|
@@ -3013,7 +3012,7 @@ function create_fragment$f(ctx) {
|
|
|
3013
3012
|
};
|
|
3014
3013
|
}
|
|
3015
3014
|
|
|
3016
|
-
function instance$
|
|
3015
|
+
function instance$h($$self, $$props, $$invalidate) {
|
|
3017
3016
|
let d;
|
|
3018
3017
|
let { path } = $$props;
|
|
3019
3018
|
|
|
@@ -3033,24 +3032,24 @@ function instance$f($$self, $$props, $$invalidate) {
|
|
|
3033
3032
|
class RoomMaterial_2 extends SvelteComponent {
|
|
3034
3033
|
constructor(options) {
|
|
3035
3034
|
super();
|
|
3036
|
-
init(this, options, instance$
|
|
3035
|
+
init(this, options, instance$h, create_fragment$h, safe_not_equal, { path: 1 });
|
|
3037
3036
|
}
|
|
3038
3037
|
}
|
|
3039
3038
|
|
|
3040
3039
|
/* src/floorplan/Components/RoomMaterials/RoomMaterial.svelte generated by Svelte v3.47.0 */
|
|
3041
3040
|
|
|
3042
|
-
function add_css$
|
|
3041
|
+
function add_css$e(target) {
|
|
3043
3042
|
append_styles(target, "svelte-1dykexu", ".floorplan-plugin__room-material.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%}svg.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}");
|
|
3044
3043
|
}
|
|
3045
3044
|
|
|
3046
|
-
function get_each_context$
|
|
3045
|
+
function get_each_context$8(ctx, list, i) {
|
|
3047
3046
|
const child_ctx = ctx.slice();
|
|
3048
3047
|
child_ctx[5] = list[i];
|
|
3049
3048
|
return child_ctx;
|
|
3050
3049
|
}
|
|
3051
3050
|
|
|
3052
3051
|
// (19:6) {:else}
|
|
3053
|
-
function create_else_block(ctx) {
|
|
3052
|
+
function create_else_block$1(ctx) {
|
|
3054
3053
|
let roommaterial_1;
|
|
3055
3054
|
let current;
|
|
3056
3055
|
roommaterial_1 = new RoomMaterial_1({ props: { path: /*room*/ ctx[5].path } });
|
|
@@ -3118,7 +3117,7 @@ function create_if_block_1$3(ctx) {
|
|
|
3118
3117
|
}
|
|
3119
3118
|
|
|
3120
3119
|
// (15:6) {#if room.floorType === 1}
|
|
3121
|
-
function create_if_block$
|
|
3120
|
+
function create_if_block$7(ctx) {
|
|
3122
3121
|
let roommaterial_0;
|
|
3123
3122
|
let current;
|
|
3124
3123
|
roommaterial_0 = new RoomMaterial_0({ props: { path: /*room*/ ctx[5].path } });
|
|
@@ -3152,13 +3151,13 @@ function create_if_block$6(ctx) {
|
|
|
3152
3151
|
}
|
|
3153
3152
|
|
|
3154
3153
|
// (13:2) {#each rooms as room}
|
|
3155
|
-
function create_each_block$
|
|
3154
|
+
function create_each_block$8(ctx) {
|
|
3156
3155
|
let svg;
|
|
3157
3156
|
let current_block_type_index;
|
|
3158
3157
|
let if_block;
|
|
3159
3158
|
let svg_viewBox_value;
|
|
3160
3159
|
let current;
|
|
3161
|
-
const if_block_creators = [create_if_block$
|
|
3160
|
+
const if_block_creators = [create_if_block$7, create_if_block_1$3, create_else_block$1];
|
|
3162
3161
|
const if_blocks = [];
|
|
3163
3162
|
|
|
3164
3163
|
function select_block_type(ctx, dirty) {
|
|
@@ -3227,14 +3226,14 @@ function create_each_block$6(ctx) {
|
|
|
3227
3226
|
};
|
|
3228
3227
|
}
|
|
3229
3228
|
|
|
3230
|
-
function create_fragment$
|
|
3229
|
+
function create_fragment$g(ctx) {
|
|
3231
3230
|
let div;
|
|
3232
3231
|
let current;
|
|
3233
3232
|
let each_value = /*rooms*/ ctx[0];
|
|
3234
3233
|
let each_blocks = [];
|
|
3235
3234
|
|
|
3236
3235
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
3237
|
-
each_blocks[i] = create_each_block$
|
|
3236
|
+
each_blocks[i] = create_each_block$8(get_each_context$8(ctx, each_value, i));
|
|
3238
3237
|
}
|
|
3239
3238
|
|
|
3240
3239
|
const out = i => transition_out(each_blocks[i], 1, 1, () => {
|
|
@@ -3266,13 +3265,13 @@ function create_fragment$e(ctx) {
|
|
|
3266
3265
|
let i;
|
|
3267
3266
|
|
|
3268
3267
|
for (i = 0; i < each_value.length; i += 1) {
|
|
3269
|
-
const child_ctx = get_each_context$
|
|
3268
|
+
const child_ctx = get_each_context$8(ctx, each_value, i);
|
|
3270
3269
|
|
|
3271
3270
|
if (each_blocks[i]) {
|
|
3272
3271
|
each_blocks[i].p(child_ctx, dirty);
|
|
3273
3272
|
transition_in(each_blocks[i], 1);
|
|
3274
3273
|
} else {
|
|
3275
|
-
each_blocks[i] = create_each_block$
|
|
3274
|
+
each_blocks[i] = create_each_block$8(child_ctx);
|
|
3276
3275
|
each_blocks[i].c();
|
|
3277
3276
|
transition_in(each_blocks[i], 1);
|
|
3278
3277
|
each_blocks[i].m(div, null);
|
|
@@ -3313,7 +3312,7 @@ function create_fragment$e(ctx) {
|
|
|
3313
3312
|
};
|
|
3314
3313
|
}
|
|
3315
3314
|
|
|
3316
|
-
function instance$
|
|
3315
|
+
function instance$g($$self, $$props, $$invalidate) {
|
|
3317
3316
|
let rooms;
|
|
3318
3317
|
let { floorIndex } = $$props;
|
|
3319
3318
|
let { floorplanData } = $$props;
|
|
@@ -3339,17 +3338,17 @@ function instance$e($$self, $$props, $$invalidate) {
|
|
|
3339
3338
|
class RoomMaterial extends SvelteComponent {
|
|
3340
3339
|
constructor(options) {
|
|
3341
3340
|
super();
|
|
3342
|
-
init(this, options, instance$
|
|
3341
|
+
init(this, options, instance$g, create_fragment$g, safe_not_equal, { floorIndex: 3, floorplanData: 4 }, add_css$e);
|
|
3343
3342
|
}
|
|
3344
3343
|
}
|
|
3345
3344
|
|
|
3346
3345
|
/* src/floorplan/Components/RoomHighlight/Room.svelte generated by Svelte v3.47.0 */
|
|
3347
3346
|
|
|
3348
|
-
function add_css$
|
|
3347
|
+
function add_css$d(target) {
|
|
3349
3348
|
append_styles(target, "svelte-19uvvss", "path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}");
|
|
3350
3349
|
}
|
|
3351
3350
|
|
|
3352
|
-
function create_fragment$
|
|
3351
|
+
function create_fragment$f(ctx) {
|
|
3353
3352
|
let path;
|
|
3354
3353
|
let mounted;
|
|
3355
3354
|
let dispose;
|
|
@@ -3384,7 +3383,7 @@ function create_fragment$d(ctx) {
|
|
|
3384
3383
|
};
|
|
3385
3384
|
}
|
|
3386
3385
|
|
|
3387
|
-
function instance$
|
|
3386
|
+
function instance$f($$self, $$props, $$invalidate) {
|
|
3388
3387
|
let { room } = $$props;
|
|
3389
3388
|
let { floorplanData } = $$props;
|
|
3390
3389
|
let { hoveredRoom } = $$props;
|
|
@@ -3420,33 +3419,33 @@ class Room extends SvelteComponent {
|
|
|
3420
3419
|
init(
|
|
3421
3420
|
this,
|
|
3422
3421
|
options,
|
|
3423
|
-
instance$
|
|
3424
|
-
create_fragment$
|
|
3422
|
+
instance$f,
|
|
3423
|
+
create_fragment$f,
|
|
3425
3424
|
safe_not_equal,
|
|
3426
3425
|
{
|
|
3427
3426
|
room: 3,
|
|
3428
3427
|
floorplanData: 4,
|
|
3429
3428
|
hoveredRoom: 5
|
|
3430
3429
|
},
|
|
3431
|
-
add_css$
|
|
3430
|
+
add_css$d
|
|
3432
3431
|
);
|
|
3433
3432
|
}
|
|
3434
3433
|
}
|
|
3435
3434
|
|
|
3436
3435
|
/* src/floorplan/Components/RoomHighlight/RoomHighlight.svelte generated by Svelte v3.47.0 */
|
|
3437
3436
|
|
|
3438
|
-
function add_css$
|
|
3437
|
+
function add_css$c(target) {
|
|
3439
3438
|
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}");
|
|
3440
3439
|
}
|
|
3441
3440
|
|
|
3442
|
-
function get_each_context$
|
|
3441
|
+
function get_each_context$7(ctx, list, i) {
|
|
3443
3442
|
const child_ctx = ctx.slice();
|
|
3444
3443
|
child_ctx[5] = list[i];
|
|
3445
3444
|
return child_ctx;
|
|
3446
3445
|
}
|
|
3447
3446
|
|
|
3448
3447
|
// (11:4) {#each floorplanData.floorDatas[floorIndex].rooms as room (room.id)}
|
|
3449
|
-
function create_each_block$
|
|
3448
|
+
function create_each_block$7(key_1, ctx) {
|
|
3450
3449
|
let first;
|
|
3451
3450
|
let room;
|
|
3452
3451
|
let current;
|
|
@@ -3511,7 +3510,7 @@ function create_each_block$5(key_1, ctx) {
|
|
|
3511
3510
|
};
|
|
3512
3511
|
}
|
|
3513
3512
|
|
|
3514
|
-
function create_fragment$
|
|
3513
|
+
function create_fragment$e(ctx) {
|
|
3515
3514
|
let div;
|
|
3516
3515
|
let svg;
|
|
3517
3516
|
let each_blocks = [];
|
|
@@ -3521,9 +3520,9 @@ function create_fragment$c(ctx) {
|
|
|
3521
3520
|
const get_key = ctx => /*room*/ ctx[5].id;
|
|
3522
3521
|
|
|
3523
3522
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
3524
|
-
let child_ctx = get_each_context$
|
|
3523
|
+
let child_ctx = get_each_context$7(ctx, each_value, i);
|
|
3525
3524
|
let key = get_key(child_ctx);
|
|
3526
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block$
|
|
3525
|
+
each_1_lookup.set(key, each_blocks[i] = create_each_block$7(key, child_ctx));
|
|
3527
3526
|
}
|
|
3528
3527
|
|
|
3529
3528
|
return {
|
|
@@ -3555,7 +3554,7 @@ function create_fragment$c(ctx) {
|
|
|
3555
3554
|
if (dirty & /*floorplanData, floorIndex, hoveredRoom*/ 7) {
|
|
3556
3555
|
each_value = /*floorplanData*/ ctx[1].floorDatas[/*floorIndex*/ ctx[0]].rooms;
|
|
3557
3556
|
group_outros();
|
|
3558
|
-
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, svg, outro_and_destroy_block, create_each_block$
|
|
3557
|
+
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, svg, outro_and_destroy_block, create_each_block$7, null, get_each_context$7);
|
|
3559
3558
|
check_outros();
|
|
3560
3559
|
}
|
|
3561
3560
|
},
|
|
@@ -3585,7 +3584,7 @@ function create_fragment$c(ctx) {
|
|
|
3585
3584
|
};
|
|
3586
3585
|
}
|
|
3587
3586
|
|
|
3588
|
-
function instance$
|
|
3587
|
+
function instance$e($$self, $$props, $$invalidate) {
|
|
3589
3588
|
let { floorIndex } = $$props;
|
|
3590
3589
|
let { floorplanData } = $$props;
|
|
3591
3590
|
let { hoveredRoom } = $$props;
|
|
@@ -3608,22 +3607,22 @@ class RoomHighlight extends SvelteComponent {
|
|
|
3608
3607
|
init(
|
|
3609
3608
|
this,
|
|
3610
3609
|
options,
|
|
3611
|
-
instance$
|
|
3612
|
-
create_fragment$
|
|
3610
|
+
instance$e,
|
|
3611
|
+
create_fragment$e,
|
|
3613
3612
|
safe_not_equal,
|
|
3614
3613
|
{
|
|
3615
3614
|
floorIndex: 0,
|
|
3616
3615
|
floorplanData: 1,
|
|
3617
3616
|
hoveredRoom: 2
|
|
3618
3617
|
},
|
|
3619
|
-
add_css$
|
|
3618
|
+
add_css$c
|
|
3620
3619
|
);
|
|
3621
3620
|
}
|
|
3622
3621
|
}
|
|
3623
3622
|
|
|
3624
3623
|
/* src/floorplan/Components/CurrentFloor.svelte generated by Svelte v3.47.0 */
|
|
3625
3624
|
|
|
3626
|
-
function add_css$
|
|
3625
|
+
function add_css$b(target) {
|
|
3627
3626
|
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}");
|
|
3628
3627
|
}
|
|
3629
3628
|
|
|
@@ -3746,7 +3745,7 @@ function create_if_block_1$2(ctx) {
|
|
|
3746
3745
|
}
|
|
3747
3746
|
|
|
3748
3747
|
// (27:2) {#if ruleLabelsEnable}
|
|
3749
|
-
function create_if_block$
|
|
3748
|
+
function create_if_block$6(ctx) {
|
|
3750
3749
|
let rulelabels;
|
|
3751
3750
|
let current;
|
|
3752
3751
|
|
|
@@ -3800,7 +3799,7 @@ function create_if_block$5(ctx) {
|
|
|
3800
3799
|
};
|
|
3801
3800
|
}
|
|
3802
3801
|
|
|
3803
|
-
function create_fragment$
|
|
3802
|
+
function create_fragment$d(ctx) {
|
|
3804
3803
|
let div;
|
|
3805
3804
|
let roommaterial;
|
|
3806
3805
|
let t0;
|
|
@@ -3842,7 +3841,7 @@ function create_fragment$b(ctx) {
|
|
|
3842
3841
|
|
|
3843
3842
|
baseimage = new BaseImage({ props: baseimage_props });
|
|
3844
3843
|
let if_block1 = /*roomLabelsEnable*/ ctx[3] && create_if_block_1$2(ctx);
|
|
3845
|
-
let if_block2 = /*ruleLabelsEnable*/ ctx[4] && create_if_block$
|
|
3844
|
+
let if_block2 = /*ruleLabelsEnable*/ ctx[4] && create_if_block$6(ctx);
|
|
3846
3845
|
|
|
3847
3846
|
return {
|
|
3848
3847
|
c() {
|
|
@@ -3951,7 +3950,7 @@ function create_fragment$b(ctx) {
|
|
|
3951
3950
|
transition_in(if_block2, 1);
|
|
3952
3951
|
}
|
|
3953
3952
|
} else {
|
|
3954
|
-
if_block2 = create_if_block$
|
|
3953
|
+
if_block2 = create_if_block$6(ctx);
|
|
3955
3954
|
if_block2.c();
|
|
3956
3955
|
transition_in(if_block2, 1);
|
|
3957
3956
|
if_block2.m(div, null);
|
|
@@ -4000,7 +3999,7 @@ function create_fragment$b(ctx) {
|
|
|
4000
3999
|
};
|
|
4001
4000
|
}
|
|
4002
4001
|
|
|
4003
|
-
function instance$
|
|
4002
|
+
function instance$d($$self, $$props, $$invalidate) {
|
|
4004
4003
|
let { isCurrent } = $$props;
|
|
4005
4004
|
let { floorIndex } = $$props;
|
|
4006
4005
|
let { hoverEnable } = $$props;
|
|
@@ -4042,8 +4041,8 @@ class CurrentFloor$1 extends SvelteComponent {
|
|
|
4042
4041
|
init(
|
|
4043
4042
|
this,
|
|
4044
4043
|
options,
|
|
4045
|
-
instance$
|
|
4046
|
-
create_fragment$
|
|
4044
|
+
instance$d,
|
|
4045
|
+
create_fragment$d,
|
|
4047
4046
|
safe_not_equal,
|
|
4048
4047
|
{
|
|
4049
4048
|
isCurrent: 0,
|
|
@@ -4055,25 +4054,25 @@ class CurrentFloor$1 extends SvelteComponent {
|
|
|
4055
4054
|
getLabelElement: 6,
|
|
4056
4055
|
adaptiveRoomLabelVisibleEnable: 7
|
|
4057
4056
|
},
|
|
4058
|
-
add_css$
|
|
4057
|
+
add_css$b
|
|
4059
4058
|
);
|
|
4060
4059
|
}
|
|
4061
4060
|
}
|
|
4062
4061
|
|
|
4063
4062
|
/* src/floorplan/Components/Main.svelte generated by Svelte v3.47.0 */
|
|
4064
4063
|
|
|
4065
|
-
function add_css$
|
|
4064
|
+
function add_css$a(target) {
|
|
4066
4065
|
append_styles(target, "svelte-86bqav", ".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}");
|
|
4067
4066
|
}
|
|
4068
4067
|
|
|
4069
|
-
function get_each_context$
|
|
4068
|
+
function get_each_context$6(ctx, list, i) {
|
|
4070
4069
|
const child_ctx = ctx.slice();
|
|
4071
4070
|
child_ctx[14] = list[i];
|
|
4072
4071
|
return child_ctx;
|
|
4073
4072
|
}
|
|
4074
4073
|
|
|
4075
4074
|
// (22:0) {#if visible}
|
|
4076
|
-
function create_if_block$
|
|
4075
|
+
function create_if_block$5(ctx) {
|
|
4077
4076
|
let div;
|
|
4078
4077
|
let t0;
|
|
4079
4078
|
let camera;
|
|
@@ -4084,7 +4083,7 @@ function create_if_block$4(ctx) {
|
|
|
4084
4083
|
let each_blocks = [];
|
|
4085
4084
|
|
|
4086
4085
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
4087
|
-
each_blocks[i] = create_each_block$
|
|
4086
|
+
each_blocks[i] = create_each_block$6(get_each_context$6(ctx, each_value, i));
|
|
4088
4087
|
}
|
|
4089
4088
|
|
|
4090
4089
|
const out = i => transition_out(each_blocks[i], 1, 1, () => {
|
|
@@ -4144,13 +4143,13 @@ function create_if_block$4(ctx) {
|
|
|
4144
4143
|
let i;
|
|
4145
4144
|
|
|
4146
4145
|
for (i = 0; i < each_value.length; i += 1) {
|
|
4147
|
-
const child_ctx = get_each_context$
|
|
4146
|
+
const child_ctx = get_each_context$6(ctx, each_value, i);
|
|
4148
4147
|
|
|
4149
4148
|
if (each_blocks[i]) {
|
|
4150
4149
|
each_blocks[i].p(child_ctx, dirty);
|
|
4151
4150
|
transition_in(each_blocks[i], 1);
|
|
4152
4151
|
} else {
|
|
4153
|
-
each_blocks[i] = create_each_block$
|
|
4152
|
+
each_blocks[i] = create_each_block$6(child_ctx);
|
|
4154
4153
|
each_blocks[i].c();
|
|
4155
4154
|
transition_in(each_blocks[i], 1);
|
|
4156
4155
|
each_blocks[i].m(div, t0);
|
|
@@ -4246,7 +4245,7 @@ function create_if_block$4(ctx) {
|
|
|
4246
4245
|
}
|
|
4247
4246
|
|
|
4248
4247
|
// (24:4) {#each floorplanData.floorDatas as floorData}
|
|
4249
|
-
function create_each_block$
|
|
4248
|
+
function create_each_block$6(ctx) {
|
|
4250
4249
|
let currentfloor;
|
|
4251
4250
|
let current;
|
|
4252
4251
|
|
|
@@ -4361,10 +4360,10 @@ function create_if_block_1$1(ctx) {
|
|
|
4361
4360
|
};
|
|
4362
4361
|
}
|
|
4363
4362
|
|
|
4364
|
-
function create_fragment$
|
|
4363
|
+
function create_fragment$c(ctx) {
|
|
4365
4364
|
let if_block_anchor;
|
|
4366
4365
|
let current;
|
|
4367
|
-
let if_block = /*visible*/ ctx[1] && create_if_block$
|
|
4366
|
+
let if_block = /*visible*/ ctx[1] && create_if_block$5(ctx);
|
|
4368
4367
|
|
|
4369
4368
|
return {
|
|
4370
4369
|
c() {
|
|
@@ -4385,7 +4384,7 @@ function create_fragment$a(ctx) {
|
|
|
4385
4384
|
transition_in(if_block, 1);
|
|
4386
4385
|
}
|
|
4387
4386
|
} else {
|
|
4388
|
-
if_block = create_if_block$
|
|
4387
|
+
if_block = create_if_block$5(ctx);
|
|
4389
4388
|
if_block.c();
|
|
4390
4389
|
transition_in(if_block, 1);
|
|
4391
4390
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
@@ -4416,7 +4415,7 @@ function create_fragment$a(ctx) {
|
|
|
4416
4415
|
};
|
|
4417
4416
|
}
|
|
4418
4417
|
|
|
4419
|
-
function instance$
|
|
4418
|
+
function instance$c($$self, $$props, $$invalidate) {
|
|
4420
4419
|
let { duration = 0 } = $$props;
|
|
4421
4420
|
let { visible } = $$props;
|
|
4422
4421
|
let { northDesc } = $$props;
|
|
@@ -4474,8 +4473,8 @@ class Main$1 extends SvelteComponent {
|
|
|
4474
4473
|
init(
|
|
4475
4474
|
this,
|
|
4476
4475
|
options,
|
|
4477
|
-
instance$
|
|
4478
|
-
create_fragment$
|
|
4476
|
+
instance$c,
|
|
4477
|
+
create_fragment$c,
|
|
4479
4478
|
safe_not_equal,
|
|
4480
4479
|
{
|
|
4481
4480
|
duration: 0,
|
|
@@ -4493,7 +4492,7 @@ class Main$1 extends SvelteComponent {
|
|
|
4493
4492
|
getLabelElement: 12,
|
|
4494
4493
|
adaptiveRoomLabelVisibleEnable: 13
|
|
4495
4494
|
},
|
|
4496
|
-
add_css$
|
|
4495
|
+
add_css$a
|
|
4497
4496
|
);
|
|
4498
4497
|
}
|
|
4499
4498
|
}
|
|
@@ -4625,7 +4624,7 @@ function omit(object, props) {
|
|
|
4625
4624
|
/**
|
|
4626
4625
|
* plugin 的基本控制器
|
|
4627
4626
|
*/
|
|
4628
|
-
class Controller$
|
|
4627
|
+
class Controller$5 {
|
|
4629
4628
|
constructor(five) {
|
|
4630
4629
|
Object.defineProperty(this, "five", {
|
|
4631
4630
|
enumerable: true,
|
|
@@ -4652,7 +4651,7 @@ class Controller$4 {
|
|
|
4652
4651
|
}
|
|
4653
4652
|
}
|
|
4654
4653
|
|
|
4655
|
-
class Controller$
|
|
4654
|
+
class Controller$4 extends Controller$5 {
|
|
4656
4655
|
}
|
|
4657
4656
|
|
|
4658
4657
|
/**
|
|
@@ -4755,7 +4754,7 @@ function changeModelCanvasOpacity(five, opacity, duration = 300) {
|
|
|
4755
4754
|
});
|
|
4756
4755
|
}
|
|
4757
4756
|
|
|
4758
|
-
class Controller$
|
|
4757
|
+
class Controller$3 extends Controller$4 {
|
|
4759
4758
|
constructor(five, params) {
|
|
4760
4759
|
super(five);
|
|
4761
4760
|
// =============== public properties =================
|
|
@@ -5232,7 +5231,7 @@ class Controller$2 extends Controller$3 {
|
|
|
5232
5231
|
}
|
|
5233
5232
|
|
|
5234
5233
|
const TopviewFloorplanPlugin = (five, params) => {
|
|
5235
|
-
return new Controller$
|
|
5234
|
+
return new Controller$3(five, params);
|
|
5236
5235
|
};
|
|
5237
5236
|
|
|
5238
5237
|
/**
|
|
@@ -5256,11 +5255,11 @@ function throttle(func, wait = 200) {
|
|
|
5256
5255
|
|
|
5257
5256
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte generated by Svelte v3.47.0 */
|
|
5258
5257
|
|
|
5259
|
-
function add_css$
|
|
5258
|
+
function add_css$9(target) {
|
|
5260
5259
|
append_styles(target, "svelte-1ty3s4p", ".plugin-radar__camera-wrapper.svelte-1ty3s4p{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1ty3s4p{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1ty3s4p{position:absolute;left:-0.78125rem;top:-0.78125rem;width:0.88542rem;height:0.88542rem;transform-origin:0.78125rem 0.78125rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}");
|
|
5261
5260
|
}
|
|
5262
5261
|
|
|
5263
|
-
function create_fragment$
|
|
5262
|
+
function create_fragment$b(ctx) {
|
|
5264
5263
|
let div2;
|
|
5265
5264
|
let div1;
|
|
5266
5265
|
let div0;
|
|
@@ -5310,7 +5309,7 @@ function getCameraRotateTransform(longitude) {
|
|
|
5310
5309
|
return `rotate(${rotate}deg)`;
|
|
5311
5310
|
}
|
|
5312
5311
|
|
|
5313
|
-
function instance$
|
|
5312
|
+
function instance$b($$self, $$props, $$invalidate) {
|
|
5314
5313
|
let positionTransform;
|
|
5315
5314
|
let rotateTransform;
|
|
5316
5315
|
let { five } = $$props;
|
|
@@ -5390,8 +5389,8 @@ class Camera extends SvelteComponent {
|
|
|
5390
5389
|
init(
|
|
5391
5390
|
this,
|
|
5392
5391
|
options,
|
|
5393
|
-
instance$
|
|
5394
|
-
create_fragment$
|
|
5392
|
+
instance$b,
|
|
5393
|
+
create_fragment$b,
|
|
5395
5394
|
safe_not_equal,
|
|
5396
5395
|
{
|
|
5397
5396
|
five: 3,
|
|
@@ -5399,25 +5398,25 @@ class Camera extends SvelteComponent {
|
|
|
5399
5398
|
floorplanData: 5,
|
|
5400
5399
|
cameraImageUrl: 0
|
|
5401
5400
|
},
|
|
5402
|
-
add_css$
|
|
5401
|
+
add_css$9
|
|
5403
5402
|
);
|
|
5404
5403
|
}
|
|
5405
5404
|
}
|
|
5406
5405
|
|
|
5407
5406
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte generated by Svelte v3.47.0 */
|
|
5408
5407
|
|
|
5409
|
-
function add_css$
|
|
5408
|
+
function add_css$8(target) {
|
|
5410
5409
|
append_styles(target, "svelte-1i87fz7", ".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}");
|
|
5411
5410
|
}
|
|
5412
5411
|
|
|
5413
|
-
function get_each_context$
|
|
5412
|
+
function get_each_context$5(ctx, list, i) {
|
|
5414
5413
|
const child_ctx = ctx.slice();
|
|
5415
5414
|
child_ctx[1] = list[i];
|
|
5416
5415
|
return child_ctx;
|
|
5417
5416
|
}
|
|
5418
5417
|
|
|
5419
5418
|
// (5:2) {#each extraObjects as extraObject (extraObject.id)}
|
|
5420
|
-
function create_each_block$
|
|
5419
|
+
function create_each_block$5(key_1, ctx) {
|
|
5421
5420
|
let div1;
|
|
5422
5421
|
let div0;
|
|
5423
5422
|
let style_width = `${/*extraObject*/ ctx[1].icon.width / 16}rem`;
|
|
@@ -5476,7 +5475,7 @@ function create_each_block$3(key_1, ctx) {
|
|
|
5476
5475
|
};
|
|
5477
5476
|
}
|
|
5478
5477
|
|
|
5479
|
-
function create_fragment$
|
|
5478
|
+
function create_fragment$a(ctx) {
|
|
5480
5479
|
let div;
|
|
5481
5480
|
let each_blocks = [];
|
|
5482
5481
|
let each_1_lookup = new Map();
|
|
@@ -5484,9 +5483,9 @@ function create_fragment$8(ctx) {
|
|
|
5484
5483
|
const get_key = ctx => /*extraObject*/ ctx[1].id;
|
|
5485
5484
|
|
|
5486
5485
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
5487
|
-
let child_ctx = get_each_context$
|
|
5486
|
+
let child_ctx = get_each_context$5(ctx, each_value, i);
|
|
5488
5487
|
let key = get_key(child_ctx);
|
|
5489
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block$
|
|
5488
|
+
each_1_lookup.set(key, each_blocks[i] = create_each_block$5(key, child_ctx));
|
|
5490
5489
|
}
|
|
5491
5490
|
|
|
5492
5491
|
return {
|
|
@@ -5509,7 +5508,7 @@ function create_fragment$8(ctx) {
|
|
|
5509
5508
|
p(ctx, [dirty]) {
|
|
5510
5509
|
if (dirty & /*extraObjects*/ 1) {
|
|
5511
5510
|
each_value = /*extraObjects*/ ctx[0];
|
|
5512
|
-
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, destroy_block, create_each_block$
|
|
5511
|
+
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, div, destroy_block, create_each_block$5, null, get_each_context$5);
|
|
5513
5512
|
}
|
|
5514
5513
|
},
|
|
5515
5514
|
i: noop$1,
|
|
@@ -5524,7 +5523,7 @@ function create_fragment$8(ctx) {
|
|
|
5524
5523
|
};
|
|
5525
5524
|
}
|
|
5526
5525
|
|
|
5527
|
-
function instance$
|
|
5526
|
+
function instance$a($$self, $$props, $$invalidate) {
|
|
5528
5527
|
let { extraObjects = [] } = $$props;
|
|
5529
5528
|
|
|
5530
5529
|
$$self.$$set = $$props => {
|
|
@@ -5537,13 +5536,13 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
5537
5536
|
class ExtraObjects extends SvelteComponent {
|
|
5538
5537
|
constructor(options) {
|
|
5539
5538
|
super();
|
|
5540
|
-
init(this, options, instance$
|
|
5539
|
+
init(this, options, instance$a, create_fragment$a, safe_not_equal, { extraObjects: 0 }, add_css$8);
|
|
5541
5540
|
}
|
|
5542
5541
|
}
|
|
5543
5542
|
|
|
5544
5543
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte generated by Svelte v3.47.0 */
|
|
5545
5544
|
|
|
5546
|
-
function create_if_block$
|
|
5545
|
+
function create_if_block$4(ctx) {
|
|
5547
5546
|
let highlight;
|
|
5548
5547
|
let current;
|
|
5549
5548
|
|
|
@@ -5603,7 +5602,7 @@ function create_if_block$3(ctx) {
|
|
|
5603
5602
|
};
|
|
5604
5603
|
}
|
|
5605
5604
|
|
|
5606
|
-
function create_fragment$
|
|
5605
|
+
function create_fragment$9(ctx) {
|
|
5607
5606
|
let baseimage;
|
|
5608
5607
|
let t0;
|
|
5609
5608
|
let extraobjects;
|
|
@@ -5632,7 +5631,7 @@ function create_fragment$7(ctx) {
|
|
|
5632
5631
|
}
|
|
5633
5632
|
});
|
|
5634
5633
|
|
|
5635
|
-
let if_block = /*hoverEnable*/ ctx[3] && create_if_block$
|
|
5634
|
+
let if_block = /*hoverEnable*/ ctx[3] && create_if_block$4(ctx);
|
|
5636
5635
|
|
|
5637
5636
|
return {
|
|
5638
5637
|
c() {
|
|
@@ -5675,7 +5674,7 @@ function create_fragment$7(ctx) {
|
|
|
5675
5674
|
transition_in(if_block, 1);
|
|
5676
5675
|
}
|
|
5677
5676
|
} else {
|
|
5678
|
-
if_block = create_if_block$
|
|
5677
|
+
if_block = create_if_block$4(ctx);
|
|
5679
5678
|
if_block.c();
|
|
5680
5679
|
transition_in(if_block, 1);
|
|
5681
5680
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
@@ -5714,7 +5713,7 @@ function create_fragment$7(ctx) {
|
|
|
5714
5713
|
};
|
|
5715
5714
|
}
|
|
5716
5715
|
|
|
5717
|
-
function instance$
|
|
5716
|
+
function instance$9($$self, $$props, $$invalidate) {
|
|
5718
5717
|
let currentFloorExtraObjects;
|
|
5719
5718
|
let { five } = $$props;
|
|
5720
5719
|
let { pxmm } = $$props;
|
|
@@ -5757,7 +5756,7 @@ class CurrentFloor extends SvelteComponent {
|
|
|
5757
5756
|
constructor(options) {
|
|
5758
5757
|
super();
|
|
5759
5758
|
|
|
5760
|
-
init(this, options, instance$
|
|
5759
|
+
init(this, options, instance$9, create_fragment$9, safe_not_equal, {
|
|
5761
5760
|
five: 0,
|
|
5762
5761
|
pxmm: 1,
|
|
5763
5762
|
floorIndex: 2,
|
|
@@ -5770,12 +5769,12 @@ class CurrentFloor extends SvelteComponent {
|
|
|
5770
5769
|
|
|
5771
5770
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte generated by Svelte v3.47.0 */
|
|
5772
5771
|
|
|
5773
|
-
function add_css$
|
|
5772
|
+
function add_css$7(target) {
|
|
5774
5773
|
append_styles(target, "svelte-1mvqyqq", ".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}");
|
|
5775
5774
|
}
|
|
5776
5775
|
|
|
5777
5776
|
// (41:0) {#if visible}
|
|
5778
|
-
function create_if_block$
|
|
5777
|
+
function create_if_block$3(ctx) {
|
|
5779
5778
|
let div;
|
|
5780
5779
|
let div_resize_listener;
|
|
5781
5780
|
let current;
|
|
@@ -5954,10 +5953,10 @@ function create_if_block_1(ctx) {
|
|
|
5954
5953
|
};
|
|
5955
5954
|
}
|
|
5956
5955
|
|
|
5957
|
-
function create_fragment$
|
|
5956
|
+
function create_fragment$8(ctx) {
|
|
5958
5957
|
let if_block_anchor;
|
|
5959
5958
|
let current;
|
|
5960
|
-
let if_block = /*visible*/ ctx[1] && create_if_block$
|
|
5959
|
+
let if_block = /*visible*/ ctx[1] && create_if_block$3(ctx);
|
|
5961
5960
|
|
|
5962
5961
|
return {
|
|
5963
5962
|
c() {
|
|
@@ -5978,7 +5977,7 @@ function create_fragment$6(ctx) {
|
|
|
5978
5977
|
transition_in(if_block, 1);
|
|
5979
5978
|
}
|
|
5980
5979
|
} else {
|
|
5981
|
-
if_block = create_if_block$
|
|
5980
|
+
if_block = create_if_block$3(ctx);
|
|
5982
5981
|
if_block.c();
|
|
5983
5982
|
transition_in(if_block, 1);
|
|
5984
5983
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
@@ -6009,7 +6008,7 @@ function create_fragment$6(ctx) {
|
|
|
6009
6008
|
};
|
|
6010
6009
|
}
|
|
6011
6010
|
|
|
6012
|
-
function instance$
|
|
6011
|
+
function instance$8($$self, $$props, $$invalidate) {
|
|
6013
6012
|
let { five } = $$props;
|
|
6014
6013
|
let { visible } = $$props;
|
|
6015
6014
|
let { hoverEnable } = $$props;
|
|
@@ -6095,8 +6094,8 @@ class Main extends SvelteComponent {
|
|
|
6095
6094
|
init(
|
|
6096
6095
|
this,
|
|
6097
6096
|
options,
|
|
6098
|
-
instance$
|
|
6099
|
-
create_fragment$
|
|
6097
|
+
instance$8,
|
|
6098
|
+
create_fragment$8,
|
|
6100
6099
|
safe_not_equal,
|
|
6101
6100
|
{
|
|
6102
6101
|
five: 0,
|
|
@@ -6106,12 +6105,12 @@ class Main extends SvelteComponent {
|
|
|
6106
6105
|
cameraImageUrl: 4,
|
|
6107
6106
|
extraObjects: 5
|
|
6108
6107
|
},
|
|
6109
|
-
add_css$
|
|
6108
|
+
add_css$7
|
|
6110
6109
|
);
|
|
6111
6110
|
}
|
|
6112
6111
|
}
|
|
6113
6112
|
|
|
6114
|
-
class Controller$
|
|
6113
|
+
class Controller$2 extends Controller$4 {
|
|
6115
6114
|
constructor(five, params) {
|
|
6116
6115
|
super(five);
|
|
6117
6116
|
// =============== public properties =================
|
|
@@ -6348,7 +6347,7 @@ class Controller$1 extends Controller$3 {
|
|
|
6348
6347
|
}
|
|
6349
6348
|
|
|
6350
6349
|
const PanoFloorplanRadarPlugin = (five, params) => {
|
|
6351
|
-
return new Controller$
|
|
6350
|
+
return new Controller$2(five, params);
|
|
6352
6351
|
};
|
|
6353
6352
|
|
|
6354
6353
|
/**
|
|
@@ -6456,7 +6455,7 @@ function shouldFloorplanShowWithPose(pose) {
|
|
|
6456
6455
|
const longitudeVisible = longitude < 30 * (Math.PI / 180) || longitude > 330 * (Math.PI / 180);
|
|
6457
6456
|
return latitudeVisible && longitudeVisible;
|
|
6458
6457
|
}
|
|
6459
|
-
class Controller extends Controller$
|
|
6458
|
+
class Controller$1 extends Controller$4 {
|
|
6460
6459
|
constructor(five, params) {
|
|
6461
6460
|
var _a;
|
|
6462
6461
|
super(five);
|
|
@@ -6873,7 +6872,7 @@ class Controller extends Controller$3 {
|
|
|
6873
6872
|
const fiveCurrentState = this.five.getCurrentState();
|
|
6874
6873
|
if (shouldFloorplanHideWithPose(fiveCurrentState)) {
|
|
6875
6874
|
this.updateState({ visible: false }, userAction);
|
|
6876
|
-
this._hide({ userAction });
|
|
6875
|
+
this._hide({ userAction, isAutoHide: true });
|
|
6877
6876
|
}
|
|
6878
6877
|
}
|
|
6879
6878
|
});
|
|
@@ -7046,6 +7045,13 @@ class Controller extends Controller$3 {
|
|
|
7046
7045
|
state.visible ? this._show(options) : this._hide(options);
|
|
7047
7046
|
}
|
|
7048
7047
|
}
|
|
7048
|
+
changeConfigs(_config, userAction = true) {
|
|
7049
|
+
const config = Object.assign(Object.assign({}, this.state.config), _config);
|
|
7050
|
+
this.updateState({ config }, userAction);
|
|
7051
|
+
if (!this.container)
|
|
7052
|
+
return;
|
|
7053
|
+
this.render();
|
|
7054
|
+
}
|
|
7049
7055
|
async formatData(serverData) {
|
|
7050
7056
|
return await formatData(serverData.data);
|
|
7051
7057
|
}
|
|
@@ -7118,7 +7124,7 @@ class Controller extends Controller$3 {
|
|
|
7118
7124
|
}
|
|
7119
7125
|
|
|
7120
7126
|
const ModelFloorplanPlugin = (five, params) => {
|
|
7121
|
-
return new Controller(five, params);
|
|
7127
|
+
return new Controller$1(five, params);
|
|
7122
7128
|
};
|
|
7123
7129
|
|
|
7124
7130
|
/** 房屋数据映射表 */
|
|
@@ -8344,31 +8350,792 @@ const PanoRulerPlugin = (five, params) => {
|
|
|
8344
8350
|
};
|
|
8345
8351
|
};
|
|
8346
8352
|
|
|
8347
|
-
|
|
8353
|
+
/* src/PanoRulerProPlugin/RulerItem.svelte generated by Svelte v3.47.0 */
|
|
8348
8354
|
|
|
8349
|
-
function
|
|
8350
|
-
|
|
8351
|
-
|
|
8352
|
-
|
|
8353
|
-
|
|
8354
|
-
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8355
|
+
function add_css$6(target) {
|
|
8356
|
+
append_styles(target, "svelte-qy4ud2", ".PanoRulerPlugin-rule-line.svelte-qy4ud2.svelte-qy4ud2{position:absolute;transform-origin:left 0.0625rem;width:0;height:0.125rem;pointer-events:none}.PanoRulerPlugin-rule-line.svelte-qy4ud2.svelte-qy4ud2::after{content:'';position:absolute;left:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;-webkit-animation:svelte-qy4ud2-viewport-rule-point 0.1s 1s;animation:svelte-qy4ud2-viewport-rule-point 0.1s 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-qy4ud2.svelte-qy4ud2::before{content:'';position:absolute;right:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;-webkit-animation:svelte-qy4ud2-viewport-rule-point 0.1s 1.5s;animation:svelte-qy4ud2-viewport-rule-point 0.1s 1.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-qy4ud2 em.svelte-qy4ud2{display:block;height:0.0625rem;-webkit-animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;box-shadow:0 0 0.25rem rgb(0 0 0 / 40%);position:relative}.rule-mixed-line.svelte-qy4ud2.svelte-qy4ud2{display:flex;height:0.0625rem;-webkit-animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;animation:svelte-qy4ud2-viewport-rule-line 0.5s ease 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;align-items:center}.em-solid.svelte-qy4ud2.svelte-qy4ud2{height:100%;background:#ffffff}.em-dotted.svelte-qy4ud2.svelte-qy4ud2{height:0.125rem;background:var(--background-image);background-position:center;background-repeat:repeat}.PanoRulerPlugin-rule-label.svelte-qy4ud2.svelte-qy4ud2{position:absolute;width:0;height:0;top:0.0625rem;pointer-events:none}.PanoRulerPlugin-rule-label-name.svelte-qy4ud2.svelte-qy4ud2{position:absolute;padding:0.1875rem 0.375rem;background:rgba(195, 195, 195, 0.3);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem);border-radius:6.25rem;border:0.0625rem solid rgba(255, 255, 255, 0.6);white-space:nowrap;overflow:hidden;color:#ffffff;font-weight:500;font-size:0.75rem;line-height:1;-webkit-animation:svelte-qy4ud2-viewport-rule-label 0.25s ease 1s;animation:svelte-qy4ud2-viewport-rule-label 0.25s ease 1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;box-shadow:inset 0 0 0.625rem 0 rgba(255, 255, 255, 0.3)}@-webkit-keyframes svelte-qy4ud2-viewport-rule-line{0%{width:0%}100%{width:100%}}@keyframes svelte-qy4ud2-viewport-rule-line{0%{width:0%}100%{width:100%}}@-webkit-keyframes svelte-qy4ud2-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@keyframes svelte-qy4ud2-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@-webkit-keyframes svelte-qy4ud2-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}@keyframes svelte-qy4ud2-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}");
|
|
8357
|
+
}
|
|
8358
|
+
|
|
8359
|
+
function get_each_context$4(ctx, list, i) {
|
|
8360
|
+
const child_ctx = ctx.slice();
|
|
8361
|
+
child_ctx[6] = list[i];
|
|
8362
|
+
return child_ctx;
|
|
8363
|
+
}
|
|
8364
|
+
|
|
8365
|
+
// (28:2) {:else}
|
|
8366
|
+
function create_else_block(ctx) {
|
|
8367
|
+
let div;
|
|
8368
|
+
let each_value = /*rulerItemProp*/ ctx[0].children;
|
|
8369
|
+
let each_blocks = [];
|
|
8370
|
+
|
|
8371
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
8372
|
+
each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i));
|
|
8373
|
+
}
|
|
8374
|
+
|
|
8375
|
+
return {
|
|
8376
|
+
c() {
|
|
8377
|
+
div = element("div");
|
|
8378
|
+
|
|
8379
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
8380
|
+
each_blocks[i].c();
|
|
8381
|
+
}
|
|
8382
|
+
|
|
8383
|
+
attr(div, "class", "rule-mixed-line svelte-qy4ud2");
|
|
8384
|
+
},
|
|
8385
|
+
m(target, anchor) {
|
|
8386
|
+
insert(target, div, anchor);
|
|
8387
|
+
|
|
8388
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
8389
|
+
each_blocks[i].m(div, null);
|
|
8390
|
+
}
|
|
8391
|
+
},
|
|
8392
|
+
p(ctx, dirty) {
|
|
8393
|
+
if (dirty & /*rulerItemProp, vars*/ 9) {
|
|
8394
|
+
each_value = /*rulerItemProp*/ ctx[0].children;
|
|
8395
|
+
let i;
|
|
8396
|
+
|
|
8397
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
8398
|
+
const child_ctx = get_each_context$4(ctx, each_value, i);
|
|
8399
|
+
|
|
8400
|
+
if (each_blocks[i]) {
|
|
8401
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
8402
|
+
} else {
|
|
8403
|
+
each_blocks[i] = create_each_block$4(child_ctx);
|
|
8404
|
+
each_blocks[i].c();
|
|
8405
|
+
each_blocks[i].m(div, null);
|
|
8406
|
+
}
|
|
8407
|
+
}
|
|
8408
|
+
|
|
8409
|
+
for (; i < each_blocks.length; i += 1) {
|
|
8410
|
+
each_blocks[i].d(1);
|
|
8411
|
+
}
|
|
8412
|
+
|
|
8413
|
+
each_blocks.length = each_value.length;
|
|
8414
|
+
}
|
|
8415
|
+
},
|
|
8416
|
+
d(detaching) {
|
|
8417
|
+
if (detaching) detach(div);
|
|
8418
|
+
destroy_each(each_blocks, detaching);
|
|
8419
|
+
}
|
|
8420
|
+
};
|
|
8421
|
+
}
|
|
8422
|
+
|
|
8423
|
+
// (26:2) {#if rulerItemProp.children.length === 0}
|
|
8424
|
+
function create_if_block$2(ctx) {
|
|
8425
|
+
let em;
|
|
8426
|
+
let em_class_value;
|
|
8427
|
+
|
|
8428
|
+
return {
|
|
8429
|
+
c() {
|
|
8430
|
+
em = element("em");
|
|
8431
|
+
|
|
8432
|
+
attr(em, "class", em_class_value = "" + (null_to_empty(/*rulerItemProp*/ ctx[0].state
|
|
8433
|
+
? 'em-solid'
|
|
8434
|
+
: 'em-dotted') + " svelte-qy4ud2"));
|
|
8435
|
+
|
|
8436
|
+
attr(em, "style", /*vars*/ ctx[3]);
|
|
8437
|
+
},
|
|
8438
|
+
m(target, anchor) {
|
|
8439
|
+
insert(target, em, anchor);
|
|
8440
|
+
},
|
|
8441
|
+
p(ctx, dirty) {
|
|
8442
|
+
if (dirty & /*rulerItemProp*/ 1 && em_class_value !== (em_class_value = "" + (null_to_empty(/*rulerItemProp*/ ctx[0].state
|
|
8443
|
+
? 'em-solid'
|
|
8444
|
+
: 'em-dotted') + " svelte-qy4ud2"))) {
|
|
8445
|
+
attr(em, "class", em_class_value);
|
|
8446
|
+
}
|
|
8447
|
+
|
|
8448
|
+
if (dirty & /*vars*/ 8) {
|
|
8449
|
+
attr(em, "style", /*vars*/ ctx[3]);
|
|
8450
|
+
}
|
|
8451
|
+
},
|
|
8452
|
+
d(detaching) {
|
|
8453
|
+
if (detaching) detach(em);
|
|
8454
|
+
}
|
|
8455
|
+
};
|
|
8456
|
+
}
|
|
8457
|
+
|
|
8458
|
+
// (30:6) {#each rulerItemProp.children as child}
|
|
8459
|
+
function create_each_block$4(ctx) {
|
|
8460
|
+
let div;
|
|
8461
|
+
let div_class_value;
|
|
8462
|
+
let style_width = `${/*child*/ ctx[6].width}px`;
|
|
8463
|
+
|
|
8464
|
+
return {
|
|
8465
|
+
c() {
|
|
8466
|
+
div = element("div");
|
|
8467
|
+
attr(div, "class", div_class_value = "" + (null_to_empty(/*child*/ ctx[6].state ? 'em-solid' : 'em-dotted') + " svelte-qy4ud2"));
|
|
8468
|
+
attr(div, "style", /*vars*/ ctx[3]);
|
|
8469
|
+
set_style(div, "width", style_width, false);
|
|
8470
|
+
},
|
|
8471
|
+
m(target, anchor) {
|
|
8472
|
+
insert(target, div, anchor);
|
|
8473
|
+
},
|
|
8474
|
+
p(ctx, dirty) {
|
|
8475
|
+
if (dirty & /*rulerItemProp*/ 1 && div_class_value !== (div_class_value = "" + (null_to_empty(/*child*/ ctx[6].state ? 'em-solid' : 'em-dotted') + " svelte-qy4ud2"))) {
|
|
8476
|
+
attr(div, "class", div_class_value);
|
|
8477
|
+
}
|
|
8478
|
+
|
|
8479
|
+
if (dirty & /*vars*/ 8) {
|
|
8480
|
+
attr(div, "style", /*vars*/ ctx[3]);
|
|
8481
|
+
}
|
|
8482
|
+
|
|
8483
|
+
if (dirty & /*rulerItemProp*/ 1 && style_width !== (style_width = `${/*child*/ ctx[6].width}px`)) {
|
|
8484
|
+
set_style(div, "width", style_width, false);
|
|
8485
|
+
}
|
|
8486
|
+
},
|
|
8487
|
+
d(detaching) {
|
|
8488
|
+
if (detaching) detach(div);
|
|
8489
|
+
}
|
|
8490
|
+
};
|
|
8491
|
+
}
|
|
8492
|
+
|
|
8493
|
+
function create_fragment$7(ctx) {
|
|
8494
|
+
let div2;
|
|
8495
|
+
let t0;
|
|
8496
|
+
let div1;
|
|
8497
|
+
let div0;
|
|
8498
|
+
let t1_value = /*rulerItemProp*/ ctx[0].labelElement + "";
|
|
8499
|
+
let t1;
|
|
8500
|
+
let div0_resize_listener;
|
|
8501
|
+
let style_left = `${/*rulerItemProp*/ ctx[0].labelOffset}%`;
|
|
8502
|
+
let style_width = `${/*rulerItemProp*/ ctx[0].width}px`;
|
|
8503
|
+
let style_left_1 = `${/*rulerItemProp*/ ctx[0].left}px`;
|
|
8504
|
+
let style_top = `${/*rulerItemProp*/ ctx[0].top}px`;
|
|
8505
|
+
let style_transform = `rotate(${/*rulerItemProp*/ ctx[0].rotateDeg}deg)`;
|
|
8506
|
+
|
|
8507
|
+
function select_block_type(ctx, dirty) {
|
|
8508
|
+
if (/*rulerItemProp*/ ctx[0].children.length === 0) return create_if_block$2;
|
|
8509
|
+
return create_else_block;
|
|
8510
|
+
}
|
|
8511
|
+
|
|
8512
|
+
let current_block_type = select_block_type(ctx);
|
|
8513
|
+
let if_block = current_block_type(ctx);
|
|
8514
|
+
|
|
8515
|
+
return {
|
|
8516
|
+
c() {
|
|
8517
|
+
div2 = element("div");
|
|
8518
|
+
if_block.c();
|
|
8519
|
+
t0 = space();
|
|
8520
|
+
div1 = element("div");
|
|
8521
|
+
div0 = element("div");
|
|
8522
|
+
t1 = text(t1_value);
|
|
8523
|
+
attr(div0, "class", "PanoRulerPlugin-rule-label-name svelte-qy4ud2");
|
|
8524
|
+
add_render_callback(() => /*div0_elementresize_handler*/ ctx[4].call(div0));
|
|
8525
|
+
attr(div1, "class", "PanoRulerPlugin-rule-label svelte-qy4ud2");
|
|
8526
|
+
set_style(div1, "left", style_left, false);
|
|
8527
|
+
attr(div2, "class", "PanoRulerPlugin-rule-line svelte-qy4ud2");
|
|
8528
|
+
set_style(div2, "width", style_width, false);
|
|
8529
|
+
set_style(div2, "left", style_left_1, false);
|
|
8530
|
+
set_style(div2, "top", style_top, false);
|
|
8531
|
+
set_style(div2, "transform", style_transform, false);
|
|
8532
|
+
|
|
8533
|
+
set_style(
|
|
8534
|
+
div2,
|
|
8535
|
+
"display",
|
|
8536
|
+
/*rulerItemProp*/ ctx[0].visible && /*_visible*/ ctx[2]
|
|
8537
|
+
? 'block'
|
|
8538
|
+
: 'none',
|
|
8539
|
+
false
|
|
8540
|
+
);
|
|
8541
|
+
},
|
|
8542
|
+
m(target, anchor) {
|
|
8543
|
+
insert(target, div2, anchor);
|
|
8544
|
+
if_block.m(div2, null);
|
|
8545
|
+
append(div2, t0);
|
|
8546
|
+
append(div2, div1);
|
|
8547
|
+
append(div1, div0);
|
|
8548
|
+
append(div0, t1);
|
|
8549
|
+
div0_resize_listener = add_resize_listener(div0, /*div0_elementresize_handler*/ ctx[4].bind(div0));
|
|
8550
|
+
},
|
|
8551
|
+
p(ctx, [dirty]) {
|
|
8552
|
+
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
|
|
8553
|
+
if_block.p(ctx, dirty);
|
|
8554
|
+
} else {
|
|
8555
|
+
if_block.d(1);
|
|
8556
|
+
if_block = current_block_type(ctx);
|
|
8557
|
+
|
|
8558
|
+
if (if_block) {
|
|
8559
|
+
if_block.c();
|
|
8560
|
+
if_block.m(div2, t0);
|
|
8561
|
+
}
|
|
8562
|
+
}
|
|
8563
|
+
|
|
8564
|
+
if (dirty & /*rulerItemProp*/ 1 && t1_value !== (t1_value = /*rulerItemProp*/ ctx[0].labelElement + "")) set_data(t1, t1_value);
|
|
8565
|
+
|
|
8566
|
+
if (dirty & /*rulerItemProp*/ 1 && style_left !== (style_left = `${/*rulerItemProp*/ ctx[0].labelOffset}%`)) {
|
|
8567
|
+
set_style(div1, "left", style_left, false);
|
|
8568
|
+
}
|
|
8569
|
+
|
|
8570
|
+
if (dirty & /*rulerItemProp*/ 1 && style_width !== (style_width = `${/*rulerItemProp*/ ctx[0].width}px`)) {
|
|
8571
|
+
set_style(div2, "width", style_width, false);
|
|
8572
|
+
}
|
|
8573
|
+
|
|
8574
|
+
if (dirty & /*rulerItemProp*/ 1 && style_left_1 !== (style_left_1 = `${/*rulerItemProp*/ ctx[0].left}px`)) {
|
|
8575
|
+
set_style(div2, "left", style_left_1, false);
|
|
8576
|
+
}
|
|
8577
|
+
|
|
8578
|
+
if (dirty & /*rulerItemProp*/ 1 && style_top !== (style_top = `${/*rulerItemProp*/ ctx[0].top}px`)) {
|
|
8579
|
+
set_style(div2, "top", style_top, false);
|
|
8580
|
+
}
|
|
8581
|
+
|
|
8582
|
+
if (dirty & /*rulerItemProp*/ 1 && style_transform !== (style_transform = `rotate(${/*rulerItemProp*/ ctx[0].rotateDeg}deg)`)) {
|
|
8583
|
+
set_style(div2, "transform", style_transform, false);
|
|
8584
|
+
}
|
|
8585
|
+
|
|
8586
|
+
if (dirty & /*rulerItemProp, _visible*/ 5) {
|
|
8587
|
+
set_style(
|
|
8588
|
+
div2,
|
|
8589
|
+
"display",
|
|
8590
|
+
/*rulerItemProp*/ ctx[0].visible && /*_visible*/ ctx[2]
|
|
8591
|
+
? 'block'
|
|
8592
|
+
: 'none',
|
|
8593
|
+
false
|
|
8594
|
+
);
|
|
8595
|
+
}
|
|
8596
|
+
},
|
|
8597
|
+
i: noop$1,
|
|
8598
|
+
o: noop$1,
|
|
8599
|
+
d(detaching) {
|
|
8600
|
+
if (detaching) detach(div2);
|
|
8601
|
+
if_block.d();
|
|
8602
|
+
div0_resize_listener();
|
|
8603
|
+
}
|
|
8604
|
+
};
|
|
8605
|
+
}
|
|
8606
|
+
|
|
8607
|
+
function instance$7($$self, $$props, $$invalidate) {
|
|
8608
|
+
let vars;
|
|
8609
|
+
let { rulerItemProp } = $$props;
|
|
8610
|
+
let _visible = true;
|
|
8611
|
+
let labelWidth;
|
|
8612
|
+
let EM_DOTTED_BG = `data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQiIHdpZHRoPSIxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PGZpbHRlciBpZD0icHJlZml4X19hIiBoZWlnaHQ9IjQwMCUiIHdpZHRoPSIxMzcuNCUiIHg9Ii0xOC43JSIgeT0iLTE1MCUiPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiBvcGVyYXRvcj0iZGlsYXRlIiByYWRpdXM9Ii41IiByZXN1bHQ9InNoYWRvd1NwcmVhZE91dGVyMSIvPjxmZU9mZnNldCBpbj0ic2hhZG93U3ByZWFkT3V0ZXIxIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSIvPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiByYWRpdXM9IjEiIHJlc3VsdD0ic2hhZG93SW5uZXIiLz48ZmVPZmZzZXQgaW49InNoYWRvd0lubmVyIiByZXN1bHQ9InNoYWRvd0lubmVyIi8+PGZlQ29tcG9zaXRlIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIGluMj0ic2hhZG93SW5uZXIiIG9wZXJhdG9yPSJvdXQiIHJlc3VsdD0ic2hhZG93T2Zmc2V0T3V0ZXIxIi8+PGZlR2F1c3NpYW5CbHVyIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSIgc3RkRGV2aWF0aW9uPSIuNSIvPjxmZUNvbG9yTWF0cml4IGluPSJzaGFkb3dCbHVyT3V0ZXIxIiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMiAwIi8+PC9maWx0ZXI+PHBhdGggaWQ9InByZWZpeF9fYiIgZD0iTS44ODkgMkgxMS41OCIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1kYXNoYXJyYXk9IjUgNiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48dXNlIGZpbGw9IiMwMDAiIGZpbHRlcj0idXJsKCNwcmVmaXhfX2EpIiB4bGluazpocmVmPSIjcHJlZml4X19iIi8+PHVzZSBzdHJva2U9IiNmZmYiIHN0cm9rZS1vcGFjaXR5PSIuNCIgeGxpbms6aHJlZj0iI3ByZWZpeF9fYiIvPjwvZz48L3N2Zz4=`;
|
|
8613
|
+
|
|
8614
|
+
function div0_elementresize_handler() {
|
|
8615
|
+
labelWidth = this.offsetWidth;
|
|
8616
|
+
$$invalidate(1, labelWidth);
|
|
8617
|
+
}
|
|
8618
|
+
|
|
8619
|
+
$$self.$$set = $$props => {
|
|
8620
|
+
if ('rulerItemProp' in $$props) $$invalidate(0, rulerItemProp = $$props.rulerItemProp);
|
|
8621
|
+
};
|
|
8622
|
+
|
|
8623
|
+
$$self.$$.update = () => {
|
|
8624
|
+
if ($$self.$$.dirty & /*labelWidth, rulerItemProp*/ 3) {
|
|
8625
|
+
{
|
|
8626
|
+
if (labelWidth >= rulerItemProp.width || labelWidth / 2 >= rulerItemProp.labelOffset / 100 * rulerItemProp.width || labelWidth / 2 >= (1 - rulerItemProp.labelOffset / 100) * rulerItemProp.width) {
|
|
8627
|
+
$$invalidate(2, _visible = false);
|
|
8628
|
+
} else {
|
|
8629
|
+
$$invalidate(2, _visible = true);
|
|
8630
|
+
}
|
|
8631
|
+
}
|
|
8632
|
+
}
|
|
8633
|
+
};
|
|
8634
|
+
|
|
8635
|
+
$$invalidate(3, vars = `--background-image: url(${EM_DOTTED_BG})`);
|
|
8636
|
+
return [rulerItemProp, labelWidth, _visible, vars, div0_elementresize_handler];
|
|
8637
|
+
}
|
|
8638
|
+
|
|
8639
|
+
class RulerItem extends SvelteComponent {
|
|
8640
|
+
constructor(options) {
|
|
8641
|
+
super();
|
|
8642
|
+
init(this, options, instance$7, create_fragment$7, safe_not_equal, { rulerItemProp: 0 }, add_css$6);
|
|
8643
|
+
}
|
|
8644
|
+
}
|
|
8645
|
+
|
|
8646
|
+
/* src/PanoRulerProPlugin/RulerItems.svelte generated by Svelte v3.47.0 */
|
|
8647
|
+
|
|
8648
|
+
function get_each_context$3(ctx, list, i) {
|
|
8649
|
+
const child_ctx = ctx.slice();
|
|
8650
|
+
child_ctx[16] = list[i];
|
|
8651
|
+
return child_ctx;
|
|
8652
|
+
}
|
|
8653
|
+
|
|
8654
|
+
// (206:2) {#each rulerItemProp as itemData}
|
|
8655
|
+
function create_each_block$3(ctx) {
|
|
8656
|
+
let ruleritem;
|
|
8657
|
+
let current;
|
|
8658
|
+
|
|
8659
|
+
ruleritem = new RulerItem({
|
|
8660
|
+
props: { rulerItemProp: /*itemData*/ ctx[16] }
|
|
8661
|
+
});
|
|
8662
|
+
|
|
8663
|
+
return {
|
|
8664
|
+
c() {
|
|
8665
|
+
create_component(ruleritem.$$.fragment);
|
|
8666
|
+
},
|
|
8667
|
+
m(target, anchor) {
|
|
8668
|
+
mount_component(ruleritem, target, anchor);
|
|
8669
|
+
current = true;
|
|
8670
|
+
},
|
|
8671
|
+
p(ctx, dirty) {
|
|
8672
|
+
const ruleritem_changes = {};
|
|
8673
|
+
if (dirty & /*rulerItemProp*/ 1) ruleritem_changes.rulerItemProp = /*itemData*/ ctx[16];
|
|
8674
|
+
ruleritem.$set(ruleritem_changes);
|
|
8675
|
+
},
|
|
8676
|
+
i(local) {
|
|
8677
|
+
if (current) return;
|
|
8678
|
+
transition_in(ruleritem.$$.fragment, local);
|
|
8679
|
+
current = true;
|
|
8680
|
+
},
|
|
8681
|
+
o(local) {
|
|
8682
|
+
transition_out(ruleritem.$$.fragment, local);
|
|
8683
|
+
current = false;
|
|
8684
|
+
},
|
|
8685
|
+
d(detaching) {
|
|
8686
|
+
destroy_component(ruleritem, detaching);
|
|
8687
|
+
}
|
|
8688
|
+
};
|
|
8689
|
+
}
|
|
8690
|
+
|
|
8691
|
+
function create_fragment$6(ctx) {
|
|
8692
|
+
let div;
|
|
8693
|
+
let current;
|
|
8694
|
+
let each_value = /*rulerItemProp*/ ctx[0];
|
|
8695
|
+
let each_blocks = [];
|
|
8696
|
+
|
|
8697
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
8698
|
+
each_blocks[i] = create_each_block$3(get_each_context$3(ctx, each_value, i));
|
|
8699
|
+
}
|
|
8700
|
+
|
|
8701
|
+
const out = i => transition_out(each_blocks[i], 1, 1, () => {
|
|
8702
|
+
each_blocks[i] = null;
|
|
8703
|
+
});
|
|
8704
|
+
|
|
8705
|
+
return {
|
|
8706
|
+
c() {
|
|
8707
|
+
div = element("div");
|
|
8708
|
+
|
|
8709
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
8710
|
+
each_blocks[i].c();
|
|
8711
|
+
}
|
|
8712
|
+
},
|
|
8713
|
+
m(target, anchor) {
|
|
8714
|
+
insert(target, div, anchor);
|
|
8715
|
+
|
|
8716
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
8717
|
+
each_blocks[i].m(div, null);
|
|
8718
|
+
}
|
|
8719
|
+
|
|
8720
|
+
current = true;
|
|
8721
|
+
},
|
|
8722
|
+
p(ctx, [dirty]) {
|
|
8723
|
+
if (dirty & /*rulerItemProp*/ 1) {
|
|
8724
|
+
each_value = /*rulerItemProp*/ ctx[0];
|
|
8725
|
+
let i;
|
|
8726
|
+
|
|
8727
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
8728
|
+
const child_ctx = get_each_context$3(ctx, each_value, i);
|
|
8729
|
+
|
|
8730
|
+
if (each_blocks[i]) {
|
|
8731
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
8732
|
+
transition_in(each_blocks[i], 1);
|
|
8733
|
+
} else {
|
|
8734
|
+
each_blocks[i] = create_each_block$3(child_ctx);
|
|
8735
|
+
each_blocks[i].c();
|
|
8736
|
+
transition_in(each_blocks[i], 1);
|
|
8737
|
+
each_blocks[i].m(div, null);
|
|
8738
|
+
}
|
|
8739
|
+
}
|
|
8740
|
+
|
|
8741
|
+
group_outros();
|
|
8742
|
+
|
|
8743
|
+
for (i = each_value.length; i < each_blocks.length; i += 1) {
|
|
8744
|
+
out(i);
|
|
8745
|
+
}
|
|
8746
|
+
|
|
8747
|
+
check_outros();
|
|
8748
|
+
}
|
|
8749
|
+
},
|
|
8750
|
+
i(local) {
|
|
8751
|
+
if (current) return;
|
|
8752
|
+
|
|
8753
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
8754
|
+
transition_in(each_blocks[i]);
|
|
8755
|
+
}
|
|
8756
|
+
|
|
8757
|
+
current = true;
|
|
8758
|
+
},
|
|
8759
|
+
o(local) {
|
|
8760
|
+
each_blocks = each_blocks.filter(Boolean);
|
|
8761
|
+
|
|
8762
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
8763
|
+
transition_out(each_blocks[i]);
|
|
8764
|
+
}
|
|
8765
|
+
|
|
8766
|
+
current = false;
|
|
8767
|
+
},
|
|
8768
|
+
d(detaching) {
|
|
8769
|
+
if (detaching) detach(div);
|
|
8770
|
+
destroy_each(each_blocks, detaching);
|
|
8771
|
+
}
|
|
8772
|
+
};
|
|
8773
|
+
}
|
|
8774
|
+
|
|
8775
|
+
function instance$6($$self, $$props, $$invalidate) {
|
|
8776
|
+
var _a, _b, _c, _d;
|
|
8777
|
+
let { five } = $$props;
|
|
8778
|
+
let { rulerDatas } = $$props;
|
|
8779
|
+
let { options } = $$props;
|
|
8780
|
+
let rulerItemProp = [];
|
|
8781
|
+
|
|
8782
|
+
const canvasWidth = ((_b = (_a = five.getElement()) === null || _a === void 0
|
|
8783
|
+
? void 0
|
|
8784
|
+
: _a.parentElement) === null || _b === void 0
|
|
8785
|
+
? void 0
|
|
8786
|
+
: _b.clientWidth) || 0;
|
|
8787
|
+
|
|
8788
|
+
const canvasHeight = ((_d = (_c = five.getElement()) === null || _c === void 0
|
|
8789
|
+
? void 0
|
|
8790
|
+
: _c.parentElement) === null || _d === void 0
|
|
8791
|
+
? void 0
|
|
8792
|
+
: _d.clientHeight) || 0;
|
|
8793
|
+
|
|
8794
|
+
const getRuleScreenIntr = (startPoint, endPoint) => {
|
|
8795
|
+
const screenLines = [
|
|
8796
|
+
[{ x: 0, y: 0 }, { x: canvasWidth, y: 0 }],
|
|
8797
|
+
[{ x: 0, y: 0 }, { x: 0, y: canvasHeight }],
|
|
8798
|
+
[{ x: canvasWidth, y: 0 }, { x: canvasWidth, y: canvasHeight }],
|
|
8799
|
+
[{ x: 0, y: canvasHeight }, { x: canvasWidth, y: canvasHeight }]
|
|
8800
|
+
];
|
|
8801
|
+
|
|
8802
|
+
const intr = [];
|
|
8803
|
+
|
|
8804
|
+
for (let i = 0; i < screenLines.length; i++) {
|
|
8805
|
+
const result = intersectionOfLine([startPoint, endPoint], [screenLines[i][0], screenLines[i][1]], true);
|
|
8806
|
+
if (result) intr.push(result);
|
|
8807
|
+
}
|
|
8808
|
+
|
|
8809
|
+
if (intr.length === 0) return false; else {
|
|
8810
|
+
return intr;
|
|
8811
|
+
}
|
|
8812
|
+
};
|
|
8813
|
+
|
|
8814
|
+
const getPosition = (start, end) => {
|
|
8815
|
+
const startPoint = start.clone().project(five.camera);
|
|
8816
|
+
const startLeft = (startPoint.x + 1) / 2 * canvasWidth;
|
|
8817
|
+
const startTop = (-startPoint.y + 1) / 2 * canvasHeight;
|
|
8818
|
+
const endPoint = end.clone().project(five.camera);
|
|
8819
|
+
const endLeft = (endPoint.x + 1) / 2 * canvasWidth;
|
|
8820
|
+
const endTop = (-endPoint.y + 1) / 2 * canvasHeight;
|
|
8821
|
+
const distance = Math.sqrt(Math.pow(endLeft - startLeft, 2) + Math.pow(endTop - startTop, 2));
|
|
8822
|
+
|
|
8823
|
+
return {
|
|
8824
|
+
startLeft,
|
|
8825
|
+
startTop,
|
|
8826
|
+
endLeft,
|
|
8827
|
+
endTop,
|
|
8828
|
+
distance
|
|
8829
|
+
};
|
|
8830
|
+
};
|
|
8831
|
+
|
|
8832
|
+
const getPositionAndVisible = (start, end, visibleOrigin) => {
|
|
8833
|
+
const cameraPosition = five.camera.position;
|
|
8834
|
+
const cameraDirection = five.camera.getWorldDirection(new Vector3$1());
|
|
8835
|
+
const startAngle = start.clone().sub(cameraPosition).normalize().angleTo(cameraDirection);
|
|
8836
|
+
const endAngle = end.clone().sub(cameraPosition).normalize().angleTo(cameraDirection);
|
|
8837
|
+
const ruleLength = start.distanceTo(end);
|
|
8838
|
+
const midPoint = end.clone().sub(end.clone().sub(start).divide(new Vector3$1(2, 2, 2)));
|
|
8839
|
+
const disFromCameraToMid = midPoint.distanceTo(cameraPosition);
|
|
8840
|
+
const { startLeft, startTop, endLeft, endTop, distance } = getPosition(start, end);
|
|
8841
|
+
const rad = Math.PI / 2 - Math.atan2(endLeft - startLeft, startTop - endTop);
|
|
8842
|
+
const deg = -(rad / Math.PI) * 180;
|
|
8843
|
+
let visible = true;
|
|
8844
|
+
if (!visibleOrigin) visible = false;
|
|
8845
|
+
|
|
8846
|
+
// 只显示拐点相连的线
|
|
8847
|
+
if (!equal(start, visibleOrigin) && !equal(end, visibleOrigin)) {
|
|
8848
|
+
visible = false;
|
|
8849
|
+
}
|
|
8850
|
+
|
|
8851
|
+
// 线小于0.3m隐藏
|
|
8852
|
+
if (ruleLength < 0.3) {
|
|
8853
|
+
visible = false;
|
|
8854
|
+
}
|
|
8855
|
+
|
|
8856
|
+
if (startAngle > Math.PI / 2) {
|
|
8857
|
+
visible = false;
|
|
8858
|
+
}
|
|
8859
|
+
|
|
8860
|
+
if (endAngle > Math.PI / 2) {
|
|
8861
|
+
visible = false;
|
|
8862
|
+
}
|
|
8863
|
+
|
|
8864
|
+
if (disFromCameraToMid / ruleLength > 8) {
|
|
8865
|
+
visible = false;
|
|
8866
|
+
}
|
|
8867
|
+
|
|
8868
|
+
let labelOffset = 50;
|
|
8869
|
+
let visibleLength = distance;
|
|
8870
|
+
const intr = getRuleScreenIntr({ x: ~~startLeft, y: ~~startTop }, { x: ~~endLeft, y: ~~endTop });
|
|
8871
|
+
|
|
8872
|
+
if (intr && intr.length === 1) {
|
|
8873
|
+
if (equal(start, visibleOrigin)) {
|
|
8874
|
+
visibleLength = Math.sqrt(Math.pow(intr[0].x - startLeft, 2) + Math.pow(intr[0].y - startTop, 2));
|
|
8875
|
+
labelOffset = visibleLength / distance * 50;
|
|
8876
|
+
} else if (equal(end, visibleOrigin)) {
|
|
8877
|
+
visibleLength = Math.sqrt(Math.pow(intr[0].x - endLeft, 2) + Math.pow(intr[0].y - endTop, 2));
|
|
8878
|
+
labelOffset = 100 - visibleLength / distance * 50;
|
|
8879
|
+
}
|
|
8880
|
+
}
|
|
8881
|
+
|
|
8882
|
+
if (intr && intr.length === 2) {
|
|
8883
|
+
const middlePoint = {
|
|
8884
|
+
x: (intr[0].x + intr[1].x) / 2,
|
|
8885
|
+
y: (intr[0].y + intr[1].y) / 2
|
|
8886
|
+
};
|
|
8887
|
+
|
|
8888
|
+
const distanceFromStart = Math.sqrt(Math.pow(middlePoint.x - startLeft, 2) + Math.pow(middlePoint.y - startTop, 2));
|
|
8889
|
+
labelOffset = distanceFromStart / distance * 100;
|
|
8890
|
+
}
|
|
8891
|
+
|
|
8892
|
+
return {
|
|
8893
|
+
startLeft,
|
|
8894
|
+
startTop,
|
|
8895
|
+
distance,
|
|
8896
|
+
deg,
|
|
8897
|
+
visible,
|
|
8898
|
+
labelOffset,
|
|
8899
|
+
ruleLength
|
|
8900
|
+
};
|
|
8901
|
+
};
|
|
8902
|
+
|
|
8903
|
+
const updatePanoRulerData = () => {
|
|
8904
|
+
const panoIndex = five.panoIndex;
|
|
8905
|
+
const rulerData = rulerDatas.find(data => data.panoIndex === panoIndex);
|
|
8906
|
+
if (!rulerData) return $$invalidate(0, rulerItemProp = []);
|
|
8907
|
+
|
|
8908
|
+
// 非全景模式下隐藏所有标尺
|
|
8909
|
+
if (five.currentMode !== Five.Mode.Panorama) return $$invalidate(0, rulerItemProp = []);
|
|
8910
|
+
|
|
8911
|
+
const cameraPosition = five.camera.position;
|
|
8912
|
+
const cameraDirection = five.camera.getWorldDirection(new Vector3$1());
|
|
8913
|
+
const startPoints = rulerData.lines.map(v => new Vector3$1(v.start[0], -v.start[1], -v.start[2]));
|
|
8914
|
+
const endPoints = rulerData.lines.map(v => new Vector3$1(v.end[0], -v.end[1], -v.end[2]));
|
|
8915
|
+
|
|
8916
|
+
// 可以看到的角度最小的拐点
|
|
8917
|
+
const [visibleOrigin] = startPoints.concat(endPoints).sort((pointA, pointB) => {
|
|
8918
|
+
const angleA = pointA.clone().setY(0).sub(cameraPosition).normalize().angleTo(cameraDirection.clone().setY(0));
|
|
8919
|
+
const angleB = pointB.clone().setY(0).sub(cameraPosition).normalize().angleTo(cameraDirection.clone().setY(0));
|
|
8920
|
+
return angleA - angleB;
|
|
8921
|
+
});
|
|
8922
|
+
|
|
8923
|
+
const data = rulerData.lines.map(line => {
|
|
8924
|
+
var _a, _b;
|
|
8925
|
+
const start = line.start;
|
|
8926
|
+
const end = line.end;
|
|
8927
|
+
const { startLeft, startTop, distance, deg, visible, labelOffset, ruleLength } = getPositionAndVisible(new Vector3$1(start[0], -start[1], -start[2]), new Vector3$1(end[0], -end[1], -end[2]), visibleOrigin);
|
|
8928
|
+
const children = [];
|
|
8929
|
+
|
|
8930
|
+
if (line.children && ((_a = line.children) === null || _a === void 0
|
|
8931
|
+
? void 0
|
|
8932
|
+
: _a.length) > 0) {
|
|
8933
|
+
(_b = line.children) === null || _b === void 0
|
|
8934
|
+
? void 0
|
|
8935
|
+
: _b.forEach(l => {
|
|
8936
|
+
const start = l.start;
|
|
8937
|
+
const end = l.end;
|
|
8938
|
+
const { distance } = getPosition(new Vector3$1(start[0], -start[1], -start[2]), new Vector3$1(end[0], -end[1], -end[2]));
|
|
8939
|
+
children.push({ width: distance, state: l.state });
|
|
8940
|
+
});
|
|
8941
|
+
}
|
|
8942
|
+
|
|
8943
|
+
return {
|
|
8944
|
+
width: distance,
|
|
8945
|
+
left: startLeft,
|
|
8946
|
+
top: startTop,
|
|
8947
|
+
rotateDeg: deg,
|
|
8948
|
+
state: line.state,
|
|
8949
|
+
children,
|
|
8950
|
+
labelOffset,
|
|
8951
|
+
visible,
|
|
8952
|
+
labelElement: options.distanceText(ruleLength)
|
|
8953
|
+
};
|
|
8954
|
+
});
|
|
8955
|
+
|
|
8956
|
+
$$invalidate(0, rulerItemProp = data);
|
|
8957
|
+
};
|
|
8958
|
+
|
|
8959
|
+
const nextFrameFreshRule = () => nextFrame$1(updatePanoRulerData);
|
|
8960
|
+
const throttleFreshRule = throttle(updatePanoRulerData, 80);
|
|
8961
|
+
|
|
8962
|
+
onMount(() => {
|
|
8963
|
+
updatePanoRulerData();
|
|
8964
|
+
five.on('panoArrived', updatePanoRulerData);
|
|
8965
|
+
five.on('modeChange', updatePanoRulerData);
|
|
8966
|
+
five.on('cameraDirectionUpdate', nextFrameFreshRule);
|
|
8967
|
+
five.on('movingToPano', nextFrameFreshRule);
|
|
8968
|
+
five.on('mouseWheel', () => throttleFreshRule());
|
|
8969
|
+
five.on('pinchGesture', () => throttleFreshRule());
|
|
8970
|
+
});
|
|
8971
|
+
|
|
8972
|
+
onDestroy(() => {
|
|
8973
|
+
five.off('panoArrived', updatePanoRulerData);
|
|
8974
|
+
five.off('modeChange', updatePanoRulerData);
|
|
8975
|
+
five.off('cameraDirectionUpdate', nextFrameFreshRule);
|
|
8976
|
+
five.off('movingToPano', nextFrameFreshRule);
|
|
8977
|
+
five.off('mouseWheel', () => throttleFreshRule());
|
|
8978
|
+
five.off('pinchGesture', () => throttleFreshRule());
|
|
8979
|
+
});
|
|
8980
|
+
|
|
8981
|
+
$$self.$$set = $$props => {
|
|
8982
|
+
if ('five' in $$props) $$invalidate(1, five = $$props.five);
|
|
8983
|
+
if ('rulerDatas' in $$props) $$invalidate(2, rulerDatas = $$props.rulerDatas);
|
|
8984
|
+
if ('options' in $$props) $$invalidate(3, options = $$props.options);
|
|
8985
|
+
};
|
|
8986
|
+
|
|
8987
|
+
return [rulerItemProp, five, rulerDatas, options];
|
|
8988
|
+
}
|
|
8989
|
+
|
|
8990
|
+
class RulerItems extends SvelteComponent {
|
|
8991
|
+
constructor(options) {
|
|
8992
|
+
super();
|
|
8993
|
+
init(this, options, instance$6, create_fragment$6, safe_not_equal, { five: 1, rulerDatas: 2, options: 3 });
|
|
8994
|
+
}
|
|
8995
|
+
}
|
|
8996
|
+
|
|
8997
|
+
class Controller {
|
|
8998
|
+
constructor(five, params) {
|
|
8999
|
+
var _a, _b;
|
|
9000
|
+
Object.defineProperty(this, "five", {
|
|
9001
|
+
enumerable: true,
|
|
9002
|
+
configurable: true,
|
|
9003
|
+
writable: true,
|
|
9004
|
+
value: void 0
|
|
9005
|
+
});
|
|
9006
|
+
Object.defineProperty(this, "container", {
|
|
9007
|
+
enumerable: true,
|
|
9008
|
+
configurable: true,
|
|
9009
|
+
writable: true,
|
|
9010
|
+
value: document.createElement('div')
|
|
9011
|
+
});
|
|
9012
|
+
Object.defineProperty(this, "panoRulerProData", {
|
|
9013
|
+
enumerable: true,
|
|
9014
|
+
configurable: true,
|
|
9015
|
+
writable: true,
|
|
9016
|
+
value: void 0
|
|
9017
|
+
});
|
|
9018
|
+
Object.defineProperty(this, "rulerItems", {
|
|
9019
|
+
enumerable: true,
|
|
9020
|
+
configurable: true,
|
|
9021
|
+
writable: true,
|
|
9022
|
+
value: void 0
|
|
9023
|
+
});
|
|
9024
|
+
Object.defineProperty(this, "state", {
|
|
9025
|
+
enumerable: true,
|
|
9026
|
+
configurable: true,
|
|
9027
|
+
writable: true,
|
|
9028
|
+
value: {
|
|
9029
|
+
enabled: false,
|
|
9030
|
+
loaded: false,
|
|
9031
|
+
options: {
|
|
9032
|
+
className: '',
|
|
9033
|
+
distanceText: (distance) => `${distance.toFixed(1)}m`,
|
|
9034
|
+
},
|
|
9035
|
+
}
|
|
9036
|
+
});
|
|
9037
|
+
this.five = five;
|
|
9038
|
+
this.container.classList.add('panoRulerProPlugin-container');
|
|
9039
|
+
this.container.setAttribute('style', `position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;`);
|
|
9040
|
+
if (params) {
|
|
9041
|
+
if (params.data) {
|
|
9042
|
+
this.load(params.data);
|
|
9043
|
+
}
|
|
9044
|
+
this.state.options = Object.assign(Object.assign({}, this.state.options), (params.options || {}));
|
|
9045
|
+
if ((_a = params.options) === null || _a === void 0 ? void 0 : _a.className)
|
|
9046
|
+
this.container.classList.add((_b = params.options) === null || _b === void 0 ? void 0 : _b.className);
|
|
9047
|
+
}
|
|
9048
|
+
this.five.once('modelLoaded', async () => {
|
|
9049
|
+
var _a, _b;
|
|
9050
|
+
(_b = (_a = this.five.getElement()) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.append(this.container);
|
|
9051
|
+
});
|
|
9052
|
+
this.five.once('dispose', () => this.dispose());
|
|
9053
|
+
}
|
|
9054
|
+
async load(serverData) {
|
|
9055
|
+
if (!this.five.work)
|
|
9056
|
+
return;
|
|
9057
|
+
const data = serverData.data;
|
|
9058
|
+
if (!data)
|
|
9059
|
+
throw new Error('标尺数据依赖不齐全!');
|
|
9060
|
+
this.panoRulerProData = data;
|
|
9061
|
+
this.state.loaded = true;
|
|
9062
|
+
}
|
|
9063
|
+
enable() {
|
|
9064
|
+
if (!this.state.loaded)
|
|
9065
|
+
return false;
|
|
9066
|
+
if (this.state.enabled)
|
|
9067
|
+
return true;
|
|
9068
|
+
this.state.enabled = true;
|
|
9069
|
+
this.render();
|
|
9070
|
+
return true;
|
|
9071
|
+
}
|
|
9072
|
+
disable() {
|
|
9073
|
+
if (!this.state.enabled)
|
|
9074
|
+
return true;
|
|
9075
|
+
this.state.enabled = false;
|
|
9076
|
+
this.render();
|
|
9077
|
+
return true;
|
|
9078
|
+
}
|
|
9079
|
+
async render() {
|
|
9080
|
+
var _a;
|
|
9081
|
+
if (this.state.enabled) {
|
|
9082
|
+
if (!this.panoRulerProData || !this.container)
|
|
9083
|
+
return;
|
|
9084
|
+
this.rulerItems = new RulerItems({
|
|
9085
|
+
target: this.container,
|
|
9086
|
+
props: {
|
|
9087
|
+
five: this.five,
|
|
9088
|
+
rulerDatas: this.panoRulerProData,
|
|
9089
|
+
options: this.state.options,
|
|
9090
|
+
},
|
|
9091
|
+
});
|
|
9092
|
+
}
|
|
9093
|
+
else {
|
|
9094
|
+
(_a = this.rulerItems) === null || _a === void 0 ? void 0 : _a.$destroy();
|
|
9095
|
+
this.rulerItems = undefined;
|
|
9096
|
+
}
|
|
9097
|
+
}
|
|
9098
|
+
dispose() {
|
|
9099
|
+
if (this.container) {
|
|
9100
|
+
this.rulerItems.$destroy();
|
|
9101
|
+
this.rulerItems = undefined;
|
|
9102
|
+
}
|
|
9103
|
+
this.container.remove();
|
|
9104
|
+
}
|
|
9105
|
+
}
|
|
9106
|
+
|
|
9107
|
+
/**
|
|
9108
|
+
* 全景标尺插件
|
|
9109
|
+
*/
|
|
9110
|
+
const PanoRulerProPlugin = (five, params) => {
|
|
9111
|
+
return new Controller(five, params);
|
|
9112
|
+
};
|
|
9113
|
+
|
|
9114
|
+
const roomInfoIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/9llqfAYEQyRlAzy27QCAeSRfdlEq2gECIpIVeSB1aRAAiudVixVKnINAaAiGS1nok9WkFAUJb8Upa6Y3Uo2kEQiRNd08qd0YEQiJnBD+37guBEElf/ZXang6BEMnpsM6dOkcgRNJ5B66x+nrjLmsTX1J6bSJHZ7+o9HklynWaOse1eKcc+XVlvxYFEnlfaThWfb7mcsn5nPRM6WmVU55KfO+J0mdKj8f5rVu3skNMoET6RSBE0m/fdVNzGWII4StKXy65y18t58aEAVGcUjDkGHsLhIOYfCC1xUT4QDJjgnmkc58qkT8saSiLeCCkSBBoBoEQSTNd0V9FZADRH8iAGfvXS06Zc5CFCePQt0y3EFaq61CX1ayjC56U8br24sKd+kAuJhkI55OSPi75pyIcvKNIEFgcgRDJ4hD3ewMZLDwDXqfOq9RNFCYOCAMPYx851BDjIXiWzky9Tpyvw0kOL/nc+Jh7DyGqko+P+cznVLwMf31Uypz7jZLJ0GEy8jqURnl8zPjyObDEsxknztsDUnFvMfF8e+4X6j88F4hlTDT3de6BiAYsI0HgxgiESG4MYd8XkLEhrARZTKUxUWB0MXrkiA3wdYYQg8Xs2cmzaR977cCE8eSM6wYDsQiXSyOrulDPRUT3AbsxydAnYO9kz87HfH9Kxv3D976lNEk2ujf9ANE8GCe1OeEzgRLZD4EQyX44df8tGQ08iNdHCU+jnhGPDVG9bgAGGD3Iw8TB5xgjz3jr3CTxSEapxxAL7VxcCmGaQPe6n/qScWtSIcdLrD1FhxbtRZn4x/3rtanvlBtffq57UCcI5l6dVF9CaJEgcAWBEMkVOPo+0ODHwGNEIAxIwsRBea6vdxlMPsNwYFAcIoEsnB4WQ6hTqxOMqg1wU40rxEx/kCal6AKejEnGOSFKvE8mFiYaFV8S9AVP5oo3o+syKSA0ZoJxmTWZJvFSXSMLIzBnXBa+bS5/UwQ0oDECEIRDF87n+nSOMDAMkIUNU51v2TjM4SWo2pdi1E34L1W4mnRALFOJtZ0pQe/QNVItT3XNOzpxV8n5fdWjaxzrBqY8j8Cc0Zn/RT45OQIaoPQT3oUHMDnHUzPKuYFLqGJYZFXObNILroSmIi8jMIfjy9/s8EwhGu/0+s+4CdI5vBkmKngv6Bo5x3NbodFFQmQOk6l48VzXQdcgF6d7unePoU7aE5lBIEQyA8y5TmvgEZ5iwBJSeKMkBrHXJVS8lCljZ8IwaZgwFlswvqzNugpT2K6rhTtaI2PPBIN0hWSkn6zJmFSc7yIYSIj0Y6VBdA108nZJd5TjuSQsNqDT558QyZn7rQxMSKNO435hkE0NNEIXzPhIzPiY7cXDEBBHkE0TyRx+0i9vovhf/R3pMR6MPWWTB+syU+JQ2tvlQ8Ji6C/kArHcKfcpHydrHYGxwWq9vl3XT4MFr4JZHO4/3gbkMTXYxkYMEmHtAsJgNsegYxaH9xFZBgH6YMoLXOZunV+1TGCYxHzgpkjfCYPhrUAw5BAMJDLGlbAY44E0iH7LJAlSgVw+UuK5l6nJlD6KnBuBEMmCPaDBwACpiYOBwuCqB0S9xZYBxmfs4YcsGEjkiSsLhBML/VD304lv3//tykTnQ7WENIjGBDYHQoFcSEym2IaMWP/JCaG9VZKyi8f6LaRSE8t4wsX3ImdAIERyRNALcTBIGByeYY13v4yJg+P7SiaOhKcERgMSI7VAJ4hcWGjHwyANonFTh8UYO3gv440kjKPvlqTs4llFLEy4GDfpM5A5g4RIbgi6lNkeh8NV4wEwVm7CUSg+CfLAZR9/R6cjZ0YgfXKiDpD+e2F/CIuVCRnjyh4L5DLeLYbXUu8Sg1gYUwNJ6ZoPVI6cCAE6I3IAAlJW3HCTBl6H3fK5qxCmMnGwiMiWy0jjCKiff6kqDuNDffbbxqu7+uqpP3iAEkJx2mfcOQx2W32YV74sqCUhkmvAlQLjUjMzcqiKxcJdwuwKT2NIUmAWDSOdIaB+/4WrrD78ncvJ20BA/cMmFcalE+GxXcJmFa+x3FWf1iHmXb/LZ3sgkNDWBEhSUhb67DYzA6rDVeOQBy/3gzQGJZWC5nkNgbECGffzCpq0niaUCRqTtH/RqjJmPdmDXMYvtoR4SD9U4kHJOgyWMStQbiLxSISelAoc6rUOFG5O2MnD4ni9xpHdPXNodXpeOvG+qy6j9XuXk7ePQDWeIRQmgizeT9k6zjF2IaRhbUV5thkLhENlCtxDr9Hl96VseGMommcxu7wzwlUmDnaHxC3ustf3r7T04z1/W/39B5eT94eA+pLw9OtKJpZdYTB2ldUhsLzOZY8u32U89/h5X1+RQuHuQhyErVCsmkjrUAazlHtKkEeeshUIGxT0odaPDUKwjiaXiZ/JwWEwL9qP7QBh7DdLkskY3hWGt8KC/eX/qFkHMsdrxeoHihSBbYP2OnBx58RrHZBHvI45lDZyXnrzrpsqA/JHl5OvCwH1s70ViAWPZby2Ujf4vg4GQpJO5K0SFTKrJBIpB1sDUQwIZNcuK2Kjd0v6RMqRtQ6BERnWzX5uHKQXf3I5+XoRkN3AHrLNGEIh7Vor9S4wIhab31q8GiKpyAMCQRmmBKLgOQ68DrYAbl4BpkDKuYFIfiYchvEhPflzMNkeAsWmQCi2KXP2kgkpnspmSWUOmC60Rh3NGg+dTJrzPCAPZg+D5yGjkDinwIjsRkC69VN/QzrzF5eTbxMB6QMhL3sq2Jo524mt8drqZhbq58BoVlvUocQ0WeswebA45pAU7XGZVyTcI8kQbKZD1d7IERCQnr3jy0h//upy8iAg3WACyyI9iccGbEexPbZBnsBCKrype9U7PbvYtaWOgyyYBTAjgET8gCCdxe4ak4c9j9V3nNocWRaBehffsnfK1btCoExMh+dOqokttslRERMLIXbO8QAkC/VERT7W71enW26w2teeCPz6raB4IlPiV5JAHvE8phDKuYMRkO79xD+SXv3N5eRBYA4B6QwTcya6kMrcsyp4JkRKWKPFdq1CmiOSUWfMvZiNRXIYPv/caRVq2F4jpIdvu1Ya8H93OXkQ2AcB6Q+PHUAqpDk7xqtZIJXuJ8FNEIlApx64gYA+t5DFIjnrHrzCIO/GERCR5RCQTv5IVx9CptK3fyx3p1x57QhIl/x/7llPmXpOBT1jNymk0uVjCGclkoq1AXhqvQaAWffA+3ioAe21EB1GgsByCEg3f+CrS+/+6XLyIPCqCEinsLeEvHZNmAnPM2HuKtpyciIpYNr7AFTIwfVwGY8DMFe5MKV2RRpHQHr6lqsoIvnA5eRB4BgISL+8gYhJNB4LYvvnCTN2kEl0816KDTiNWFQEHC4doBG68q6r+p7sZMD7gDzy+oEamZRPjoD09fu66TA+pI//PnkFcsPNICBdYz0Fu3idbSSs3+RzcIsSiQDi+ngdAGTWVfGKsHOB+GBCV1dgycE5EZDufs/31+D9r8vJg8BSCFT2kojN3K4vvBQm3E3Zy0WIRICwVRcwSFPbdu194LKt+kEdtT/SIQLS4Tddbenohy4nDwKnQGAPG4rdZALehA09KpGo8bhou9iUbbs0/jMNTscBdRgJAm0hIF1+wzWSrt52OXkQOCUC0kNsNNuHsatz24iHqI709GxLAjcmktJQEwj5WPA+aCiuWB4YHKOT4yYRkF7zUNkg0lueSI4EgbMiIJ1kZyshL9LUOjNEwkT9sXT2pBP1VyaSQiCse9Coqa27LApBIPE+BEKkLwSk32zRHESDkp0zkSDQBALF9uKdYHunnkthwo7tfXQqQjmYSNQImBACIU2xIuGreB8CIdIvAtJzNogMosHI4mYkCDSHgPTUXspU2ItoEIvzEArlxWRvIlGFWTSnsnWF+b1dKAhk8QrrHpEgsDgC0ndi0oNoEBIuiASBZhGQvnqCz/KCJ/jYZtto7DPRoUU2N11LJIXxqNyUC0VFqeCTpRlP94gEgZMhIL0nbDCIdJswQSQINI9AIRRsNRP+KfvOkgNrKEddr5660YUqw3k8EAhkbvsuCztPVSF7JDqMBIF1IKAxcOl5S8eZLEWCQDcIFBtO2Kv2UOr645lAKkex4VeIpLo5jHbls1KD4eYaWIu4R+UeyYLA2RHQWGAADiJ9P9u2StcheRB4VQSkyzgD2PQppwBH4MaEMpBFRSDcqCYQx9ggDphr0QUb3SMSBJpAQGPiciei9P6oYYAmGphKbA4B6TRrJ+j1HKHYzh8cZbpVBowXZ8bgQhzPNJAOvvD4QjkOAj0hUAbdUOVMoHrqudT1OgSk2zgLkAl2n/LYvh9s900kutYV4UIvQiBXMMlBEAgCQWA1CBRCgUjmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC';
|
|
9115
|
+
|
|
9116
|
+
function getRoomInfoInstance() {
|
|
9117
|
+
const infoDom = document.createElement('div');
|
|
9118
|
+
const iconDom = document.createElement('i');
|
|
9119
|
+
const textDom = document.createElement('span');
|
|
9120
|
+
infoDom.appendChild(iconDom);
|
|
9121
|
+
infoDom.appendChild(textDom);
|
|
9122
|
+
// infoDom style
|
|
9123
|
+
infoDom.style.position = 'relative';
|
|
9124
|
+
infoDom.style.width = '100%';
|
|
9125
|
+
infoDom.style.display = 'flex';
|
|
9126
|
+
infoDom.style.flexDirection = 'column';
|
|
9127
|
+
infoDom.style.alignItems = 'center';
|
|
9128
|
+
infoDom.style.marginTop = `${150 / 16}rem`;
|
|
9129
|
+
infoDom.style.opacity = '0';
|
|
9130
|
+
infoDom.style.transition = 'opacity 1000ms linear';
|
|
9131
|
+
// iconDom style
|
|
9132
|
+
iconDom.style.display = 'block';
|
|
9133
|
+
iconDom.style.width = `${134 / 16}rem`;
|
|
9134
|
+
iconDom.style.height = `${22 / 16}rem`;
|
|
9135
|
+
iconDom.style.backgroundSize = '100%';
|
|
9136
|
+
iconDom.style.backgroundRepeat = 'no-repeat';
|
|
9137
|
+
iconDom.style.backgroundImage = `url(${roomInfoIcon})`;
|
|
9138
|
+
textDom.style.marginTop = `${10 / 16}rem`;
|
|
8372
9139
|
// textDom style
|
|
8373
9140
|
textDom.style.fontSize = `${16 / 16}rem`;
|
|
8374
9141
|
textDom.style.color = '#fff';
|
|
@@ -14806,18 +15573,18 @@ function add_css(target) {
|
|
|
14806
15573
|
|
|
14807
15574
|
function get_each_context(ctx, list, i) {
|
|
14808
15575
|
const child_ctx = ctx.slice();
|
|
14809
|
-
child_ctx[
|
|
15576
|
+
child_ctx[31] = list[i];
|
|
14810
15577
|
return child_ctx;
|
|
14811
15578
|
}
|
|
14812
15579
|
|
|
14813
|
-
// (
|
|
15580
|
+
// (235:2) {#if itemLabelItem.visible}
|
|
14814
15581
|
function create_if_block(ctx) {
|
|
14815
15582
|
let itemlabelitem;
|
|
14816
15583
|
let current;
|
|
14817
15584
|
|
|
14818
15585
|
itemlabelitem = new ItemLabelItem({
|
|
14819
15586
|
props: {
|
|
14820
|
-
itemLabel: /*itemLabelItem*/ ctx[
|
|
15587
|
+
itemLabel: /*itemLabelItem*/ ctx[31],
|
|
14821
15588
|
hooks: /*hooks*/ ctx[0],
|
|
14822
15589
|
anchorEnabled: /*anchorEnabled*/ ctx[2],
|
|
14823
15590
|
onIconClick: /*onIconClick*/ ctx[6]
|
|
@@ -14834,7 +15601,7 @@ function create_if_block(ctx) {
|
|
|
14834
15601
|
},
|
|
14835
15602
|
p(ctx, dirty) {
|
|
14836
15603
|
const itemlabelitem_changes = {};
|
|
14837
|
-
if (dirty[0] & /*renderItemLabels*/ 2) itemlabelitem_changes.itemLabel = /*itemLabelItem*/ ctx[
|
|
15604
|
+
if (dirty[0] & /*renderItemLabels*/ 2) itemlabelitem_changes.itemLabel = /*itemLabelItem*/ ctx[31];
|
|
14838
15605
|
if (dirty[0] & /*hooks*/ 1) itemlabelitem_changes.hooks = /*hooks*/ ctx[0];
|
|
14839
15606
|
if (dirty[0] & /*anchorEnabled*/ 4) itemlabelitem_changes.anchorEnabled = /*anchorEnabled*/ ctx[2];
|
|
14840
15607
|
itemlabelitem.$set(itemlabelitem_changes);
|
|
@@ -14854,12 +15621,12 @@ function create_if_block(ctx) {
|
|
|
14854
15621
|
};
|
|
14855
15622
|
}
|
|
14856
15623
|
|
|
14857
|
-
// (
|
|
15624
|
+
// (234:1) {#each renderItemLabels as itemLabelItem (itemLabelItem.id)}
|
|
14858
15625
|
function create_each_block(key_1, ctx) {
|
|
14859
15626
|
let first;
|
|
14860
15627
|
let if_block_anchor;
|
|
14861
15628
|
let current;
|
|
14862
|
-
let if_block = /*itemLabelItem*/ ctx[
|
|
15629
|
+
let if_block = /*itemLabelItem*/ ctx[31].visible && create_if_block(ctx);
|
|
14863
15630
|
|
|
14864
15631
|
return {
|
|
14865
15632
|
key: key_1,
|
|
@@ -14879,7 +15646,7 @@ function create_each_block(key_1, ctx) {
|
|
|
14879
15646
|
p(new_ctx, dirty) {
|
|
14880
15647
|
ctx = new_ctx;
|
|
14881
15648
|
|
|
14882
|
-
if (/*itemLabelItem*/ ctx[
|
|
15649
|
+
if (/*itemLabelItem*/ ctx[31].visible) {
|
|
14883
15650
|
if (if_block) {
|
|
14884
15651
|
if_block.p(ctx, dirty);
|
|
14885
15652
|
|
|
@@ -14926,7 +15693,7 @@ function create_fragment(ctx) {
|
|
|
14926
15693
|
let div_resize_listener;
|
|
14927
15694
|
let current;
|
|
14928
15695
|
let each_value = /*renderItemLabels*/ ctx[1];
|
|
14929
|
-
const get_key = ctx => /*itemLabelItem*/ ctx[
|
|
15696
|
+
const get_key = ctx => /*itemLabelItem*/ ctx[31].id;
|
|
14930
15697
|
|
|
14931
15698
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
14932
15699
|
let child_ctx = get_each_context(ctx, each_value, i);
|
|
@@ -14943,7 +15710,7 @@ function create_fragment(ctx) {
|
|
|
14943
15710
|
}
|
|
14944
15711
|
|
|
14945
15712
|
attr(div, "class", "item-labels-container svelte-gk8s47");
|
|
14946
|
-
add_render_callback(() => /*div_elementresize_handler*/ ctx[
|
|
15713
|
+
add_render_callback(() => /*div_elementresize_handler*/ ctx[13].call(div));
|
|
14947
15714
|
set_style(div, "opacity", /*itemsVisible*/ ctx[5] ? 1 : 0, false);
|
|
14948
15715
|
},
|
|
14949
15716
|
m(target, anchor) {
|
|
@@ -14953,7 +15720,7 @@ function create_fragment(ctx) {
|
|
|
14953
15720
|
each_blocks[i].m(div, null);
|
|
14954
15721
|
}
|
|
14955
15722
|
|
|
14956
|
-
div_resize_listener = add_resize_listener(div, /*div_elementresize_handler*/ ctx[
|
|
15723
|
+
div_resize_listener = add_resize_listener(div, /*div_elementresize_handler*/ ctx[13].bind(div));
|
|
14957
15724
|
current = true;
|
|
14958
15725
|
},
|
|
14959
15726
|
p(ctx, dirty) {
|
|
@@ -15001,6 +15768,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
15001
15768
|
const { Raycaster, Vector3 } = THREE;
|
|
15002
15769
|
let { five } = $$props;
|
|
15003
15770
|
let { modelOcclusionEnable } = $$props;
|
|
15771
|
+
let { onlyVisibleInPanorama } = $$props;
|
|
15004
15772
|
let { itemLabels } = $$props;
|
|
15005
15773
|
let { hooks } = $$props;
|
|
15006
15774
|
let { displayStrategyType } = $$props;
|
|
@@ -15052,7 +15820,10 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
15052
15820
|
const ratioFromTop = (2 - (offsetYFromCenter + 1)) / 2;
|
|
15053
15821
|
const isFront = Math.abs(offsetZFromCenter) < 1;
|
|
15054
15822
|
const cssOffset = [ratioFromLeft, ratioFromTop];
|
|
15823
|
+
|
|
15824
|
+
// 只计算在前面就行
|
|
15055
15825
|
const isInViewport = isFront && cssOffset.every(ratio => ratio < 1 && ratio >= 0);
|
|
15826
|
+
|
|
15056
15827
|
return Boolean(isInViewport);
|
|
15057
15828
|
};
|
|
15058
15829
|
|
|
@@ -15073,8 +15844,15 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
15073
15844
|
};
|
|
15074
15845
|
|
|
15075
15846
|
const getFormatedItemLabels = (five, labels) => {
|
|
15847
|
+
console.log(labels);
|
|
15848
|
+
|
|
15076
15849
|
// 计算位置 & 可见性
|
|
15077
15850
|
const newLabels = labels.map(label => {
|
|
15851
|
+
// 不在绑定点位则直接不可见
|
|
15852
|
+
if (five.state.panoIndex !== label.panoIndex) {
|
|
15853
|
+
return Object.assign(Object.assign({}, label), { visible: false });
|
|
15854
|
+
}
|
|
15855
|
+
|
|
15078
15856
|
const cssOffset = getLabelCssOffset(five, label);
|
|
15079
15857
|
label.name.length * basicWidth;
|
|
15080
15858
|
const strokeLength = getStrokeLength(label.modelPosition[1], displayStrategyType);
|
|
@@ -15127,16 +15905,6 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
15127
15905
|
handleCameraUpdate();
|
|
15128
15906
|
};
|
|
15129
15907
|
|
|
15130
|
-
const onFiveModeChange = mode => {
|
|
15131
|
-
$$invalidate(5, itemsVisible = false);
|
|
15132
|
-
|
|
15133
|
-
five.once('initAnimationEnded', (panoIndex, pose, userAction) => {
|
|
15134
|
-
$$invalidate(2, anchorEnabled = mode === Five.Mode.Panorama);
|
|
15135
|
-
$$invalidate(5, itemsVisible = true);
|
|
15136
|
-
if (!userAction) return; else onItemLabelUpdate();
|
|
15137
|
-
});
|
|
15138
|
-
};
|
|
15139
|
-
|
|
15140
15908
|
const handleCameraUpdate = debounce(
|
|
15141
15909
|
() => {
|
|
15142
15910
|
$$invalidate(5, itemsVisible = true);
|
|
@@ -15194,11 +15962,10 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
15194
15962
|
const onIconClick = itemLabel => {
|
|
15195
15963
|
if (five.state.mode === Five.Mode.Panorama) return;
|
|
15196
15964
|
const observers = five.work.observers;
|
|
15197
|
-
const fromPositionVector = new Vector3(
|
|
15965
|
+
const fromPositionVector = new Vector3().fromArray(itemLabel.position);
|
|
15198
15966
|
const observer = getNearObserverPano(fromPositionVector, observers);
|
|
15199
15967
|
|
|
15200
15968
|
if (observer) {
|
|
15201
|
-
console.log('--has observer--');
|
|
15202
15969
|
itemLabel.observerIndex = observer.panoIndex;
|
|
15203
15970
|
}
|
|
15204
15971
|
|
|
@@ -15241,12 +16008,12 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
15241
16008
|
onItemLabelUpdate();
|
|
15242
16009
|
addResizeListener();
|
|
15243
16010
|
five.on('cameraUpdate', handleCameraUpdateCallback);
|
|
15244
|
-
|
|
15245
|
-
});
|
|
16011
|
+
}); // five.on('modeChange', onFiveModeChange)
|
|
15246
16012
|
|
|
15247
16013
|
onDestroy(() => {
|
|
15248
16014
|
five.off('cameraUpdate', handleCameraUpdateCallback);
|
|
15249
|
-
|
|
16015
|
+
|
|
16016
|
+
// five.off('modeChange', onFiveModeChange)
|
|
15250
16017
|
window.removeEventListener('resize', onResize, false);
|
|
15251
16018
|
});
|
|
15252
16019
|
|
|
@@ -15260,10 +16027,11 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
15260
16027
|
$$self.$$set = $$props => {
|
|
15261
16028
|
if ('five' in $$props) $$invalidate(7, five = $$props.five);
|
|
15262
16029
|
if ('modelOcclusionEnable' in $$props) $$invalidate(8, modelOcclusionEnable = $$props.modelOcclusionEnable);
|
|
15263
|
-
if ('
|
|
16030
|
+
if ('onlyVisibleInPanorama' in $$props) $$invalidate(9, onlyVisibleInPanorama = $$props.onlyVisibleInPanorama);
|
|
16031
|
+
if ('itemLabels' in $$props) $$invalidate(10, itemLabels = $$props.itemLabels);
|
|
15264
16032
|
if ('hooks' in $$props) $$invalidate(0, hooks = $$props.hooks);
|
|
15265
|
-
if ('displayStrategyType' in $$props) $$invalidate(
|
|
15266
|
-
if ('maxVisibleDistance' in $$props) $$invalidate(
|
|
16033
|
+
if ('displayStrategyType' in $$props) $$invalidate(11, displayStrategyType = $$props.displayStrategyType);
|
|
16034
|
+
if ('maxVisibleDistance' in $$props) $$invalidate(12, maxVisibleDistance = $$props.maxVisibleDistance);
|
|
15267
16035
|
};
|
|
15268
16036
|
|
|
15269
16037
|
return [
|
|
@@ -15276,6 +16044,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
15276
16044
|
onIconClick,
|
|
15277
16045
|
five,
|
|
15278
16046
|
modelOcclusionEnable,
|
|
16047
|
+
onlyVisibleInPanorama,
|
|
15279
16048
|
itemLabels,
|
|
15280
16049
|
displayStrategyType,
|
|
15281
16050
|
maxVisibleDistance,
|
|
@@ -15296,10 +16065,11 @@ class ItemLabelComponent extends SvelteComponent {
|
|
|
15296
16065
|
{
|
|
15297
16066
|
five: 7,
|
|
15298
16067
|
modelOcclusionEnable: 8,
|
|
15299
|
-
|
|
16068
|
+
onlyVisibleInPanorama: 9,
|
|
16069
|
+
itemLabels: 10,
|
|
15300
16070
|
hooks: 0,
|
|
15301
|
-
displayStrategyType:
|
|
15302
|
-
maxVisibleDistance:
|
|
16071
|
+
displayStrategyType: 11,
|
|
16072
|
+
maxVisibleDistance: 12
|
|
15303
16073
|
},
|
|
15304
16074
|
add_css,
|
|
15305
16075
|
[-1, -1]
|
|
@@ -15309,12 +16079,12 @@ class ItemLabelComponent extends SvelteComponent {
|
|
|
15309
16079
|
|
|
15310
16080
|
/** @description 转成内部所需数据 */
|
|
15311
16081
|
function parseItemLabelPluginData(data) {
|
|
15312
|
-
return data.item_labels.map(label => (Object.assign({ modelPosition: [label.position[0], label.position[1], label.position[2]], observerIndex: undefined }
|
|
16082
|
+
return data.item_labels.map(label => (Object.assign(Object.assign({}, label), { modelPosition: [label.position[0], label.position[1], label.position[2]], observerIndex: undefined })));
|
|
15313
16083
|
}
|
|
15314
16084
|
|
|
15315
16085
|
const defaultMaxVisibleDistance = undefined;
|
|
15316
16086
|
const Plugin = (five, params) => {
|
|
15317
|
-
var _a, _b, _c;
|
|
16087
|
+
var _a, _b, _c, _d;
|
|
15318
16088
|
const pluginState = {
|
|
15319
16089
|
container: document.createElement('div'),
|
|
15320
16090
|
data: null,
|
|
@@ -15325,8 +16095,9 @@ const Plugin = (five, params) => {
|
|
|
15325
16095
|
app: undefined,
|
|
15326
16096
|
hooks: new Subscribe(),
|
|
15327
16097
|
modelOcclusionEnable: (_a = params === null || params === void 0 ? void 0 : params.modelOcclusionEnable) !== null && _a !== void 0 ? _a : true,
|
|
15328
|
-
|
|
15329
|
-
|
|
16098
|
+
onlyVisibleInPanorama: (_b = params === null || params === void 0 ? void 0 : params.onlyVisibleInPanorama) !== null && _b !== void 0 ? _b : true,
|
|
16099
|
+
displayStrategyType: (_c = params === null || params === void 0 ? void 0 : params.displayStrategyType) !== null && _c !== void 0 ? _c : ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.SMALL,
|
|
16100
|
+
maxVisibleDistance: (_d = params === null || params === void 0 ? void 0 : params.maxVisibleDistance) !== null && _d !== void 0 ? _d : defaultMaxVisibleDistance,
|
|
15330
16101
|
};
|
|
15331
16102
|
pluginState.container.setAttribute('class', 'item-label-plugin-container');
|
|
15332
16103
|
pluginState.container.style.cssText = `
|
|
@@ -15363,6 +16134,7 @@ const Plugin = (five, params) => {
|
|
|
15363
16134
|
return true;
|
|
15364
16135
|
};
|
|
15365
16136
|
const dispose = () => {
|
|
16137
|
+
removeListener4Five();
|
|
15366
16138
|
pluginState.container.remove();
|
|
15367
16139
|
};
|
|
15368
16140
|
const render = () => {
|
|
@@ -15382,6 +16154,7 @@ const Plugin = (five, params) => {
|
|
|
15382
16154
|
props: {
|
|
15383
16155
|
five: five,
|
|
15384
16156
|
modelOcclusionEnable: pluginState.modelOcclusionEnable,
|
|
16157
|
+
onlyVisibleInPanorama: pluginState.onlyVisibleInPanorama,
|
|
15385
16158
|
itemLabels: pluginState.itemLabels,
|
|
15386
16159
|
wrapper: pluginState.wrapper,
|
|
15387
16160
|
hooks: pluginState.hooks,
|
|
@@ -15399,9 +16172,27 @@ const Plugin = (five, params) => {
|
|
|
15399
16172
|
};
|
|
15400
16173
|
// 添加 five 监听
|
|
15401
16174
|
const addListener4Five = () => {
|
|
15402
|
-
|
|
16175
|
+
five.on('modeChange', onFiveModeChange);
|
|
15403
16176
|
five.once('dispose', dispose);
|
|
15404
16177
|
};
|
|
16178
|
+
// 取消 five 监听
|
|
16179
|
+
const removeListener4Five = () => {
|
|
16180
|
+
five.off('modeChange', onFiveModeChange);
|
|
16181
|
+
};
|
|
16182
|
+
const onFiveModeChange = (mode) => {
|
|
16183
|
+
// if (!pluginState.enabled) return
|
|
16184
|
+
if (mode !== Five.Mode.Panorama) {
|
|
16185
|
+
pluginState.fiveModeEnabled = false;
|
|
16186
|
+
disable();
|
|
16187
|
+
return;
|
|
16188
|
+
}
|
|
16189
|
+
// pluginState.fiveModeEnabled = false
|
|
16190
|
+
// render()
|
|
16191
|
+
five.once('initAnimationEnded', () => {
|
|
16192
|
+
pluginState.fiveModeEnabled = true;
|
|
16193
|
+
enable();
|
|
16194
|
+
});
|
|
16195
|
+
};
|
|
15405
16196
|
addListener4Five();
|
|
15406
16197
|
return {
|
|
15407
16198
|
appendTo,
|
|
@@ -15418,4 +16209,6 @@ const itemLabelPluginServerParams = {
|
|
|
15418
16209
|
version: 0,
|
|
15419
16210
|
};
|
|
15420
16211
|
|
|
15421
|
-
|
|
16212
|
+
const DnalogelVersion = '2.0.0-alpha.38';
|
|
16213
|
+
|
|
16214
|
+
export { CSS3DRenderPlugin, CameraMovementEffect, CameraMovementPlugin, DIRECTION, DISPLAY_STRATEGY_TYPE, DnalogelVersion, FLOOR_PLAN_ATTACHED_TO, FLOOR_TYPE_MAP, ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE, Plugin as ItemLabelPlugin, Magnifier, ModelChassisCompassPlugin, ModelEntryDoorGuidePlugin, ModelFloorplanPlugin, ModelItemLabelPlugin, ModelRoomLabelPlugin, ModelTVVideoPlugin, ModelViewPlugin, PanoCompassPlugin, PanoCursorRaycasterPlugin, PanoFloorplanRadarPlugin, PanoMeasurePlugin, PanoRulerPlugin, PanoRulerProPlugin, PanoSpatialTagPlugin, ROOM_FETILE_TYPE_MAP, ROOM_TYPE_MAP, Rotation, TopviewFloorplanPlugin, itemLabelPluginServerParams, modelItemLabelPluginServerParams, modelRoomLabelPluginServerParams, panoCompassPluginServerParams };
|