@realsee/dnalogel 2.0.0-alpha.16 → 2.0.0-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +2 -2
- package/dist/CameraMovementPlugin/index.js +15 -40
- package/dist/CameraMovementPlugin/typing.d.ts +1 -1
- package/dist/ModelChassisCompassPlugin/index.js +3 -28
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
- package/dist/ModelEntryDoorGuidePlugin/index.js +8 -33
- package/dist/ModelItemLabelPlugin/events.type.d.ts +2 -2
- package/dist/ModelItemLabelPlugin/index.js +8 -8
- package/dist/ModelItemLabelPlugin/typings.d.ts +2 -2
- package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +1 -1
- package/dist/ModelRoomLabelPlugin/index.js +6 -6
- package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/dist/ModelTVVideoPlugin/index.d.ts +1 -1
- package/dist/ModelTVVideoPlugin/index.js +3 -28
- package/dist/PanoCompassPlugin/index.js +53 -86
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +8 -8
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +3 -3
- package/dist/PanoMeasurePlugin/Model/index.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Model/line.d.ts +5 -5
- package/dist/PanoMeasurePlugin/Model/point.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/index.js +1 -21
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +4 -4
- package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/constants.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
- package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
- package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
- package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/line.d.ts +1 -1
- package/dist/PanoRulerPlugin/index.d.ts +1 -1
- package/dist/PanoRulerPlugin/index.js +3 -28
- package/dist/PanoSpatialTagPlugin/index.js +11 -11
- package/dist/PanoSpatialTagPlugin/typings.d.ts +1 -1
- package/dist/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.d.ts +0 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -2
- package/dist/floorplan/ModelFloorplanPlugin/index.js +1266 -1298
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +81 -204
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +28 -15
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +1257 -1250
- package/dist/floorplan/utils/formatPosition.d.ts +1 -1
- package/dist/index.es.js +1480 -1507
- package/dist/index.js +1477 -1504
- package/dist/index.umd.js +1477 -1504
- package/dist/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/dist/shared-utils/three/getNormal.d.ts +1 -1
- package/dist/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/dist/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/dist/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/ModelRoomLabelController.html +6 -6
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ModelFloorplanErrorType.html +1 -1
- package/docs/interfaces/LineJson.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
- package/docs/interfaces/ModelFloorplanParameterType.html +1 -1
- package/docs/interfaces/ModelFloorplanViewEvent.html +2 -2
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +19 -1
- package/docs/modules.html +12 -12
- package/libs/CSS3DRenderPlugin/index.d.ts +2 -2
- package/libs/CameraMovementPlugin/index.js +15 -24
- package/libs/CameraMovementPlugin/typing.d.ts +1 -1
- package/libs/ModelChassisCompassPlugin/index.js +3 -12
- package/libs/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
- package/libs/ModelEntryDoorGuidePlugin/index.js +8 -17
- package/libs/ModelItemLabelPlugin/events.type.d.ts +2 -2
- package/libs/ModelItemLabelPlugin/typings.d.ts +2 -2
- package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/index.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/index.js +3 -12
- package/libs/ModelTVVideoPlugin/typings.js +1 -0
- package/libs/PanoCompassPlugin/index.js +49 -64
- package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +8 -8
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/EditController.js +1 -1
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +3 -3
- package/libs/PanoMeasurePlugin/Model/index.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/line.d.ts +5 -5
- package/libs/PanoMeasurePlugin/Model/line.js +1 -1
- package/libs/PanoMeasurePlugin/Model/point.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +4 -4
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/constants.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/line.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +1 -0
- package/libs/PanoRulerPlugin/index.d.ts +1 -1
- package/libs/PanoRulerPlugin/index.js +3 -12
- package/libs/PanoSpatialTagPlugin/typings.d.ts +1 -1
- package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.d.ts +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.js +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Camera.js +2 -2
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Compass.js +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components/CurrentFloor → Components}/CurrentFloor.js +73 -80
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Main.js +186 -105
- package/libs/floorplan/Components/RoomHighlight/Room.js +5 -7
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +24 -116
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RoomLabels/RoomLabel.js +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RoomLabels/RoomLabels.js +2 -2
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +26 -22
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RuleLabels/RuleLabels.js +82 -32
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -2
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +34 -43
- package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +22 -33
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +3 -12
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +28 -15
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +80 -54
- package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +0 -1
- package/libs/floorplan/utils/formatData.js +28 -43
- package/libs/floorplan/utils/formatPosition.d.ts +1 -1
- package/libs/floorplan/utils/formatPosition.js +2 -2
- package/libs/shared-utils/five/changeMode.js +12 -23
- package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/libs/shared-utils/three/getNormal.d.ts +1 -1
- package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/libs/shared-utils/three/loadFbxObj.js +9 -20
- package/libs/shared-utils/three/loadTexture.js +6 -17
- package/libs/shared-utils/to.js +10 -21
- package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/package.json +3 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +0 -301
package/dist/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { Vector3, Scene, Group, Raycaster,
|
|
2
|
+
import { Vector3, Scene, Group, Raycaster, MeshBasicMaterial, CanvasTexture, AnimationMixer, Vector2, Color, TextureLoader, PlaneGeometry, sRGBEncoding, Mesh, CurvePath, LineCurve3, TubeGeometry, DoubleSide, SphereGeometry } from 'three';
|
|
3
3
|
import { CSS3DRenderer, CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer';
|
|
4
4
|
import { Line as Line$1 } from '@realsee/five/line';
|
|
5
|
-
import { SvelteComponent, init, safe_not_equal, append_styles, element, text, space, attr, set_style, toggle_class, insert, append, listen, set_data, noop, detach, empty, create_component, mount_component, transition_in, transition_out, destroy_component, add_render_callback, add_resize_listener, group_outros, update_keyed_each, outro_and_destroy_block, check_outros, HtmlTag, get_spread_update, assign, destroy_block,
|
|
5
|
+
import { SvelteComponent, init, safe_not_equal, append_styles, element, text, space, attr, set_style, toggle_class, insert, append, listen, set_data, noop, detach, empty, create_component, mount_component, transition_in, transition_out, destroy_component, add_render_callback, add_resize_listener, group_outros, update_keyed_each, outro_and_destroy_block, check_outros, src_url_equal, HtmlTag, get_spread_update, assign, destroy_block, destroy_each, svg_element, null_to_empty, create_in_transition, binding_callbacks } from 'svelte/internal';
|
|
6
6
|
import { onDestroy, onMount, afterUpdate, beforeUpdate } from 'svelte';
|
|
7
7
|
import { linear } from 'svelte/easing';
|
|
8
8
|
import { fade } from 'svelte/transition';
|
|
@@ -13,21 +13,6 @@ import TWEEN__default from '@tweenjs/tween.js';
|
|
|
13
13
|
import { writable } from 'svelte/store';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
|
|
16
|
-
function _mergeNamespaces(n, m) {
|
|
17
|
-
m.forEach(function (e) {
|
|
18
|
-
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
19
|
-
if (k !== 'default' && !(k in n)) {
|
|
20
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
21
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () { return e[k]; }
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
return Object.freeze(n);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
16
|
/**
|
|
32
17
|
* Five 模型插件
|
|
33
18
|
* @template ExportType 导出方法
|
|
@@ -477,8 +462,8 @@ const ROOM_LABEL_BG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAY
|
|
|
477
462
|
|
|
478
463
|
/* src/ModelRoomLabelPlugin/RoomLabelItem.svelte generated by Svelte v3.47.0 */
|
|
479
464
|
|
|
480
|
-
function add_css$
|
|
481
|
-
append_styles(target, "svelte-
|
|
465
|
+
function add_css$m(target) {
|
|
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}");
|
|
482
467
|
}
|
|
483
468
|
|
|
484
469
|
function create_fragment$q(ctx) {
|
|
@@ -498,11 +483,11 @@ function create_fragment$q(ctx) {
|
|
|
498
483
|
t0 = text(t0_value);
|
|
499
484
|
t1 = space();
|
|
500
485
|
div0 = element("div");
|
|
501
|
-
attr(span, "class", "room-label-item__text svelte-
|
|
486
|
+
attr(span, "class", "room-label-item__text svelte-1ak9fbs");
|
|
502
487
|
set_style(span, "background-image", "url(" + ROOM_LABEL_BG + ")");
|
|
503
488
|
toggle_class(span, "wide", /*roomLabel*/ ctx[0].name.length > 3);
|
|
504
|
-
attr(div0, "class", "room-label-item__bar svelte-
|
|
505
|
-
attr(div1, "class", "room-label-item svelte-
|
|
489
|
+
attr(div0, "class", "room-label-item__bar svelte-1ak9fbs");
|
|
490
|
+
attr(div1, "class", "room-label-item svelte-1ak9fbs");
|
|
506
491
|
set_style(div1, "z-index", /*roomLabel*/ ctx[0].zIndex, false);
|
|
507
492
|
set_style(div1, "transform", /*roomLabel*/ ctx[0].transform, false);
|
|
508
493
|
set_style(div1, "opacity", /*roomLabel*/ ctx[0].visible ? 1 : 0, false);
|
|
@@ -571,24 +556,24 @@ function instance$q($$self, $$props, $$invalidate) {
|
|
|
571
556
|
class RoomLabelItem extends SvelteComponent {
|
|
572
557
|
constructor(options) {
|
|
573
558
|
super();
|
|
574
|
-
init(this, options, instance$q, create_fragment$q, safe_not_equal, { five: 2, roomLabel: 0 }, add_css$
|
|
559
|
+
init(this, options, instance$q, create_fragment$q, safe_not_equal, { five: 2, roomLabel: 0 }, add_css$m);
|
|
575
560
|
}
|
|
576
561
|
}
|
|
577
562
|
|
|
578
563
|
/* src/ModelRoomLabelPlugin/RoomLabelItems.svelte generated by Svelte v3.47.0 */
|
|
579
564
|
|
|
580
|
-
function add_css$
|
|
581
|
-
append_styles(target, "svelte-
|
|
565
|
+
function add_css$l(target) {
|
|
566
|
+
append_styles(target, "svelte-9eg4zi", ".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}");
|
|
582
567
|
}
|
|
583
568
|
|
|
584
|
-
function get_each_context$
|
|
569
|
+
function get_each_context$9(ctx, list, i) {
|
|
585
570
|
const child_ctx = ctx.slice();
|
|
586
571
|
child_ctx[9] = list[i];
|
|
587
572
|
return child_ctx;
|
|
588
573
|
}
|
|
589
574
|
|
|
590
575
|
// (70:2) {#each roomLabels as roomLableItem (roomLableItem.id)}
|
|
591
|
-
function create_each_block$
|
|
576
|
+
function create_each_block$9(key_1, ctx) {
|
|
592
577
|
let first;
|
|
593
578
|
let roomlabelitem;
|
|
594
579
|
let current;
|
|
@@ -646,9 +631,9 @@ function create_fragment$p(ctx) {
|
|
|
646
631
|
const get_key = ctx => /*roomLableItem*/ ctx[9].id;
|
|
647
632
|
|
|
648
633
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
649
|
-
let child_ctx = get_each_context$
|
|
634
|
+
let child_ctx = get_each_context$9(ctx, each_value, i);
|
|
650
635
|
let key = get_key(child_ctx);
|
|
651
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block$
|
|
636
|
+
each_1_lookup.set(key, each_blocks[i] = create_each_block$9(key, child_ctx));
|
|
652
637
|
}
|
|
653
638
|
|
|
654
639
|
return {
|
|
@@ -659,7 +644,7 @@ function create_fragment$p(ctx) {
|
|
|
659
644
|
each_blocks[i].c();
|
|
660
645
|
}
|
|
661
646
|
|
|
662
|
-
attr(div, "class", "room-labels-container svelte-
|
|
647
|
+
attr(div, "class", "room-labels-container svelte-9eg4zi");
|
|
663
648
|
add_render_callback(() => /*div_elementresize_handler*/ ctx[4].call(div));
|
|
664
649
|
},
|
|
665
650
|
m(target, anchor) {
|
|
@@ -676,7 +661,7 @@ function create_fragment$p(ctx) {
|
|
|
676
661
|
if (dirty & /*roomLabels, five*/ 3) {
|
|
677
662
|
each_value = /*roomLabels*/ ctx[0];
|
|
678
663
|
group_outros();
|
|
679
|
-
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$
|
|
664
|
+
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);
|
|
680
665
|
check_outros();
|
|
681
666
|
}
|
|
682
667
|
},
|
|
@@ -799,7 +784,7 @@ function instance$p($$self, $$props, $$invalidate) {
|
|
|
799
784
|
class RoomLabelItems extends SvelteComponent {
|
|
800
785
|
constructor(options) {
|
|
801
786
|
super();
|
|
802
|
-
init(this, options, instance$p, create_fragment$p, safe_not_equal, { five: 1, roomLabels: 0 }, add_css$
|
|
787
|
+
init(this, options, instance$p, create_fragment$p, safe_not_equal, { five: 1, roomLabels: 0 }, add_css$l);
|
|
803
788
|
}
|
|
804
789
|
}
|
|
805
790
|
|
|
@@ -970,37 +955,11 @@ var FLOOR_PLAN_ATTACHED_TO;
|
|
|
970
955
|
FLOOR_PLAN_ATTACHED_TO[FLOOR_PLAN_ATTACHED_TO["BOUNDING_CENTER"] = 3] = "BOUNDING_CENTER";
|
|
971
956
|
})(FLOOR_PLAN_ATTACHED_TO || (FLOOR_PLAN_ATTACHED_TO = {}));
|
|
972
957
|
|
|
973
|
-
/*! *****************************************************************************
|
|
974
|
-
Copyright (c) Microsoft Corporation.
|
|
975
|
-
|
|
976
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
977
|
-
purpose with or without fee is hereby granted.
|
|
978
|
-
|
|
979
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
980
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
981
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
982
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
983
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
984
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
985
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
986
|
-
***************************************************************************** */
|
|
987
|
-
|
|
988
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
989
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
990
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
991
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
992
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
993
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
994
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
995
|
-
});
|
|
996
|
-
}
|
|
997
|
-
|
|
998
958
|
const pluginStyle$1 = {
|
|
999
959
|
position: 'absolute',
|
|
1000
960
|
left: '50%',
|
|
1001
961
|
top: '50%',
|
|
1002
962
|
transform: 'translate(-50%, -50%)',
|
|
1003
|
-
pointerEvents: 'none',
|
|
1004
963
|
zIndex: '10',
|
|
1005
964
|
};
|
|
1006
965
|
|
|
@@ -1027,9 +986,9 @@ function pathD(points, options = {}) {
|
|
|
1027
986
|
return d + (needZ ? 'Z' : '');
|
|
1028
987
|
}
|
|
1029
988
|
/** 把户型图上点点位转换到 SVG 上的点位 */
|
|
1030
|
-
function formatFloorplanPoint({ x, y },
|
|
989
|
+
function formatFloorplanPoint({ x, y }, bounding) {
|
|
1031
990
|
const { max, min } = bounding;
|
|
1032
|
-
return { x:
|
|
991
|
+
return { x: x - min.x, y: max.y - y };
|
|
1033
992
|
}
|
|
1034
993
|
/** 模型坐标转户型图坐标 */
|
|
1035
994
|
function modelPosition2FloorplanPosition(position, floorplanData) {
|
|
@@ -1057,26 +1016,22 @@ function getFloorIndexFromModelPosition(position, five) {
|
|
|
1057
1016
|
return floorIndex;
|
|
1058
1017
|
}
|
|
1059
1018
|
|
|
1060
|
-
function formatOutlines(outlines) {
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
const
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
url: item.url,
|
|
1068
|
-
svgUrl: item.svg_url,
|
|
1069
|
-
};
|
|
1070
|
-
if (item.svg_url) {
|
|
1071
|
-
const svgContent = yield fetch(item.svg_url, { headers }).then((res) => res.text());
|
|
1072
|
-
outlineItem.svgContent = svgContent;
|
|
1073
|
-
}
|
|
1074
|
-
return outlineItem;
|
|
1075
|
-
});
|
|
1019
|
+
async function formatOutlines(outlines) {
|
|
1020
|
+
const headers = new Headers({ 'Content-Type': 'text/plain' });
|
|
1021
|
+
const getOutlineItem = async function (item) {
|
|
1022
|
+
const outlineItem = {
|
|
1023
|
+
index: item.index,
|
|
1024
|
+
url: item.url,
|
|
1025
|
+
svgUrl: item.svg_url,
|
|
1076
1026
|
};
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1027
|
+
if (item.svg_url) {
|
|
1028
|
+
const svgContent = await fetch(item.svg_url, { headers }).then((res) => res.text());
|
|
1029
|
+
outlineItem.svgContent = svgContent;
|
|
1030
|
+
}
|
|
1031
|
+
return outlineItem;
|
|
1032
|
+
};
|
|
1033
|
+
const svgOutlineItems = await Promise.all(outlines.map(getOutlineItem));
|
|
1034
|
+
return svgOutlineItems;
|
|
1080
1035
|
}
|
|
1081
1036
|
function formatRoom(data) {
|
|
1082
1037
|
const floorplanRoomItem = {
|
|
@@ -1122,21 +1077,19 @@ function formatFloorplanEntrance(data) {
|
|
|
1122
1077
|
};
|
|
1123
1078
|
return floorplanEntrance;
|
|
1124
1079
|
}
|
|
1125
|
-
function formatData(data) {
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
return floorplanData;
|
|
1139
|
-
});
|
|
1080
|
+
async function formatData(data) {
|
|
1081
|
+
const outlines = await formatOutlines(data.outlines);
|
|
1082
|
+
const bounding = data.computed_data.bounding;
|
|
1083
|
+
const floorDatas = data.computed_data.floor_datas.map(formatFloorData);
|
|
1084
|
+
const entrance = data.computed_data.entrance ? formatFloorplanEntrance(data.computed_data.entrance) : null;
|
|
1085
|
+
const floorplanData = {
|
|
1086
|
+
outlines,
|
|
1087
|
+
entrance,
|
|
1088
|
+
bounding,
|
|
1089
|
+
floorDatas,
|
|
1090
|
+
observers: data.computed_data.observers.map(formateFloorplanObserver),
|
|
1091
|
+
};
|
|
1092
|
+
return floorplanData;
|
|
1140
1093
|
}
|
|
1141
1094
|
function formatExtraObjects(data, five, floorplanData) {
|
|
1142
1095
|
const extraObjects = data.map((object) => {
|
|
@@ -1156,35 +1109,6 @@ function formatExtraObjects(data, five, floorplanData) {
|
|
|
1156
1109
|
return extraObjects;
|
|
1157
1110
|
}
|
|
1158
1111
|
|
|
1159
|
-
/**
|
|
1160
|
-
* 把第一个参数传入第二个参数(函数)中并执行
|
|
1161
|
-
* 一般用于执行函数后返回变量。
|
|
1162
|
-
* @param {any} something
|
|
1163
|
-
* @param {function} callback
|
|
1164
|
-
* @return {any}
|
|
1165
|
-
*/
|
|
1166
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1167
|
-
function tap(something, callback) {
|
|
1168
|
-
callback(something);
|
|
1169
|
-
return something;
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
/**
|
|
1173
|
-
* 过滤掉不需要的对象字段函数:实现从一个对象中排除某些指定属性后生成的新对象。
|
|
1174
|
-
* @param object
|
|
1175
|
-
* @param props 排除的属性
|
|
1176
|
-
* @return
|
|
1177
|
-
*/
|
|
1178
|
-
function omit(object, props) {
|
|
1179
|
-
return tap({}, (result) => {
|
|
1180
|
-
for (const name in object) {
|
|
1181
|
-
if (props.indexOf(name) !== -1)
|
|
1182
|
-
continue;
|
|
1183
|
-
result[name] = object[name];
|
|
1184
|
-
}
|
|
1185
|
-
});
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
1112
|
/**
|
|
1189
1113
|
* 获取「在俯视图」状态下,模型 mm 与屏幕像素 px 的对应关系,即每 mm 对应多少 px
|
|
1190
1114
|
* @param five five
|
|
@@ -1218,16 +1142,45 @@ function getPxmm(five, container, floorIndex, options) {
|
|
|
1218
1142
|
return pxmm;
|
|
1219
1143
|
}
|
|
1220
1144
|
|
|
1145
|
+
/**
|
|
1146
|
+
* 把第一个参数传入第二个参数(函数)中并执行
|
|
1147
|
+
* 一般用于执行函数后返回变量。
|
|
1148
|
+
* @param {any} something
|
|
1149
|
+
* @param {function} callback
|
|
1150
|
+
* @return {any}
|
|
1151
|
+
*/
|
|
1152
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1153
|
+
function tap(something, callback) {
|
|
1154
|
+
callback(something);
|
|
1155
|
+
return something;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
/**
|
|
1159
|
+
* 过滤掉不需要的对象字段函数:实现从一个对象中排除某些指定属性后生成的新对象。
|
|
1160
|
+
* @param object
|
|
1161
|
+
* @param props 排除的属性
|
|
1162
|
+
* @return
|
|
1163
|
+
*/
|
|
1164
|
+
function omit(object, props) {
|
|
1165
|
+
return tap({}, (result) => {
|
|
1166
|
+
for (const name in object) {
|
|
1167
|
+
if (props.indexOf(name) !== -1)
|
|
1168
|
+
continue;
|
|
1169
|
+
result[name] = object[name];
|
|
1170
|
+
}
|
|
1171
|
+
});
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1221
1174
|
const CAMERA_IMAGE = 'data:image/png;base64,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';
|
|
1222
1175
|
|
|
1223
1176
|
function rad2Deg$1(rad) {
|
|
1224
1177
|
return (rad * 180) / Math.PI;
|
|
1225
1178
|
}
|
|
1226
1179
|
|
|
1227
|
-
/* src/floorplan/
|
|
1180
|
+
/* src/floorplan/Components/Camera.svelte generated by Svelte v3.47.0 */
|
|
1228
1181
|
|
|
1229
|
-
function add_css$
|
|
1230
|
-
append_styles(target, "svelte-
|
|
1182
|
+
function add_css$k(target) {
|
|
1183
|
+
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%}");
|
|
1231
1184
|
}
|
|
1232
1185
|
|
|
1233
1186
|
function create_fragment$o(ctx) {
|
|
@@ -1238,7 +1191,7 @@ function create_fragment$o(ctx) {
|
|
|
1238
1191
|
c() {
|
|
1239
1192
|
div1 = element("div");
|
|
1240
1193
|
div0 = element("div");
|
|
1241
|
-
attr(div0, "class", "floorplan__camera-rotate svelte-
|
|
1194
|
+
attr(div0, "class", "floorplan__camera-rotate svelte-17cl35n");
|
|
1242
1195
|
set_style(div0, "background-image", `url(${/*cameraImageUrl*/ ctx[0] || CAMERA_IMAGE})`);
|
|
1243
1196
|
set_style(div0, "width", /*domSizeStyle*/ ctx[4], false);
|
|
1244
1197
|
set_style(div0, "height", /*domSizeStyle*/ ctx[4], false);
|
|
@@ -1246,7 +1199,7 @@ function create_fragment$o(ctx) {
|
|
|
1246
1199
|
set_style(div0, "top", '-' + /*domSizeStyle*/ ctx[4], false);
|
|
1247
1200
|
set_style(div0, "transform", `rotate(${/*rotate*/ ctx[3]}deg)`, false);
|
|
1248
1201
|
set_style(div0, "transform-origin", `${/*domSizeStyle*/ ctx[4]} ${/*domSizeStyle*/ ctx[4]}`, false);
|
|
1249
|
-
attr(div1, "class", "floorplan__camera-position svelte-
|
|
1202
|
+
attr(div1, "class", "floorplan__camera-position svelte-17cl35n");
|
|
1250
1203
|
set_style(div1, "left", /*positionLeft*/ ctx[1], false);
|
|
1251
1204
|
set_style(div1, "top", /*positionTop*/ ctx[2], false);
|
|
1252
1205
|
},
|
|
@@ -1322,17 +1275,17 @@ class Camera$1 extends SvelteComponent {
|
|
|
1322
1275
|
lastPanoramaLongitude: 7,
|
|
1323
1276
|
cameraImageUrl: 0
|
|
1324
1277
|
},
|
|
1325
|
-
add_css$
|
|
1278
|
+
add_css$k
|
|
1326
1279
|
);
|
|
1327
1280
|
}
|
|
1328
1281
|
}
|
|
1329
1282
|
|
|
1330
1283
|
const COMPASS_IMAGE = 'data:image/png;base64,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';
|
|
1331
1284
|
|
|
1332
|
-
/* src/floorplan/
|
|
1285
|
+
/* src/floorplan/Components/Compass.svelte generated by Svelte v3.47.0 */
|
|
1333
1286
|
|
|
1334
|
-
function add_css$
|
|
1335
|
-
append_styles(target, "svelte-
|
|
1287
|
+
function add_css$j(target) {
|
|
1288
|
+
append_styles(target, "svelte-1q44ru9", ".floorplan-plugin__compass.svelte-1q44ru9{position:absolute;left:50%;top:-2.39583rem;width:12.03125rem;height:2.13542rem;will-change:opacity;transform-origin:center 9.58333rem}.floorplan-plugin__compass-image.svelte-1q44ru9{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-1q44ru9{position:absolute;left:50%;top:0.78125rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.52083rem;color:#fff}");
|
|
1336
1289
|
}
|
|
1337
1290
|
|
|
1338
1291
|
// (13:0) {#if northRad}
|
|
@@ -1350,10 +1303,10 @@ function create_if_block$8(ctx) {
|
|
|
1350
1303
|
t0 = space();
|
|
1351
1304
|
span = element("span");
|
|
1352
1305
|
t1 = text(/*northDesc*/ ctx[0]);
|
|
1353
|
-
attr(div0, "class", "floorplan-plugin__compass-image svelte-
|
|
1306
|
+
attr(div0, "class", "floorplan-plugin__compass-image svelte-1q44ru9");
|
|
1354
1307
|
set_style(div0, "background-image", `url(${COMPASS_IMAGE})`);
|
|
1355
|
-
attr(span, "class", "floorplan-plugin__compass-text svelte-
|
|
1356
|
-
attr(div1, "class", "floorplan-plugin__compass svelte-
|
|
1308
|
+
attr(span, "class", "floorplan-plugin__compass-text svelte-1q44ru9");
|
|
1309
|
+
attr(div1, "class", "floorplan-plugin__compass svelte-1q44ru9");
|
|
1357
1310
|
set_style(div1, "transform", /*compassTransformStyle*/ ctx[2], false);
|
|
1358
1311
|
},
|
|
1359
1312
|
m(target, anchor) {
|
|
@@ -1424,345 +1377,271 @@ function instance$n($$self, $$props, $$invalidate) {
|
|
|
1424
1377
|
class Compass extends SvelteComponent {
|
|
1425
1378
|
constructor(options) {
|
|
1426
1379
|
super();
|
|
1427
|
-
init(this, options, instance$n, create_fragment$n, safe_not_equal, { floorplanData: 3, northDesc: 0 }, add_css$
|
|
1380
|
+
init(this, options, instance$n, create_fragment$n, safe_not_equal, { floorplanData: 3, northDesc: 0 }, add_css$j);
|
|
1428
1381
|
}
|
|
1429
1382
|
}
|
|
1430
1383
|
|
|
1431
|
-
/* src/floorplan/
|
|
1384
|
+
/* src/floorplan/Components/Normalmage.svelte generated by Svelte v3.47.0 */
|
|
1432
1385
|
|
|
1433
|
-
function add_css$
|
|
1434
|
-
append_styles(target, "svelte-
|
|
1386
|
+
function add_css$i(target) {
|
|
1387
|
+
append_styles(target, "svelte-1gfoniz", "img.svelte-1gfoniz{width:100%;height:100%}");
|
|
1435
1388
|
}
|
|
1436
1389
|
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
let
|
|
1440
|
-
let raw_value = /*userConfigElement*/ ctx[2].outerHTML + "";
|
|
1441
|
-
let html_anchor;
|
|
1390
|
+
function create_fragment$m(ctx) {
|
|
1391
|
+
let img;
|
|
1392
|
+
let img_src_value;
|
|
1442
1393
|
|
|
1443
1394
|
return {
|
|
1444
1395
|
c() {
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1396
|
+
img = element("img");
|
|
1397
|
+
if (!src_url_equal(img.src, img_src_value = /*url*/ ctx[0])) attr(img, "src", img_src_value);
|
|
1398
|
+
attr(img, "alt", "floorplan iamge");
|
|
1399
|
+
attr(img, "class", "svelte-1gfoniz");
|
|
1448
1400
|
},
|
|
1449
1401
|
m(target, anchor) {
|
|
1450
|
-
|
|
1451
|
-
insert(target, html_anchor, anchor);
|
|
1402
|
+
insert(target, img, anchor);
|
|
1452
1403
|
},
|
|
1453
|
-
p(ctx, dirty) {
|
|
1454
|
-
if (dirty & /*
|
|
1404
|
+
p(ctx, [dirty]) {
|
|
1405
|
+
if (dirty & /*url*/ 1 && !src_url_equal(img.src, img_src_value = /*url*/ ctx[0])) {
|
|
1406
|
+
attr(img, "src", img_src_value);
|
|
1407
|
+
}
|
|
1455
1408
|
},
|
|
1409
|
+
i: noop,
|
|
1410
|
+
o: noop,
|
|
1456
1411
|
d(detaching) {
|
|
1457
|
-
if (detaching) detach(
|
|
1458
|
-
if (detaching) html_tag.d();
|
|
1412
|
+
if (detaching) detach(img);
|
|
1459
1413
|
}
|
|
1460
1414
|
};
|
|
1461
1415
|
}
|
|
1462
1416
|
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
let span0;
|
|
1466
|
-
let t0_value = /*room*/ ctx[0].name + "";
|
|
1467
|
-
let t0;
|
|
1468
|
-
let t1;
|
|
1469
|
-
let span1;
|
|
1417
|
+
function instance$m($$self, $$props, $$invalidate) {
|
|
1418
|
+
let { url } = $$props;
|
|
1470
1419
|
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
span0 = element("span");
|
|
1474
|
-
t0 = text(t0_value);
|
|
1475
|
-
t1 = space();
|
|
1476
|
-
span1 = element("span");
|
|
1477
|
-
span1.textContent = `${/*roomSizeDes*/ ctx[3]}`;
|
|
1478
|
-
attr(span0, "class", "floorplan-plugin__room-name");
|
|
1479
|
-
attr(span1, "class", "floorplan-plugin__room-size svelte-1ashbdx");
|
|
1480
|
-
},
|
|
1481
|
-
m(target, anchor) {
|
|
1482
|
-
insert(target, span0, anchor);
|
|
1483
|
-
append(span0, t0);
|
|
1484
|
-
insert(target, t1, anchor);
|
|
1485
|
-
insert(target, span1, anchor);
|
|
1486
|
-
},
|
|
1487
|
-
p(ctx, dirty) {
|
|
1488
|
-
if (dirty & /*room*/ 1 && t0_value !== (t0_value = /*room*/ ctx[0].name + "")) set_data(t0, t0_value);
|
|
1489
|
-
},
|
|
1490
|
-
d(detaching) {
|
|
1491
|
-
if (detaching) detach(span0);
|
|
1492
|
-
if (detaching) detach(t1);
|
|
1493
|
-
if (detaching) detach(span1);
|
|
1494
|
-
}
|
|
1420
|
+
$$self.$$set = $$props => {
|
|
1421
|
+
if ('url' in $$props) $$invalidate(0, url = $$props.url);
|
|
1495
1422
|
};
|
|
1496
|
-
}
|
|
1497
1423
|
|
|
1498
|
-
|
|
1499
|
-
|
|
1424
|
+
return [url];
|
|
1425
|
+
}
|
|
1500
1426
|
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1427
|
+
class Normalmage extends SvelteComponent {
|
|
1428
|
+
constructor(options) {
|
|
1429
|
+
super();
|
|
1430
|
+
init(this, options, instance$m, create_fragment$m, safe_not_equal, { url: 0 }, add_css$i);
|
|
1504
1431
|
}
|
|
1432
|
+
}
|
|
1505
1433
|
|
|
1506
|
-
|
|
1507
|
-
|
|
1434
|
+
/* src/floorplan/Components/SvgImage.svelte generated by Svelte v3.47.0 */
|
|
1435
|
+
|
|
1436
|
+
function add_css$h(target) {
|
|
1437
|
+
append_styles(target, "svelte-ub47ya", ".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}");
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
function create_fragment$l(ctx) {
|
|
1441
|
+
let div;
|
|
1442
|
+
let html_tag;
|
|
1443
|
+
let t;
|
|
1444
|
+
let html_tag_1;
|
|
1508
1445
|
|
|
1509
1446
|
return {
|
|
1510
1447
|
c() {
|
|
1511
1448
|
div = element("div");
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1449
|
+
html_tag = new HtmlTag();
|
|
1450
|
+
t = space();
|
|
1451
|
+
html_tag_1 = new HtmlTag();
|
|
1452
|
+
html_tag.a = t;
|
|
1453
|
+
html_tag_1.a = null;
|
|
1454
|
+
attr(div, "class", "floorplan-plugin__base-image svelte-ub47ya");
|
|
1517
1455
|
},
|
|
1518
1456
|
m(target, anchor) {
|
|
1519
1457
|
insert(target, div, anchor);
|
|
1520
|
-
|
|
1458
|
+
html_tag.m(/*svgStyle*/ ctx[1], div);
|
|
1459
|
+
append(div, t);
|
|
1460
|
+
html_tag_1.m(/*content*/ ctx[0], div);
|
|
1521
1461
|
},
|
|
1522
1462
|
p(ctx, [dirty]) {
|
|
1523
|
-
if (
|
|
1524
|
-
if_block.p(ctx, dirty);
|
|
1525
|
-
} else {
|
|
1526
|
-
if (if_block) if_block.d(1);
|
|
1527
|
-
if_block = current_block_type && current_block_type(ctx);
|
|
1528
|
-
|
|
1529
|
-
if (if_block) {
|
|
1530
|
-
if_block.c();
|
|
1531
|
-
if_block.m(div, null);
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1463
|
+
if (dirty & /*content*/ 1) html_tag_1.p(/*content*/ ctx[0]);
|
|
1534
1464
|
},
|
|
1535
1465
|
i: noop,
|
|
1536
1466
|
o: noop,
|
|
1537
1467
|
d(detaching) {
|
|
1538
1468
|
if (detaching) detach(div);
|
|
1539
|
-
|
|
1540
|
-
if (if_block) {
|
|
1541
|
-
if_block.d();
|
|
1542
|
-
}
|
|
1543
1469
|
}
|
|
1544
1470
|
};
|
|
1545
1471
|
}
|
|
1546
1472
|
|
|
1547
|
-
function instance$
|
|
1548
|
-
let
|
|
1549
|
-
let { room } = $$props;
|
|
1550
|
-
let { getLabelElement } = $$props;
|
|
1551
|
-
|
|
1552
|
-
// TODO: 统一这里的判断条件,目前写了多处
|
|
1553
|
-
const bodyWidth = document.body.clientWidth;
|
|
1473
|
+
function instance$l($$self, $$props, $$invalidate) {
|
|
1474
|
+
let { content } = $$props;
|
|
1554
1475
|
|
|
1555
|
-
const
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1476
|
+
const svgStyle = `
|
|
1477
|
+
<style>
|
|
1478
|
+
svg [type='lineGroup'] path {
|
|
1479
|
+
fill: #ffffff;
|
|
1480
|
+
stroke: #ffffff;
|
|
1481
|
+
}
|
|
1482
|
+
svg [type='lineItemGroup'] g g g g {
|
|
1483
|
+
stroke: #ffffff;
|
|
1484
|
+
}</style>
|
|
1485
|
+
`;
|
|
1561
1486
|
|
|
1562
1487
|
$$self.$$set = $$props => {
|
|
1563
|
-
if ('
|
|
1564
|
-
if ('getLabelElement' in $$props) $$invalidate(1, getLabelElement = $$props.getLabelElement);
|
|
1565
|
-
};
|
|
1566
|
-
|
|
1567
|
-
$$self.$$.update = () => {
|
|
1568
|
-
if ($$self.$$.dirty & /*getLabelElement, room*/ 3) {
|
|
1569
|
-
$$invalidate(2, userConfigElement = getLabelElement === null || getLabelElement === void 0
|
|
1570
|
-
? void 0
|
|
1571
|
-
: getLabelElement(room));
|
|
1572
|
-
}
|
|
1488
|
+
if ('content' in $$props) $$invalidate(0, content = $$props.content);
|
|
1573
1489
|
};
|
|
1574
1490
|
|
|
1575
|
-
return [
|
|
1491
|
+
return [content, svgStyle];
|
|
1576
1492
|
}
|
|
1577
1493
|
|
|
1578
|
-
class
|
|
1494
|
+
class SvgImage extends SvelteComponent {
|
|
1579
1495
|
constructor(options) {
|
|
1580
1496
|
super();
|
|
1581
|
-
init(this, options, instance$
|
|
1497
|
+
init(this, options, instance$l, create_fragment$l, safe_not_equal, { content: 0 }, add_css$h);
|
|
1582
1498
|
}
|
|
1583
1499
|
}
|
|
1584
1500
|
|
|
1585
|
-
/* src/floorplan/
|
|
1501
|
+
/* src/floorplan/Components/BaseImage.svelte generated by Svelte v3.47.0 */
|
|
1586
1502
|
|
|
1587
1503
|
function add_css$g(target) {
|
|
1588
|
-
append_styles(target, "svelte-
|
|
1504
|
+
append_styles(target, "svelte-ozpg4a", ".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}");
|
|
1589
1505
|
}
|
|
1590
1506
|
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
// (8:0) {#if rooms}
|
|
1598
|
-
function create_if_block$6(ctx) {
|
|
1599
|
-
let div;
|
|
1600
|
-
let each_blocks = [];
|
|
1601
|
-
let each_1_lookup = new Map();
|
|
1602
|
-
let current;
|
|
1603
|
-
let each_value = /*rooms*/ ctx[1];
|
|
1604
|
-
const get_key = ctx => /*room*/ ctx[4].id;
|
|
1605
|
-
|
|
1606
|
-
for (let i = 0; i < each_value.length; i += 1) {
|
|
1607
|
-
let child_ctx = get_each_context$7(ctx, each_value, i);
|
|
1608
|
-
let key = get_key(child_ctx);
|
|
1609
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block$7(key, child_ctx));
|
|
1610
|
-
}
|
|
1507
|
+
// (13:22)
|
|
1508
|
+
function create_if_block_1$4(ctx) {
|
|
1509
|
+
let normalimage;
|
|
1510
|
+
let current;
|
|
1511
|
+
normalimage = new Normalmage({ props: { url: /*imageData*/ ctx[1].url } });
|
|
1611
1512
|
|
|
1612
1513
|
return {
|
|
1613
1514
|
c() {
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
1617
|
-
each_blocks[i].c();
|
|
1618
|
-
}
|
|
1619
|
-
|
|
1620
|
-
attr(div, "class", "floorplan-plugin__room-labels svelte-sw25w3");
|
|
1515
|
+
create_component(normalimage.$$.fragment);
|
|
1621
1516
|
},
|
|
1622
1517
|
m(target, anchor) {
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
1626
|
-
each_blocks[i].m(div, null);
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1518
|
+
mount_component(normalimage, target, anchor);
|
|
1629
1519
|
current = true;
|
|
1630
1520
|
},
|
|
1631
1521
|
p(ctx, dirty) {
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
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$7, null, get_each_context$7);
|
|
1636
|
-
check_outros();
|
|
1637
|
-
}
|
|
1522
|
+
const normalimage_changes = {};
|
|
1523
|
+
if (dirty & /*imageData*/ 2) normalimage_changes.url = /*imageData*/ ctx[1].url;
|
|
1524
|
+
normalimage.$set(normalimage_changes);
|
|
1638
1525
|
},
|
|
1639
1526
|
i(local) {
|
|
1640
1527
|
if (current) return;
|
|
1641
|
-
|
|
1642
|
-
for (let i = 0; i < each_value.length; i += 1) {
|
|
1643
|
-
transition_in(each_blocks[i]);
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1528
|
+
transition_in(normalimage.$$.fragment, local);
|
|
1646
1529
|
current = true;
|
|
1647
1530
|
},
|
|
1648
1531
|
o(local) {
|
|
1649
|
-
|
|
1650
|
-
transition_out(each_blocks[i]);
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1532
|
+
transition_out(normalimage.$$.fragment, local);
|
|
1653
1533
|
current = false;
|
|
1654
1534
|
},
|
|
1655
1535
|
d(detaching) {
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
1659
|
-
each_blocks[i].d();
|
|
1660
|
-
}
|
|
1536
|
+
destroy_component(normalimage, detaching);
|
|
1661
1537
|
}
|
|
1662
1538
|
};
|
|
1663
1539
|
}
|
|
1664
1540
|
|
|
1665
|
-
// (
|
|
1666
|
-
function
|
|
1667
|
-
let
|
|
1668
|
-
let roomlabel;
|
|
1541
|
+
// (11:2) {#if svgContent}
|
|
1542
|
+
function create_if_block$7(ctx) {
|
|
1543
|
+
let svgimage;
|
|
1669
1544
|
let current;
|
|
1670
1545
|
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
getLabelElement: /*getLabelElement*/ ctx[0]
|
|
1675
|
-
}
|
|
1676
|
-
];
|
|
1677
|
-
|
|
1678
|
-
let roomlabel_props = {};
|
|
1679
|
-
|
|
1680
|
-
for (let i = 0; i < roomlabel_spread_levels.length; i += 1) {
|
|
1681
|
-
roomlabel_props = assign(roomlabel_props, roomlabel_spread_levels[i]);
|
|
1682
|
-
}
|
|
1683
|
-
|
|
1684
|
-
roomlabel = new RoomLabel({ props: roomlabel_props });
|
|
1546
|
+
svgimage = new SvgImage({
|
|
1547
|
+
props: { content: /*svgContent*/ ctx[0] }
|
|
1548
|
+
});
|
|
1685
1549
|
|
|
1686
1550
|
return {
|
|
1687
|
-
key: key_1,
|
|
1688
|
-
first: null,
|
|
1689
1551
|
c() {
|
|
1690
|
-
|
|
1691
|
-
create_component(roomlabel.$$.fragment);
|
|
1692
|
-
this.first = first;
|
|
1552
|
+
create_component(svgimage.$$.fragment);
|
|
1693
1553
|
},
|
|
1694
1554
|
m(target, anchor) {
|
|
1695
|
-
|
|
1696
|
-
mount_component(roomlabel, target, anchor);
|
|
1555
|
+
mount_component(svgimage, target, anchor);
|
|
1697
1556
|
current = true;
|
|
1698
1557
|
},
|
|
1699
|
-
p(
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
? get_spread_update(roomlabel_spread_levels, [
|
|
1704
|
-
{
|
|
1705
|
-
room: /*room*/ ctx[4],
|
|
1706
|
-
getLabelElement: /*getLabelElement*/ ctx[0]
|
|
1707
|
-
}
|
|
1708
|
-
])
|
|
1709
|
-
: {};
|
|
1710
|
-
|
|
1711
|
-
roomlabel.$set(roomlabel_changes);
|
|
1558
|
+
p(ctx, dirty) {
|
|
1559
|
+
const svgimage_changes = {};
|
|
1560
|
+
if (dirty & /*svgContent*/ 1) svgimage_changes.content = /*svgContent*/ ctx[0];
|
|
1561
|
+
svgimage.$set(svgimage_changes);
|
|
1712
1562
|
},
|
|
1713
1563
|
i(local) {
|
|
1714
1564
|
if (current) return;
|
|
1715
|
-
transition_in(
|
|
1565
|
+
transition_in(svgimage.$$.fragment, local);
|
|
1716
1566
|
current = true;
|
|
1717
1567
|
},
|
|
1718
1568
|
o(local) {
|
|
1719
|
-
transition_out(
|
|
1569
|
+
transition_out(svgimage.$$.fragment, local);
|
|
1720
1570
|
current = false;
|
|
1721
1571
|
},
|
|
1722
1572
|
d(detaching) {
|
|
1723
|
-
|
|
1724
|
-
destroy_component(roomlabel, detaching);
|
|
1573
|
+
destroy_component(svgimage, detaching);
|
|
1725
1574
|
}
|
|
1726
1575
|
};
|
|
1727
1576
|
}
|
|
1728
1577
|
|
|
1729
|
-
function create_fragment$
|
|
1730
|
-
let
|
|
1578
|
+
function create_fragment$k(ctx) {
|
|
1579
|
+
let div;
|
|
1580
|
+
let current_block_type_index;
|
|
1581
|
+
let if_block;
|
|
1731
1582
|
let current;
|
|
1732
|
-
|
|
1583
|
+
const if_block_creators = [create_if_block$7, create_if_block_1$4];
|
|
1584
|
+
const if_blocks = [];
|
|
1585
|
+
|
|
1586
|
+
function select_block_type(ctx, dirty) {
|
|
1587
|
+
if (/*svgContent*/ ctx[0]) return 0;
|
|
1588
|
+
if (/*imageData*/ ctx[1]) return 1;
|
|
1589
|
+
return -1;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
if (~(current_block_type_index = select_block_type(ctx))) {
|
|
1593
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
1594
|
+
}
|
|
1733
1595
|
|
|
1734
1596
|
return {
|
|
1735
1597
|
c() {
|
|
1598
|
+
div = element("div");
|
|
1736
1599
|
if (if_block) if_block.c();
|
|
1737
|
-
|
|
1600
|
+
attr(div, "class", "floorplan-plugin__base-image svelte-ozpg4a");
|
|
1738
1601
|
},
|
|
1739
1602
|
m(target, anchor) {
|
|
1740
|
-
|
|
1741
|
-
|
|
1603
|
+
insert(target, div, anchor);
|
|
1604
|
+
|
|
1605
|
+
if (~current_block_type_index) {
|
|
1606
|
+
if_blocks[current_block_type_index].m(div, null);
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1742
1609
|
current = true;
|
|
1743
1610
|
},
|
|
1744
1611
|
p(ctx, [dirty]) {
|
|
1745
|
-
|
|
1612
|
+
let previous_block_index = current_block_type_index;
|
|
1613
|
+
current_block_type_index = select_block_type(ctx);
|
|
1614
|
+
|
|
1615
|
+
if (current_block_type_index === previous_block_index) {
|
|
1616
|
+
if (~current_block_type_index) {
|
|
1617
|
+
if_blocks[current_block_type_index].p(ctx, dirty);
|
|
1618
|
+
}
|
|
1619
|
+
} else {
|
|
1746
1620
|
if (if_block) {
|
|
1747
|
-
|
|
1621
|
+
group_outros();
|
|
1748
1622
|
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
if_block.c();
|
|
1755
|
-
transition_in(if_block, 1);
|
|
1756
|
-
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
1623
|
+
transition_out(if_blocks[previous_block_index], 1, 1, () => {
|
|
1624
|
+
if_blocks[previous_block_index] = null;
|
|
1625
|
+
});
|
|
1626
|
+
|
|
1627
|
+
check_outros();
|
|
1757
1628
|
}
|
|
1758
|
-
} else if (if_block) {
|
|
1759
|
-
group_outros();
|
|
1760
1629
|
|
|
1761
|
-
|
|
1762
|
-
if_block =
|
|
1763
|
-
});
|
|
1630
|
+
if (~current_block_type_index) {
|
|
1631
|
+
if_block = if_blocks[current_block_type_index];
|
|
1764
1632
|
|
|
1765
|
-
|
|
1633
|
+
if (!if_block) {
|
|
1634
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
1635
|
+
if_block.c();
|
|
1636
|
+
} else {
|
|
1637
|
+
if_block.p(ctx, dirty);
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
transition_in(if_block, 1);
|
|
1641
|
+
if_block.m(div, null);
|
|
1642
|
+
} else {
|
|
1643
|
+
if_block = null;
|
|
1644
|
+
}
|
|
1766
1645
|
}
|
|
1767
1646
|
},
|
|
1768
1647
|
i(local) {
|
|
@@ -1775,434 +1654,230 @@ function create_fragment$l(ctx) {
|
|
|
1775
1654
|
current = false;
|
|
1776
1655
|
},
|
|
1777
1656
|
d(detaching) {
|
|
1778
|
-
if (
|
|
1779
|
-
|
|
1657
|
+
if (detaching) detach(div);
|
|
1658
|
+
|
|
1659
|
+
if (~current_block_type_index) {
|
|
1660
|
+
if_blocks[current_block_type_index].d();
|
|
1661
|
+
}
|
|
1780
1662
|
}
|
|
1781
1663
|
};
|
|
1782
1664
|
}
|
|
1783
1665
|
|
|
1784
|
-
function instance$
|
|
1785
|
-
let
|
|
1666
|
+
function instance$k($$self, $$props, $$invalidate) {
|
|
1667
|
+
let imageData;
|
|
1668
|
+
let svgContent;
|
|
1669
|
+
var _a, _b;
|
|
1786
1670
|
let { floorIndex } = $$props;
|
|
1787
1671
|
let { floorplanData } = $$props;
|
|
1788
|
-
let { getLabelElement } = $$props;
|
|
1789
1672
|
|
|
1790
1673
|
$$self.$$set = $$props => {
|
|
1791
1674
|
if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
|
|
1792
1675
|
if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
|
|
1793
|
-
if ('getLabelElement' in $$props) $$invalidate(0, getLabelElement = $$props.getLabelElement);
|
|
1794
1676
|
};
|
|
1795
1677
|
|
|
1796
1678
|
$$self.$$.update = () => {
|
|
1797
1679
|
if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 12) {
|
|
1798
|
-
$$invalidate(1,
|
|
1680
|
+
$$invalidate(1, imageData = floorplanData.outlines[floorIndex]);
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
if ($$self.$$.dirty & /*floorplanData, _a, floorIndex, _b*/ 60) {
|
|
1684
|
+
$$invalidate(0, svgContent = $$invalidate(5, _b = $$invalidate(4, _a = floorplanData.outlines) === null || _a === void 0
|
|
1685
|
+
? void 0
|
|
1686
|
+
: _a[floorIndex]) === null || _b === void 0
|
|
1687
|
+
? void 0
|
|
1688
|
+
: _b.svgContent);
|
|
1799
1689
|
}
|
|
1800
1690
|
};
|
|
1801
1691
|
|
|
1802
|
-
return [
|
|
1692
|
+
return [svgContent, imageData, floorIndex, floorplanData, _a, _b];
|
|
1803
1693
|
}
|
|
1804
1694
|
|
|
1805
|
-
class
|
|
1695
|
+
class BaseImage extends SvelteComponent {
|
|
1806
1696
|
constructor(options) {
|
|
1807
1697
|
super();
|
|
1808
|
-
|
|
1809
|
-
init(
|
|
1810
|
-
this,
|
|
1811
|
-
options,
|
|
1812
|
-
instance$l,
|
|
1813
|
-
create_fragment$l,
|
|
1814
|
-
safe_not_equal,
|
|
1815
|
-
{
|
|
1816
|
-
floorIndex: 2,
|
|
1817
|
-
floorplanData: 3,
|
|
1818
|
-
getLabelElement: 0
|
|
1819
|
-
},
|
|
1820
|
-
add_css$g
|
|
1821
|
-
);
|
|
1698
|
+
init(this, options, instance$k, create_fragment$k, safe_not_equal, { floorIndex: 2, floorplanData: 3 }, add_css$g);
|
|
1822
1699
|
}
|
|
1823
1700
|
}
|
|
1824
1701
|
|
|
1825
|
-
|
|
1826
|
-
* 判断对象是否为`null`或`undefined`。
|
|
1827
|
-
* @param
|
|
1828
|
-
* @return
|
|
1829
|
-
*/
|
|
1830
|
-
/**
|
|
1831
|
-
* 判断对象不为`null`或`undefined`。
|
|
1832
|
-
*/
|
|
1833
|
-
function notNil(value) {
|
|
1834
|
-
return value !== null && value !== undefined;
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
|
-
/* src/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte generated by Svelte v3.47.0 */
|
|
1702
|
+
/* src/floorplan/Components/RoomLabels/RoomLabel.svelte generated by Svelte v3.47.0 */
|
|
1838
1703
|
|
|
1839
1704
|
function add_css$f(target) {
|
|
1840
|
-
append_styles(target, "svelte-
|
|
1841
|
-
}
|
|
1842
|
-
|
|
1843
|
-
function get_each_context$6(ctx, list, i) {
|
|
1844
|
-
const child_ctx = ctx.slice();
|
|
1845
|
-
child_ctx[24] = list[i];
|
|
1846
|
-
child_ctx[26] = i;
|
|
1847
|
-
return child_ctx;
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
|
-
function get_each_context_1(ctx, list, i) {
|
|
1851
|
-
const child_ctx = ctx.slice();
|
|
1852
|
-
child_ctx[27] = list[i];
|
|
1853
|
-
child_ctx[29] = i;
|
|
1854
|
-
return child_ctx;
|
|
1705
|
+
append_styles(target, "svelte-i2nwuk", ".floorplan-plugin__room-label-item.svelte-i2nwuk{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:0.78125rem;color:#fff;transform:translate(-50%, -50%);white-space:nowrap}.floorplan-plugin__room-size.svelte-i2nwuk{opacity:0.45}");
|
|
1855
1706
|
}
|
|
1856
1707
|
|
|
1857
|
-
// (
|
|
1858
|
-
function
|
|
1859
|
-
let
|
|
1860
|
-
let
|
|
1708
|
+
// (22:30)
|
|
1709
|
+
function create_if_block_1$3(ctx) {
|
|
1710
|
+
let html_tag;
|
|
1711
|
+
let raw_value = /*userConfigElement*/ ctx[2].outerHTML + "";
|
|
1712
|
+
let html_anchor;
|
|
1861
1713
|
|
|
1862
1714
|
return {
|
|
1863
|
-
key: key_1,
|
|
1864
|
-
first: null,
|
|
1865
1715
|
c() {
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
this.first = div;
|
|
1716
|
+
html_tag = new HtmlTag();
|
|
1717
|
+
html_anchor = empty();
|
|
1718
|
+
html_tag.a = html_anchor;
|
|
1870
1719
|
},
|
|
1871
1720
|
m(target, anchor) {
|
|
1872
|
-
|
|
1721
|
+
html_tag.m(raw_value, target, anchor);
|
|
1722
|
+
insert(target, html_anchor, anchor);
|
|
1873
1723
|
},
|
|
1874
|
-
p(
|
|
1875
|
-
|
|
1724
|
+
p(ctx, dirty) {
|
|
1725
|
+
if (dirty & /*userConfigElement*/ 4 && raw_value !== (raw_value = /*userConfigElement*/ ctx[2].outerHTML + "")) html_tag.p(raw_value);
|
|
1876
1726
|
},
|
|
1877
1727
|
d(detaching) {
|
|
1878
|
-
if (detaching) detach(
|
|
1879
|
-
|
|
1728
|
+
if (detaching) detach(html_anchor);
|
|
1729
|
+
if (detaching) html_tag.d();
|
|
1730
|
+
}
|
|
1880
1731
|
};
|
|
1881
1732
|
}
|
|
1882
1733
|
|
|
1883
|
-
// (
|
|
1884
|
-
function
|
|
1885
|
-
let
|
|
1886
|
-
let
|
|
1887
|
-
let t0_value = /*textItem*/ ctx[24].distance + "";
|
|
1734
|
+
// (16:2) {#if getLabelElement === undefined}
|
|
1735
|
+
function create_if_block$6(ctx) {
|
|
1736
|
+
let span0;
|
|
1737
|
+
let t0_value = /*room*/ ctx[0].name + "";
|
|
1888
1738
|
let t0;
|
|
1889
1739
|
let t1;
|
|
1890
|
-
let
|
|
1740
|
+
let span1;
|
|
1891
1741
|
|
|
1892
1742
|
return {
|
|
1893
|
-
key: key_1,
|
|
1894
|
-
first: null,
|
|
1895
1743
|
c() {
|
|
1896
|
-
|
|
1897
|
-
span = element("span");
|
|
1744
|
+
span0 = element("span");
|
|
1898
1745
|
t0 = text(t0_value);
|
|
1899
1746
|
t1 = space();
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
attr(
|
|
1903
|
-
|
|
1904
|
-
toggle_class(div, "floorplan-plugin__text-wrapper-is-right-or-bottom", /*isRight*/ ctx[4] || /*isBottom*/ ctx[2]);
|
|
1905
|
-
set_style(div, "left", style_left, false);
|
|
1906
|
-
this.first = div;
|
|
1747
|
+
span1 = element("span");
|
|
1748
|
+
span1.textContent = `${/*roomSizeDes*/ ctx[3]}`;
|
|
1749
|
+
attr(span0, "class", "floorplan-plugin__room-name");
|
|
1750
|
+
attr(span1, "class", "floorplan-plugin__room-size svelte-i2nwuk");
|
|
1907
1751
|
},
|
|
1908
1752
|
m(target, anchor) {
|
|
1909
|
-
insert(target,
|
|
1910
|
-
append(
|
|
1911
|
-
|
|
1912
|
-
|
|
1753
|
+
insert(target, span0, anchor);
|
|
1754
|
+
append(span0, t0);
|
|
1755
|
+
insert(target, t1, anchor);
|
|
1756
|
+
insert(target, span1, anchor);
|
|
1913
1757
|
},
|
|
1914
|
-
p(
|
|
1915
|
-
|
|
1758
|
+
p(ctx, dirty) {
|
|
1759
|
+
if (dirty & /*room*/ 1 && t0_value !== (t0_value = /*room*/ ctx[0].name + "")) set_data(t0, t0_value);
|
|
1916
1760
|
},
|
|
1917
1761
|
d(detaching) {
|
|
1918
|
-
if (detaching) detach(
|
|
1762
|
+
if (detaching) detach(span0);
|
|
1763
|
+
if (detaching) detach(t1);
|
|
1764
|
+
if (detaching) detach(span1);
|
|
1919
1765
|
}
|
|
1920
1766
|
};
|
|
1921
1767
|
}
|
|
1922
1768
|
|
|
1923
|
-
function create_fragment$
|
|
1924
|
-
let
|
|
1925
|
-
let div0;
|
|
1926
|
-
let t0;
|
|
1927
|
-
let each_blocks_1 = [];
|
|
1928
|
-
let each0_lookup = new Map();
|
|
1929
|
-
let t1;
|
|
1930
|
-
let each_blocks = [];
|
|
1931
|
-
let each1_lookup = new Map();
|
|
1932
|
-
let div1_class_value;
|
|
1933
|
-
let each_value_1 = /*positionPxArray*/ ctx[6];
|
|
1934
|
-
const get_key = ctx => /*positionIndex*/ ctx[29];
|
|
1769
|
+
function create_fragment$j(ctx) {
|
|
1770
|
+
let div;
|
|
1935
1771
|
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
each0_lookup.set(key, each_blocks_1[i] = create_each_block_1(key, child_ctx));
|
|
1772
|
+
function select_block_type(ctx, dirty) {
|
|
1773
|
+
if (/*getLabelElement*/ ctx[1] === undefined) return create_if_block$6;
|
|
1774
|
+
if (/*userConfigElement*/ ctx[2]) return create_if_block_1$3;
|
|
1940
1775
|
}
|
|
1941
1776
|
|
|
1942
|
-
let
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
for (let i = 0; i < each_value.length; i += 1) {
|
|
1946
|
-
let child_ctx = get_each_context$6(ctx, each_value, i);
|
|
1947
|
-
let key = get_key_1(child_ctx);
|
|
1948
|
-
each1_lookup.set(key, each_blocks[i] = create_each_block$6(key, child_ctx));
|
|
1949
|
-
}
|
|
1777
|
+
let current_block_type = select_block_type(ctx);
|
|
1778
|
+
let if_block = current_block_type && current_block_type(ctx);
|
|
1950
1779
|
|
|
1951
1780
|
return {
|
|
1952
1781
|
c() {
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
}
|
|
1960
|
-
|
|
1961
|
-
t1 = space();
|
|
1962
|
-
|
|
1963
|
-
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
1964
|
-
each_blocks[i].c();
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
|
-
attr(div0, "class", "floorplan-plugin__rule-line svelte-1rr09in");
|
|
1968
|
-
attr(div1, "class", div1_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels-" + /*type*/ ctx[0] + " svelte-1rr09in");
|
|
1969
|
-
set_style(div1, "width", /*width*/ ctx[9], false);
|
|
1970
|
-
set_style(div1, "transform", /*transform*/ ctx[7], false);
|
|
1971
|
-
set_style(div1, "transform-origin", /*transformOrigin*/ ctx[8], false);
|
|
1782
|
+
div = element("div");
|
|
1783
|
+
if (if_block) if_block.c();
|
|
1784
|
+
attr(div, "class", "floorplan-plugin__room-label-item svelte-i2nwuk");
|
|
1785
|
+
set_style(div, "left", /*left*/ ctx[4], false);
|
|
1786
|
+
set_style(div, "top", /*top*/ ctx[5], false);
|
|
1787
|
+
set_style(div, "font-size", /*fontSize*/ ctx[6], false);
|
|
1972
1788
|
},
|
|
1973
1789
|
m(target, anchor) {
|
|
1974
|
-
insert(target,
|
|
1975
|
-
|
|
1976
|
-
append(div1, t0);
|
|
1977
|
-
|
|
1978
|
-
for (let i = 0; i < each_blocks_1.length; i += 1) {
|
|
1979
|
-
each_blocks_1[i].m(div1, null);
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
append(div1, t1);
|
|
1983
|
-
|
|
1984
|
-
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
1985
|
-
each_blocks[i].m(div1, null);
|
|
1986
|
-
}
|
|
1790
|
+
insert(target, div, anchor);
|
|
1791
|
+
if (if_block) if_block.m(div, null);
|
|
1987
1792
|
},
|
|
1988
1793
|
p(ctx, [dirty]) {
|
|
1989
|
-
if (
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
if (dirty & /*isLeft, isTop, isRight, isBottom, textArray, isRow*/ 1086) {
|
|
1995
|
-
each_value = /*textArray*/ ctx[10];
|
|
1996
|
-
each_blocks = update_keyed_each(each_blocks, dirty, get_key_1, 1, ctx, each_value, each1_lookup, div1, destroy_block, create_each_block$6, null, get_each_context$6);
|
|
1997
|
-
}
|
|
1794
|
+
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
|
|
1795
|
+
if_block.p(ctx, dirty);
|
|
1796
|
+
} else {
|
|
1797
|
+
if (if_block) if_block.d(1);
|
|
1798
|
+
if_block = current_block_type && current_block_type(ctx);
|
|
1998
1799
|
|
|
1999
|
-
|
|
2000
|
-
|
|
1800
|
+
if (if_block) {
|
|
1801
|
+
if_block.c();
|
|
1802
|
+
if_block.m(div, null);
|
|
1803
|
+
}
|
|
2001
1804
|
}
|
|
2002
1805
|
},
|
|
2003
1806
|
i: noop,
|
|
2004
1807
|
o: noop,
|
|
2005
1808
|
d(detaching) {
|
|
2006
|
-
if (detaching) detach(
|
|
2007
|
-
|
|
2008
|
-
for (let i = 0; i < each_blocks_1.length; i += 1) {
|
|
2009
|
-
each_blocks_1[i].d();
|
|
2010
|
-
}
|
|
1809
|
+
if (detaching) detach(div);
|
|
2011
1810
|
|
|
2012
|
-
|
|
2013
|
-
|
|
1811
|
+
if (if_block) {
|
|
1812
|
+
if_block.d();
|
|
2014
1813
|
}
|
|
2015
1814
|
}
|
|
2016
1815
|
};
|
|
2017
1816
|
}
|
|
2018
1817
|
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
let {
|
|
2023
|
-
let { type } = $$props;
|
|
2024
|
-
let { data } = $$props;
|
|
2025
|
-
let { bounding } = $$props;
|
|
2026
|
-
const isTop = type === 'top';
|
|
2027
|
-
const isBottom = type === 'bottom';
|
|
2028
|
-
const isLeft = type === 'left';
|
|
2029
|
-
const isRight = type === 'right';
|
|
2030
|
-
const isRow = isTop || isBottom;
|
|
1818
|
+
function instance$j($$self, $$props, $$invalidate) {
|
|
1819
|
+
let userConfigElement;
|
|
1820
|
+
let { room } = $$props;
|
|
1821
|
+
let { getLabelElement } = $$props;
|
|
2031
1822
|
|
|
2032
|
-
//
|
|
2033
|
-
const
|
|
2034
|
-
if (index === 0) return true;
|
|
2035
|
-
return x !== arr[index - 1];
|
|
2036
|
-
});
|
|
1823
|
+
// TODO: 统一这里的判断条件,目前写了多处
|
|
1824
|
+
const bodyWidth = document.body.clientWidth;
|
|
2037
1825
|
|
|
2038
|
-
const
|
|
2039
|
-
const
|
|
2040
|
-
const
|
|
2041
|
-
const
|
|
2042
|
-
const
|
|
2043
|
-
const
|
|
2044
|
-
|
|
2045
|
-
// 在主要方向上的偏移量,上下的标尺是距离图片左侧的长度,左右的标尺是距离图片底部的距离
|
|
2046
|
-
const translateMain = (minPosition - minBounding) * pxmm;
|
|
2047
|
-
|
|
2048
|
-
// 在次要方向的偏移量,希望达到的效果是标尺轴距离户型图边界 27px,但是图片自身是带有 1000mm 的边界,所以在计算时需要减去这个边界
|
|
2049
|
-
const translateSecond = 27 - padding * pxmm;
|
|
2050
|
-
|
|
2051
|
-
const translate = (() => {
|
|
2052
|
-
if (isTop) return `translate(${translateMain}px, ${-translateSecond}px)`;
|
|
2053
|
-
if (isBottom) return `translate(${translateMain}px, ${translateSecond}px)`;
|
|
2054
|
-
if (isLeft) return `translate(${-translateSecond}px, ${-translateMain}px)`;
|
|
2055
|
-
if (isRight) return `translate(${translateSecond}px, ${-translateMain - lengthPx}px)`;
|
|
2056
|
-
})();
|
|
2057
|
-
|
|
2058
|
-
const rotate = isRow ? 'rotate(0)' : 'rotate(-90deg)';
|
|
2059
|
-
const transform = `${translate} ${rotate}`;
|
|
2060
|
-
const transformOrigin = `${isRight ? 'right' : 'left'} ${isTop ? 'top' : 'bottom'}`;
|
|
2061
|
-
const width = lengthPx + 'px';
|
|
2062
|
-
|
|
2063
|
-
// 把点位的户型图坐标转成距离起始位置的像素值
|
|
2064
|
-
const textArray = positionArray.map((position, index, array) => {
|
|
2065
|
-
if (index === 0) return null;
|
|
2066
|
-
const distance = position - array[index - 1];
|
|
2067
|
-
const positionPx = (array[index - 1] + distance / 2 - minPosition) / length * lengthPx;
|
|
2068
|
-
return { distance, positionPx };
|
|
2069
|
-
}).filter(notNil).filter(item => item.distance / length > 0.12);
|
|
1826
|
+
const bodyHeight = document.body.clientHeight;
|
|
1827
|
+
const roomSizeDes = room.size ? (room.size / 1000000).toFixed(1) + '㎡' : '';
|
|
1828
|
+
const roomLabel = room.roomLabel;
|
|
1829
|
+
const left = roomLabel.positionInImage.x * 100 + '%';
|
|
1830
|
+
const top = roomLabel.positionInImage.y * 100 + '%';
|
|
1831
|
+
const fontSize = (bodyWidth < 500 || bodyHeight < 500 ? 10 : 14) / 16 + 'rem';
|
|
2070
1832
|
|
|
2071
1833
|
$$self.$$set = $$props => {
|
|
2072
|
-
if ('
|
|
2073
|
-
if ('
|
|
2074
|
-
if ('data' in $$props) $$invalidate(12, data = $$props.data);
|
|
2075
|
-
if ('bounding' in $$props) $$invalidate(13, bounding = $$props.bounding);
|
|
1834
|
+
if ('room' in $$props) $$invalidate(0, room = $$props.room);
|
|
1835
|
+
if ('getLabelElement' in $$props) $$invalidate(1, getLabelElement = $$props.getLabelElement);
|
|
2076
1836
|
};
|
|
2077
1837
|
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
transformOrigin,
|
|
2088
|
-
width,
|
|
2089
|
-
textArray,
|
|
2090
|
-
pxmm,
|
|
2091
|
-
data,
|
|
2092
|
-
bounding
|
|
2093
|
-
];
|
|
1838
|
+
$$self.$$.update = () => {
|
|
1839
|
+
if ($$self.$$.dirty & /*getLabelElement, room*/ 3) {
|
|
1840
|
+
$$invalidate(2, userConfigElement = getLabelElement === null || getLabelElement === void 0
|
|
1841
|
+
? void 0
|
|
1842
|
+
: getLabelElement(room));
|
|
1843
|
+
}
|
|
1844
|
+
};
|
|
1845
|
+
|
|
1846
|
+
return [room, getLabelElement, userConfigElement, roomSizeDes, left, top, fontSize];
|
|
2094
1847
|
}
|
|
2095
1848
|
|
|
2096
|
-
class
|
|
1849
|
+
class RoomLabel extends SvelteComponent {
|
|
2097
1850
|
constructor(options) {
|
|
2098
1851
|
super();
|
|
2099
|
-
|
|
2100
|
-
init(
|
|
2101
|
-
this,
|
|
2102
|
-
options,
|
|
2103
|
-
instance$k,
|
|
2104
|
-
create_fragment$k,
|
|
2105
|
-
safe_not_equal,
|
|
2106
|
-
{
|
|
2107
|
-
pxmm: 11,
|
|
2108
|
-
type: 0,
|
|
2109
|
-
data: 12,
|
|
2110
|
-
bounding: 13
|
|
2111
|
-
},
|
|
2112
|
-
add_css$f
|
|
2113
|
-
);
|
|
1852
|
+
init(this, options, instance$j, create_fragment$j, safe_not_equal, { room: 0, getLabelElement: 1 }, add_css$f);
|
|
2114
1853
|
}
|
|
2115
1854
|
}
|
|
2116
1855
|
|
|
2117
|
-
/* src/floorplan/
|
|
1856
|
+
/* src/floorplan/Components/RoomLabels/RoomLabels.svelte generated by Svelte v3.47.0 */
|
|
2118
1857
|
|
|
2119
|
-
function
|
|
2120
|
-
|
|
2121
|
-
child_ctx[7] = list[i][0];
|
|
2122
|
-
child_ctx[8] = list[i][1];
|
|
2123
|
-
return child_ctx;
|
|
1858
|
+
function add_css$e(target) {
|
|
1859
|
+
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}");
|
|
2124
1860
|
}
|
|
2125
1861
|
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
let current;
|
|
2131
|
-
|
|
2132
|
-
const ruleitem_spread_levels = [
|
|
2133
|
-
{
|
|
2134
|
-
type: /*type*/ ctx[7],
|
|
2135
|
-
data: /*data*/ ctx[8],
|
|
2136
|
-
pxmm: /*pxmm*/ ctx[0],
|
|
2137
|
-
bounding: /*bounding*/ ctx[2]
|
|
2138
|
-
}
|
|
2139
|
-
];
|
|
2140
|
-
|
|
2141
|
-
let ruleitem_props = {};
|
|
2142
|
-
|
|
2143
|
-
for (let i = 0; i < ruleitem_spread_levels.length; i += 1) {
|
|
2144
|
-
ruleitem_props = assign(ruleitem_props, ruleitem_spread_levels[i]);
|
|
2145
|
-
}
|
|
2146
|
-
|
|
2147
|
-
ruleitem = new RuleItem({ props: ruleitem_props });
|
|
2148
|
-
|
|
2149
|
-
return {
|
|
2150
|
-
key: key_1,
|
|
2151
|
-
first: null,
|
|
2152
|
-
c() {
|
|
2153
|
-
first = empty();
|
|
2154
|
-
create_component(ruleitem.$$.fragment);
|
|
2155
|
-
this.first = first;
|
|
2156
|
-
},
|
|
2157
|
-
m(target, anchor) {
|
|
2158
|
-
insert(target, first, anchor);
|
|
2159
|
-
mount_component(ruleitem, target, anchor);
|
|
2160
|
-
current = true;
|
|
2161
|
-
},
|
|
2162
|
-
p(new_ctx, dirty) {
|
|
2163
|
-
ctx = new_ctx;
|
|
2164
|
-
|
|
2165
|
-
const ruleitem_changes = (dirty & /*ruleLabelArray, pxmm, bounding*/ 7)
|
|
2166
|
-
? get_spread_update(ruleitem_spread_levels, [
|
|
2167
|
-
{
|
|
2168
|
-
type: /*type*/ ctx[7],
|
|
2169
|
-
data: /*data*/ ctx[8],
|
|
2170
|
-
pxmm: /*pxmm*/ ctx[0],
|
|
2171
|
-
bounding: /*bounding*/ ctx[2]
|
|
2172
|
-
}
|
|
2173
|
-
])
|
|
2174
|
-
: {};
|
|
2175
|
-
|
|
2176
|
-
ruleitem.$set(ruleitem_changes);
|
|
2177
|
-
},
|
|
2178
|
-
i(local) {
|
|
2179
|
-
if (current) return;
|
|
2180
|
-
transition_in(ruleitem.$$.fragment, local);
|
|
2181
|
-
current = true;
|
|
2182
|
-
},
|
|
2183
|
-
o(local) {
|
|
2184
|
-
transition_out(ruleitem.$$.fragment, local);
|
|
2185
|
-
current = false;
|
|
2186
|
-
},
|
|
2187
|
-
d(detaching) {
|
|
2188
|
-
if (detaching) detach(first);
|
|
2189
|
-
destroy_component(ruleitem, detaching);
|
|
2190
|
-
}
|
|
2191
|
-
};
|
|
1862
|
+
function get_each_context$8(ctx, list, i) {
|
|
1863
|
+
const child_ctx = ctx.slice();
|
|
1864
|
+
child_ctx[4] = list[i];
|
|
1865
|
+
return child_ctx;
|
|
2192
1866
|
}
|
|
2193
1867
|
|
|
2194
|
-
|
|
1868
|
+
// (8:0) {#if rooms}
|
|
1869
|
+
function create_if_block$5(ctx) {
|
|
2195
1870
|
let div;
|
|
2196
1871
|
let each_blocks = [];
|
|
2197
1872
|
let each_1_lookup = new Map();
|
|
2198
1873
|
let current;
|
|
2199
|
-
let each_value = /*
|
|
2200
|
-
const get_key = ctx => /*
|
|
1874
|
+
let each_value = /*rooms*/ ctx[1];
|
|
1875
|
+
const get_key = ctx => /*room*/ ctx[4].id;
|
|
2201
1876
|
|
|
2202
1877
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
2203
|
-
let child_ctx = get_each_context$
|
|
1878
|
+
let child_ctx = get_each_context$8(ctx, each_value, i);
|
|
2204
1879
|
let key = get_key(child_ctx);
|
|
2205
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block$
|
|
1880
|
+
each_1_lookup.set(key, each_blocks[i] = create_each_block$8(key, child_ctx));
|
|
2206
1881
|
}
|
|
2207
1882
|
|
|
2208
1883
|
return {
|
|
@@ -2213,7 +1888,7 @@ function create_fragment$j(ctx) {
|
|
|
2213
1888
|
each_blocks[i].c();
|
|
2214
1889
|
}
|
|
2215
1890
|
|
|
2216
|
-
attr(div, "class", "floorplan-
|
|
1891
|
+
attr(div, "class", "floorplan-plugin__room-labels svelte-13xux0b");
|
|
2217
1892
|
},
|
|
2218
1893
|
m(target, anchor) {
|
|
2219
1894
|
insert(target, div, anchor);
|
|
@@ -2224,11 +1899,11 @@ function create_fragment$j(ctx) {
|
|
|
2224
1899
|
|
|
2225
1900
|
current = true;
|
|
2226
1901
|
},
|
|
2227
|
-
p(ctx,
|
|
2228
|
-
if (dirty & /*
|
|
2229
|
-
each_value = /*
|
|
1902
|
+
p(ctx, dirty) {
|
|
1903
|
+
if (dirty & /*rooms, getLabelElement*/ 3) {
|
|
1904
|
+
each_value = /*rooms*/ ctx[1];
|
|
2230
1905
|
group_outros();
|
|
2231
|
-
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$
|
|
1906
|
+
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$8, null, get_each_context$8);
|
|
2232
1907
|
check_outros();
|
|
2233
1908
|
}
|
|
2234
1909
|
},
|
|
@@ -2258,373 +1933,670 @@ function create_fragment$j(ctx) {
|
|
|
2258
1933
|
};
|
|
2259
1934
|
}
|
|
2260
1935
|
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
let
|
|
2264
|
-
let
|
|
2265
|
-
let
|
|
2266
|
-
let { pxmm } = $$props;
|
|
2267
|
-
let { floorIndex } = $$props;
|
|
2268
|
-
let { floorplanData } = $$props;
|
|
2269
|
-
|
|
2270
|
-
$$self.$$set = $$props => {
|
|
2271
|
-
if ('pxmm' in $$props) $$invalidate(0, pxmm = $$props.pxmm);
|
|
2272
|
-
if ('floorIndex' in $$props) $$invalidate(3, floorIndex = $$props.floorIndex);
|
|
2273
|
-
if ('floorplanData' in $$props) $$invalidate(4, floorplanData = $$props.floorplanData);
|
|
2274
|
-
};
|
|
1936
|
+
// (10:4) {#each rooms as room (room.id)}
|
|
1937
|
+
function create_each_block$8(key_1, ctx) {
|
|
1938
|
+
let first;
|
|
1939
|
+
let roomlabel;
|
|
1940
|
+
let current;
|
|
2275
1941
|
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
1942
|
+
const roomlabel_spread_levels = [
|
|
1943
|
+
{
|
|
1944
|
+
room: /*room*/ ctx[4],
|
|
1945
|
+
getLabelElement: /*getLabelElement*/ ctx[0]
|
|
2279
1946
|
}
|
|
1947
|
+
];
|
|
2280
1948
|
|
|
2281
|
-
|
|
2282
|
-
$$invalidate(5, ruleLabelData = floorplanData.floorDatas[floorIndex].rules);
|
|
2283
|
-
}
|
|
2284
|
-
|
|
2285
|
-
if ($$self.$$.dirty & /*ruleLabelData*/ 32) {
|
|
2286
|
-
$$invalidate(6, ruleLabelDataKeys = Object.keys(ruleLabelData));
|
|
2287
|
-
}
|
|
1949
|
+
let roomlabel_props = {};
|
|
2288
1950
|
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
};
|
|
1951
|
+
for (let i = 0; i < roomlabel_spread_levels.length; i += 1) {
|
|
1952
|
+
roomlabel_props = assign(roomlabel_props, roomlabel_spread_levels[i]);
|
|
1953
|
+
}
|
|
2293
1954
|
|
|
2294
|
-
|
|
2295
|
-
pxmm,
|
|
2296
|
-
ruleLabelArray,
|
|
2297
|
-
bounding,
|
|
2298
|
-
floorIndex,
|
|
2299
|
-
floorplanData,
|
|
2300
|
-
ruleLabelData,
|
|
2301
|
-
ruleLabelDataKeys
|
|
2302
|
-
];
|
|
2303
|
-
}
|
|
1955
|
+
roomlabel = new RoomLabel({ props: roomlabel_props });
|
|
2304
1956
|
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
1957
|
+
return {
|
|
1958
|
+
key: key_1,
|
|
1959
|
+
first: null,
|
|
1960
|
+
c() {
|
|
1961
|
+
first = empty();
|
|
1962
|
+
create_component(roomlabel.$$.fragment);
|
|
1963
|
+
this.first = first;
|
|
1964
|
+
},
|
|
1965
|
+
m(target, anchor) {
|
|
1966
|
+
insert(target, first, anchor);
|
|
1967
|
+
mount_component(roomlabel, target, anchor);
|
|
1968
|
+
current = true;
|
|
1969
|
+
},
|
|
1970
|
+
p(new_ctx, dirty) {
|
|
1971
|
+
ctx = new_ctx;
|
|
2311
1972
|
|
|
2312
|
-
|
|
1973
|
+
const roomlabel_changes = (dirty & /*rooms, getLabelElement*/ 3)
|
|
1974
|
+
? get_spread_update(roomlabel_spread_levels, [
|
|
1975
|
+
{
|
|
1976
|
+
room: /*room*/ ctx[4],
|
|
1977
|
+
getLabelElement: /*getLabelElement*/ ctx[0]
|
|
1978
|
+
}
|
|
1979
|
+
])
|
|
1980
|
+
: {};
|
|
2313
1981
|
|
|
2314
|
-
|
|
2315
|
-
|
|
1982
|
+
roomlabel.$set(roomlabel_changes);
|
|
1983
|
+
},
|
|
1984
|
+
i(local) {
|
|
1985
|
+
if (current) return;
|
|
1986
|
+
transition_in(roomlabel.$$.fragment, local);
|
|
1987
|
+
current = true;
|
|
1988
|
+
},
|
|
1989
|
+
o(local) {
|
|
1990
|
+
transition_out(roomlabel.$$.fragment, local);
|
|
1991
|
+
current = false;
|
|
1992
|
+
},
|
|
1993
|
+
d(detaching) {
|
|
1994
|
+
if (detaching) detach(first);
|
|
1995
|
+
destroy_component(roomlabel, detaching);
|
|
1996
|
+
}
|
|
1997
|
+
};
|
|
2316
1998
|
}
|
|
2317
1999
|
|
|
2318
2000
|
function create_fragment$i(ctx) {
|
|
2319
|
-
let
|
|
2320
|
-
let
|
|
2001
|
+
let if_block_anchor;
|
|
2002
|
+
let current;
|
|
2003
|
+
let if_block = /*rooms*/ ctx[1] && create_if_block$5(ctx);
|
|
2321
2004
|
|
|
2322
2005
|
return {
|
|
2323
2006
|
c() {
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
attr(img, "alt", "floorplan iamge");
|
|
2327
|
-
attr(img, "class", "svelte-1cuuebb");
|
|
2007
|
+
if (if_block) if_block.c();
|
|
2008
|
+
if_block_anchor = empty();
|
|
2328
2009
|
},
|
|
2329
2010
|
m(target, anchor) {
|
|
2330
|
-
|
|
2011
|
+
if (if_block) if_block.m(target, anchor);
|
|
2012
|
+
insert(target, if_block_anchor, anchor);
|
|
2013
|
+
current = true;
|
|
2331
2014
|
},
|
|
2332
2015
|
p(ctx, [dirty]) {
|
|
2333
|
-
if (
|
|
2334
|
-
|
|
2016
|
+
if (/*rooms*/ ctx[1]) {
|
|
2017
|
+
if (if_block) {
|
|
2018
|
+
if_block.p(ctx, dirty);
|
|
2019
|
+
|
|
2020
|
+
if (dirty & /*rooms*/ 2) {
|
|
2021
|
+
transition_in(if_block, 1);
|
|
2022
|
+
}
|
|
2023
|
+
} else {
|
|
2024
|
+
if_block = create_if_block$5(ctx);
|
|
2025
|
+
if_block.c();
|
|
2026
|
+
transition_in(if_block, 1);
|
|
2027
|
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
2028
|
+
}
|
|
2029
|
+
} else if (if_block) {
|
|
2030
|
+
group_outros();
|
|
2031
|
+
|
|
2032
|
+
transition_out(if_block, 1, 1, () => {
|
|
2033
|
+
if_block = null;
|
|
2034
|
+
});
|
|
2035
|
+
|
|
2036
|
+
check_outros();
|
|
2335
2037
|
}
|
|
2336
2038
|
},
|
|
2337
|
-
i
|
|
2338
|
-
|
|
2039
|
+
i(local) {
|
|
2040
|
+
if (current) return;
|
|
2041
|
+
transition_in(if_block);
|
|
2042
|
+
current = true;
|
|
2043
|
+
},
|
|
2044
|
+
o(local) {
|
|
2045
|
+
transition_out(if_block);
|
|
2046
|
+
current = false;
|
|
2047
|
+
},
|
|
2339
2048
|
d(detaching) {
|
|
2340
|
-
if (
|
|
2049
|
+
if (if_block) if_block.d(detaching);
|
|
2050
|
+
if (detaching) detach(if_block_anchor);
|
|
2341
2051
|
}
|
|
2342
2052
|
};
|
|
2343
2053
|
}
|
|
2344
2054
|
|
|
2345
2055
|
function instance$i($$self, $$props, $$invalidate) {
|
|
2346
|
-
let
|
|
2056
|
+
let rooms;
|
|
2057
|
+
let { floorIndex } = $$props;
|
|
2058
|
+
let { floorplanData } = $$props;
|
|
2059
|
+
let { getLabelElement } = $$props;
|
|
2347
2060
|
|
|
2348
2061
|
$$self.$$set = $$props => {
|
|
2349
|
-
if ('
|
|
2062
|
+
if ('floorIndex' in $$props) $$invalidate(2, floorIndex = $$props.floorIndex);
|
|
2063
|
+
if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
|
|
2064
|
+
if ('getLabelElement' in $$props) $$invalidate(0, getLabelElement = $$props.getLabelElement);
|
|
2350
2065
|
};
|
|
2351
2066
|
|
|
2352
|
-
|
|
2067
|
+
$$self.$$.update = () => {
|
|
2068
|
+
if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 12) {
|
|
2069
|
+
$$invalidate(1, rooms = floorplanData.floorDatas[floorIndex].rooms);
|
|
2070
|
+
}
|
|
2071
|
+
};
|
|
2072
|
+
|
|
2073
|
+
return [getLabelElement, rooms, floorIndex, floorplanData];
|
|
2353
2074
|
}
|
|
2354
2075
|
|
|
2355
|
-
class
|
|
2076
|
+
class RoomLabels extends SvelteComponent {
|
|
2356
2077
|
constructor(options) {
|
|
2357
2078
|
super();
|
|
2358
|
-
|
|
2079
|
+
|
|
2080
|
+
init(
|
|
2081
|
+
this,
|
|
2082
|
+
options,
|
|
2083
|
+
instance$i,
|
|
2084
|
+
create_fragment$i,
|
|
2085
|
+
safe_not_equal,
|
|
2086
|
+
{
|
|
2087
|
+
floorIndex: 2,
|
|
2088
|
+
floorplanData: 3,
|
|
2089
|
+
getLabelElement: 0
|
|
2090
|
+
},
|
|
2091
|
+
add_css$e
|
|
2092
|
+
);
|
|
2359
2093
|
}
|
|
2360
2094
|
}
|
|
2361
2095
|
|
|
2362
|
-
/* src/floorplan/Components/
|
|
2096
|
+
/* src/floorplan/Components/RuleLabels/RuleItem.svelte generated by Svelte v3.47.0 */
|
|
2363
2097
|
|
|
2364
2098
|
function add_css$d(target) {
|
|
2365
|
-
append_styles(target, "svelte-
|
|
2099
|
+
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}");
|
|
2366
2100
|
}
|
|
2367
2101
|
|
|
2368
|
-
function
|
|
2102
|
+
function get_each_context$7(ctx, list, i) {
|
|
2103
|
+
const child_ctx = ctx.slice();
|
|
2104
|
+
child_ctx[10] = list[i];
|
|
2105
|
+
child_ctx[12] = i;
|
|
2106
|
+
return child_ctx;
|
|
2107
|
+
}
|
|
2108
|
+
|
|
2109
|
+
function get_each_context_1(ctx, list, i) {
|
|
2110
|
+
const child_ctx = ctx.slice();
|
|
2111
|
+
child_ctx[13] = list[i];
|
|
2112
|
+
return child_ctx;
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
// (53:4) {#each rulerLabels as rulerLabel}
|
|
2116
|
+
function create_each_block_1(ctx) {
|
|
2369
2117
|
let div;
|
|
2370
|
-
let html_tag;
|
|
2371
|
-
let t;
|
|
2372
|
-
let html_tag_1;
|
|
2373
2118
|
|
|
2374
2119
|
return {
|
|
2375
2120
|
c() {
|
|
2376
2121
|
div = element("div");
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
html_tag.a = t;
|
|
2381
|
-
html_tag_1.a = null;
|
|
2382
|
-
attr(div, "class", "floorplan-plugin__base-image svelte-1qqy56u");
|
|
2122
|
+
attr(div, "class", "floorplan-plugin__rule-scale svelte-xt7p1v");
|
|
2123
|
+
set_style(div, "left", /*rulerLabel*/ ctx[13].left * 100 + '%', false);
|
|
2124
|
+
set_style(div, "bottom", /*rulerLabel*/ ctx[13].bottom * 100 + '%', false);
|
|
2383
2125
|
},
|
|
2384
2126
|
m(target, anchor) {
|
|
2385
2127
|
insert(target, div, anchor);
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2128
|
+
},
|
|
2129
|
+
p: noop,
|
|
2130
|
+
d(detaching) {
|
|
2131
|
+
if (detaching) detach(div);
|
|
2132
|
+
}
|
|
2133
|
+
};
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
// (62:4) {#each rulerTexts as textItem, textItemIndex (textItemIndex)}
|
|
2137
|
+
function create_each_block$7(key_1, ctx) {
|
|
2138
|
+
let div1;
|
|
2139
|
+
let div0;
|
|
2140
|
+
let t0_value = /*textItem*/ ctx[10].distance + "";
|
|
2141
|
+
let t0;
|
|
2142
|
+
let t1;
|
|
2143
|
+
|
|
2144
|
+
return {
|
|
2145
|
+
key: key_1,
|
|
2146
|
+
first: null,
|
|
2147
|
+
c() {
|
|
2148
|
+
div1 = element("div");
|
|
2149
|
+
div0 = element("div");
|
|
2150
|
+
t0 = text(t0_value);
|
|
2151
|
+
t1 = space();
|
|
2152
|
+
attr(div0, "class", "floorplan-plugin__rule-text svelte-xt7p1v");
|
|
2153
|
+
toggle_class(div0, "is-row", /*isRow*/ ctx[1]);
|
|
2154
|
+
attr(div1, "class", "floorplan-plugin__rule-text-item svelte-xt7p1v");
|
|
2155
|
+
set_style(div1, "left", /*textItem*/ ctx[10].left * 100 + '%', false);
|
|
2156
|
+
set_style(div1, "bottom", /*textItem*/ ctx[10].bottom * 100 + '%', false);
|
|
2157
|
+
this.first = div1;
|
|
2158
|
+
},
|
|
2159
|
+
m(target, anchor) {
|
|
2160
|
+
insert(target, div1, anchor);
|
|
2161
|
+
append(div1, div0);
|
|
2162
|
+
append(div0, t0);
|
|
2163
|
+
append(div1, t1);
|
|
2164
|
+
},
|
|
2165
|
+
p(new_ctx, dirty) {
|
|
2166
|
+
ctx = new_ctx;
|
|
2167
|
+
},
|
|
2168
|
+
d(detaching) {
|
|
2169
|
+
if (detaching) detach(div1);
|
|
2170
|
+
}
|
|
2171
|
+
};
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
function create_fragment$h(ctx) {
|
|
2175
|
+
let div3;
|
|
2176
|
+
let div0;
|
|
2177
|
+
let t0;
|
|
2178
|
+
let div1;
|
|
2179
|
+
let t1;
|
|
2180
|
+
let div2;
|
|
2181
|
+
let each_blocks = [];
|
|
2182
|
+
let each1_lookup = new Map();
|
|
2183
|
+
let div3_class_value;
|
|
2184
|
+
let each_value_1 = /*rulerLabels*/ ctx[2];
|
|
2185
|
+
let each_blocks_1 = [];
|
|
2186
|
+
|
|
2187
|
+
for (let i = 0; i < each_value_1.length; i += 1) {
|
|
2188
|
+
each_blocks_1[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i));
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
let each_value = /*rulerTexts*/ ctx[3];
|
|
2192
|
+
const get_key = ctx => /*textItemIndex*/ ctx[12];
|
|
2193
|
+
|
|
2194
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
2195
|
+
let child_ctx = get_each_context$7(ctx, each_value, i);
|
|
2196
|
+
let key = get_key(child_ctx);
|
|
2197
|
+
each1_lookup.set(key, each_blocks[i] = create_each_block$7(key, child_ctx));
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
return {
|
|
2201
|
+
c() {
|
|
2202
|
+
div3 = element("div");
|
|
2203
|
+
div0 = element("div");
|
|
2204
|
+
t0 = space();
|
|
2205
|
+
div1 = element("div");
|
|
2206
|
+
|
|
2207
|
+
for (let i = 0; i < each_blocks_1.length; i += 1) {
|
|
2208
|
+
each_blocks_1[i].c();
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
t1 = space();
|
|
2212
|
+
div2 = element("div");
|
|
2213
|
+
|
|
2214
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2215
|
+
each_blocks[i].c();
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
attr(div0, "class", "floorplan-plugin__rule-line svelte-xt7p1v");
|
|
2219
|
+
attr(div1, "class", "floorplan-plugin__rule-scale-wrapper svelte-xt7p1v");
|
|
2220
|
+
toggle_class(div1, "is-row", /*isRow*/ ctx[1]);
|
|
2221
|
+
attr(div2, "class", "floorplan-plugin__rule-text-wrapper svelte-xt7p1v");
|
|
2222
|
+
attr(div3, "class", div3_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels--" + /*type*/ ctx[0] + " svelte-xt7p1v");
|
|
2223
|
+
toggle_class(div3, "is-row", /*isRow*/ ctx[1]);
|
|
2224
|
+
set_style(div3, "width", /*isRow*/ ctx[1] ? '100%' : 1 / 16 + 'rem', false);
|
|
2225
|
+
set_style(div3, "height", !/*isRow*/ ctx[1] ? '100%' : 1 / 16 + 'rem', false);
|
|
2226
|
+
},
|
|
2227
|
+
m(target, anchor) {
|
|
2228
|
+
insert(target, div3, anchor);
|
|
2229
|
+
append(div3, div0);
|
|
2230
|
+
append(div3, t0);
|
|
2231
|
+
append(div3, div1);
|
|
2232
|
+
|
|
2233
|
+
for (let i = 0; i < each_blocks_1.length; i += 1) {
|
|
2234
|
+
each_blocks_1[i].m(div1, null);
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
append(div3, t1);
|
|
2238
|
+
append(div3, div2);
|
|
2239
|
+
|
|
2240
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2241
|
+
each_blocks[i].m(div2, null);
|
|
2242
|
+
}
|
|
2389
2243
|
},
|
|
2390
2244
|
p(ctx, [dirty]) {
|
|
2391
|
-
if (dirty & /*
|
|
2245
|
+
if (dirty & /*rulerLabels*/ 4) {
|
|
2246
|
+
each_value_1 = /*rulerLabels*/ ctx[2];
|
|
2247
|
+
let i;
|
|
2248
|
+
|
|
2249
|
+
for (i = 0; i < each_value_1.length; i += 1) {
|
|
2250
|
+
const child_ctx = get_each_context_1(ctx, each_value_1, i);
|
|
2251
|
+
|
|
2252
|
+
if (each_blocks_1[i]) {
|
|
2253
|
+
each_blocks_1[i].p(child_ctx, dirty);
|
|
2254
|
+
} else {
|
|
2255
|
+
each_blocks_1[i] = create_each_block_1(child_ctx);
|
|
2256
|
+
each_blocks_1[i].c();
|
|
2257
|
+
each_blocks_1[i].m(div1, null);
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
for (; i < each_blocks_1.length; i += 1) {
|
|
2262
|
+
each_blocks_1[i].d(1);
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2265
|
+
each_blocks_1.length = each_value_1.length;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
if (dirty & /*rulerTexts, isRow*/ 10) {
|
|
2269
|
+
each_value = /*rulerTexts*/ ctx[3];
|
|
2270
|
+
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each1_lookup, div2, destroy_block, create_each_block$7, null, get_each_context$7);
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
if (dirty & /*type*/ 1 && div3_class_value !== (div3_class_value = "floorplan-plugin__rule-labels floorplan-plugin__rule-labels--" + /*type*/ ctx[0] + " svelte-xt7p1v")) {
|
|
2274
|
+
attr(div3, "class", div3_class_value);
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
if (dirty & /*type, isRow*/ 3) {
|
|
2278
|
+
toggle_class(div3, "is-row", /*isRow*/ ctx[1]);
|
|
2279
|
+
}
|
|
2392
2280
|
},
|
|
2393
2281
|
i: noop,
|
|
2394
2282
|
o: noop,
|
|
2395
2283
|
d(detaching) {
|
|
2396
|
-
if (detaching) detach(
|
|
2284
|
+
if (detaching) detach(div3);
|
|
2285
|
+
destroy_each(each_blocks_1, detaching);
|
|
2286
|
+
|
|
2287
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2288
|
+
each_blocks[i].d();
|
|
2289
|
+
}
|
|
2397
2290
|
}
|
|
2398
2291
|
};
|
|
2399
2292
|
}
|
|
2400
2293
|
|
|
2294
|
+
const padding$1 = 1000;
|
|
2295
|
+
const exteriorWallOffset$1 = 180;
|
|
2296
|
+
|
|
2401
2297
|
function instance$h($$self, $$props, $$invalidate) {
|
|
2402
|
-
let {
|
|
2298
|
+
let { type } = $$props;
|
|
2299
|
+
let { data } = $$props;
|
|
2300
|
+
let { bounding } = $$props;
|
|
2301
|
+
const isRow = type === 'top' || type === 'bottom';
|
|
2302
|
+
const contentWidth = bounding.max.x - bounding.min.x - (padding$1 - exteriorWallOffset$1) * 2;
|
|
2303
|
+
const contentHeight = bounding.max.y - bounding.min.y - (padding$1 - exteriorWallOffset$1) * 2;
|
|
2403
2304
|
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2305
|
+
// 计算每一段墙的长度,以及墙两侧点距离标尺初始点的像素值
|
|
2306
|
+
const rulerPoints = data.map(([start, end]) => isRow ? [start.x, end.x] : [start.y, end.y]).flat().sort().filter((x, index, arr) => {
|
|
2307
|
+
// 筛除重复数据
|
|
2308
|
+
if (index === 0) return true;
|
|
2309
|
+
|
|
2310
|
+
return x !== arr[index - 1];
|
|
2311
|
+
});
|
|
2312
|
+
|
|
2313
|
+
const rulerLabels = rulerPoints.map(num => {
|
|
2314
|
+
const left = isRow
|
|
2315
|
+
? (num - bounding.min.x - padding$1 + exteriorWallOffset$1) / contentWidth
|
|
2316
|
+
: 0;
|
|
2317
|
+
|
|
2318
|
+
const bottom = !isRow
|
|
2319
|
+
? (num - bounding.min.y - padding$1 + exteriorWallOffset$1) / contentHeight
|
|
2320
|
+
: 0;
|
|
2321
|
+
|
|
2322
|
+
return { left, bottom };
|
|
2323
|
+
});
|
|
2324
|
+
|
|
2325
|
+
rulerLabels.unshift({ left: 0, bottom: 0 });
|
|
2326
|
+
rulerLabels.push(isRow ? { left: 1, bottom: 0 } : { left: 0, bottom: 1 });
|
|
2327
|
+
const length = rulerPoints[rulerPoints.length - 1] - rulerPoints[0];
|
|
2328
|
+
|
|
2329
|
+
const rulerTexts = rulerPoints.map((num, index, arr) => {
|
|
2330
|
+
const distance = index === 0 ? 0 : num - arr[index - 1];
|
|
2331
|
+
const positionNum = index === 0 ? 0 : (num + arr[index - 1]) / 2;
|
|
2332
|
+
|
|
2333
|
+
const left = isRow
|
|
2334
|
+
? (positionNum - bounding.min.x - padding$1 + exteriorWallOffset$1) / contentWidth
|
|
2335
|
+
: 0;
|
|
2336
|
+
|
|
2337
|
+
const bottom = !isRow
|
|
2338
|
+
? (positionNum - bounding.min.y - padding$1 + exteriorWallOffset$1) / contentHeight
|
|
2339
|
+
: 0;
|
|
2340
|
+
|
|
2341
|
+
return { left, bottom, distance };
|
|
2342
|
+
}).filter(({ distance }) => distance / length > 0.1);
|
|
2415
2343
|
|
|
2416
2344
|
$$self.$$set = $$props => {
|
|
2417
|
-
if ('
|
|
2345
|
+
if ('type' in $$props) $$invalidate(0, type = $$props.type);
|
|
2346
|
+
if ('data' in $$props) $$invalidate(4, data = $$props.data);
|
|
2347
|
+
if ('bounding' in $$props) $$invalidate(5, bounding = $$props.bounding);
|
|
2418
2348
|
};
|
|
2419
2349
|
|
|
2420
|
-
return [
|
|
2350
|
+
return [type, isRow, rulerLabels, rulerTexts, data, bounding];
|
|
2421
2351
|
}
|
|
2422
2352
|
|
|
2423
|
-
class
|
|
2353
|
+
class RuleItem extends SvelteComponent {
|
|
2424
2354
|
constructor(options) {
|
|
2425
2355
|
super();
|
|
2426
|
-
init(this, options, instance$h, create_fragment$h, safe_not_equal, {
|
|
2356
|
+
init(this, options, instance$h, create_fragment$h, safe_not_equal, { type: 0, data: 4, bounding: 5 }, add_css$d);
|
|
2427
2357
|
}
|
|
2428
2358
|
}
|
|
2429
2359
|
|
|
2430
|
-
/* src/floorplan/Components/
|
|
2360
|
+
/* src/floorplan/Components/RuleLabels/RuleLabels.svelte generated by Svelte v3.47.0 */
|
|
2431
2361
|
|
|
2432
2362
|
function add_css$c(target) {
|
|
2433
|
-
append_styles(target, "svelte-
|
|
2363
|
+
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}");
|
|
2434
2364
|
}
|
|
2435
2365
|
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2366
|
+
function get_each_context$6(ctx, list, i) {
|
|
2367
|
+
const child_ctx = ctx.slice();
|
|
2368
|
+
child_ctx[12] = list[i][0];
|
|
2369
|
+
child_ctx[13] = list[i][1];
|
|
2370
|
+
return child_ctx;
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
// (19:2) {#each ruleLabelArray as [type, data] (type)}
|
|
2374
|
+
function create_each_block$6(key_1, ctx) {
|
|
2375
|
+
let first;
|
|
2376
|
+
let ruleitem;
|
|
2439
2377
|
let current;
|
|
2440
|
-
normalimage = new Normalmage({ props: { url: /*imageData*/ ctx[1].url } });
|
|
2441
2378
|
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
mount_component(normalimage, target, anchor);
|
|
2448
|
-
current = true;
|
|
2449
|
-
},
|
|
2450
|
-
p(ctx, dirty) {
|
|
2451
|
-
const normalimage_changes = {};
|
|
2452
|
-
if (dirty & /*imageData*/ 2) normalimage_changes.url = /*imageData*/ ctx[1].url;
|
|
2453
|
-
normalimage.$set(normalimage_changes);
|
|
2454
|
-
},
|
|
2455
|
-
i(local) {
|
|
2456
|
-
if (current) return;
|
|
2457
|
-
transition_in(normalimage.$$.fragment, local);
|
|
2458
|
-
current = true;
|
|
2459
|
-
},
|
|
2460
|
-
o(local) {
|
|
2461
|
-
transition_out(normalimage.$$.fragment, local);
|
|
2462
|
-
current = false;
|
|
2463
|
-
},
|
|
2464
|
-
d(detaching) {
|
|
2465
|
-
destroy_component(normalimage, detaching);
|
|
2379
|
+
const ruleitem_spread_levels = [
|
|
2380
|
+
{
|
|
2381
|
+
type: /*type*/ ctx[12],
|
|
2382
|
+
data: /*data*/ ctx[13],
|
|
2383
|
+
bounding: /*bounding*/ ctx[0]
|
|
2466
2384
|
}
|
|
2467
|
-
|
|
2468
|
-
}
|
|
2385
|
+
];
|
|
2469
2386
|
|
|
2470
|
-
|
|
2471
|
-
function create_if_block$5(ctx) {
|
|
2472
|
-
let svgimage;
|
|
2473
|
-
let current;
|
|
2387
|
+
let ruleitem_props = {};
|
|
2474
2388
|
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2389
|
+
for (let i = 0; i < ruleitem_spread_levels.length; i += 1) {
|
|
2390
|
+
ruleitem_props = assign(ruleitem_props, ruleitem_spread_levels[i]);
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
ruleitem = new RuleItem({ props: ruleitem_props });
|
|
2478
2394
|
|
|
2479
2395
|
return {
|
|
2396
|
+
key: key_1,
|
|
2397
|
+
first: null,
|
|
2480
2398
|
c() {
|
|
2481
|
-
|
|
2399
|
+
first = empty();
|
|
2400
|
+
create_component(ruleitem.$$.fragment);
|
|
2401
|
+
this.first = first;
|
|
2482
2402
|
},
|
|
2483
2403
|
m(target, anchor) {
|
|
2484
|
-
|
|
2404
|
+
insert(target, first, anchor);
|
|
2405
|
+
mount_component(ruleitem, target, anchor);
|
|
2485
2406
|
current = true;
|
|
2486
2407
|
},
|
|
2487
|
-
p(
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2408
|
+
p(new_ctx, dirty) {
|
|
2409
|
+
ctx = new_ctx;
|
|
2410
|
+
|
|
2411
|
+
const ruleitem_changes = (dirty & /*ruleLabelArray, bounding*/ 9)
|
|
2412
|
+
? get_spread_update(ruleitem_spread_levels, [
|
|
2413
|
+
{
|
|
2414
|
+
type: /*type*/ ctx[12],
|
|
2415
|
+
data: /*data*/ ctx[13],
|
|
2416
|
+
bounding: /*bounding*/ ctx[0]
|
|
2417
|
+
}
|
|
2418
|
+
])
|
|
2419
|
+
: {};
|
|
2420
|
+
|
|
2421
|
+
ruleitem.$set(ruleitem_changes);
|
|
2491
2422
|
},
|
|
2492
2423
|
i(local) {
|
|
2493
2424
|
if (current) return;
|
|
2494
|
-
transition_in(
|
|
2425
|
+
transition_in(ruleitem.$$.fragment, local);
|
|
2495
2426
|
current = true;
|
|
2496
2427
|
},
|
|
2497
2428
|
o(local) {
|
|
2498
|
-
transition_out(
|
|
2429
|
+
transition_out(ruleitem.$$.fragment, local);
|
|
2499
2430
|
current = false;
|
|
2500
2431
|
},
|
|
2501
2432
|
d(detaching) {
|
|
2502
|
-
|
|
2433
|
+
if (detaching) detach(first);
|
|
2434
|
+
destroy_component(ruleitem, detaching);
|
|
2503
2435
|
}
|
|
2504
2436
|
};
|
|
2505
2437
|
}
|
|
2506
2438
|
|
|
2507
2439
|
function create_fragment$g(ctx) {
|
|
2508
2440
|
let div;
|
|
2509
|
-
let
|
|
2510
|
-
let
|
|
2441
|
+
let each_blocks = [];
|
|
2442
|
+
let each_1_lookup = new Map();
|
|
2511
2443
|
let current;
|
|
2512
|
-
|
|
2513
|
-
const
|
|
2514
|
-
|
|
2515
|
-
function select_block_type(ctx, dirty) {
|
|
2516
|
-
if (/*svgContent*/ ctx[0]) return 0;
|
|
2517
|
-
if (/*imageData*/ ctx[1]) return 1;
|
|
2518
|
-
return -1;
|
|
2519
|
-
}
|
|
2444
|
+
let each_value = /*ruleLabelArray*/ ctx[3];
|
|
2445
|
+
const get_key = ctx => /*type*/ ctx[12];
|
|
2520
2446
|
|
|
2521
|
-
|
|
2522
|
-
|
|
2447
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
2448
|
+
let child_ctx = get_each_context$6(ctx, each_value, i);
|
|
2449
|
+
let key = get_key(child_ctx);
|
|
2450
|
+
each_1_lookup.set(key, each_blocks[i] = create_each_block$6(key, child_ctx));
|
|
2523
2451
|
}
|
|
2524
2452
|
|
|
2525
2453
|
return {
|
|
2526
2454
|
c() {
|
|
2527
2455
|
div = element("div");
|
|
2528
|
-
|
|
2529
|
-
|
|
2456
|
+
|
|
2457
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2458
|
+
each_blocks[i].c();
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2461
|
+
attr(div, "class", "floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3");
|
|
2462
|
+
set_style(div, "width", /*width*/ ctx[2], false);
|
|
2463
|
+
set_style(div, "height", /*height*/ ctx[1], false);
|
|
2530
2464
|
},
|
|
2531
2465
|
m(target, anchor) {
|
|
2532
2466
|
insert(target, div, anchor);
|
|
2533
2467
|
|
|
2534
|
-
|
|
2535
|
-
|
|
2468
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2469
|
+
each_blocks[i].m(div, null);
|
|
2536
2470
|
}
|
|
2537
2471
|
|
|
2538
2472
|
current = true;
|
|
2539
2473
|
},
|
|
2540
2474
|
p(ctx, [dirty]) {
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
}
|
|
2548
|
-
} else {
|
|
2549
|
-
if (if_block) {
|
|
2550
|
-
group_outros();
|
|
2551
|
-
|
|
2552
|
-
transition_out(if_blocks[previous_block_index], 1, 1, () => {
|
|
2553
|
-
if_blocks[previous_block_index] = null;
|
|
2554
|
-
});
|
|
2555
|
-
|
|
2556
|
-
check_outros();
|
|
2557
|
-
}
|
|
2558
|
-
|
|
2559
|
-
if (~current_block_type_index) {
|
|
2560
|
-
if_block = if_blocks[current_block_type_index];
|
|
2475
|
+
if (dirty & /*ruleLabelArray, bounding*/ 9) {
|
|
2476
|
+
each_value = /*ruleLabelArray*/ ctx[3];
|
|
2477
|
+
group_outros();
|
|
2478
|
+
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$6, null, get_each_context$6);
|
|
2479
|
+
check_outros();
|
|
2480
|
+
}
|
|
2561
2481
|
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
} else {
|
|
2566
|
-
if_block.p(ctx, dirty);
|
|
2567
|
-
}
|
|
2482
|
+
if (dirty & /*width*/ 4) {
|
|
2483
|
+
set_style(div, "width", /*width*/ ctx[2], false);
|
|
2484
|
+
}
|
|
2568
2485
|
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
} else {
|
|
2572
|
-
if_block = null;
|
|
2573
|
-
}
|
|
2486
|
+
if (dirty & /*height*/ 2) {
|
|
2487
|
+
set_style(div, "height", /*height*/ ctx[1], false);
|
|
2574
2488
|
}
|
|
2575
2489
|
},
|
|
2576
2490
|
i(local) {
|
|
2577
2491
|
if (current) return;
|
|
2578
|
-
|
|
2492
|
+
|
|
2493
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
2494
|
+
transition_in(each_blocks[i]);
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2579
2497
|
current = true;
|
|
2580
2498
|
},
|
|
2581
2499
|
o(local) {
|
|
2582
|
-
|
|
2500
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2501
|
+
transition_out(each_blocks[i]);
|
|
2502
|
+
}
|
|
2503
|
+
|
|
2583
2504
|
current = false;
|
|
2584
2505
|
},
|
|
2585
2506
|
d(detaching) {
|
|
2586
2507
|
if (detaching) detach(div);
|
|
2587
2508
|
|
|
2588
|
-
|
|
2589
|
-
|
|
2509
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2510
|
+
each_blocks[i].d();
|
|
2590
2511
|
}
|
|
2591
2512
|
}
|
|
2592
2513
|
};
|
|
2593
2514
|
}
|
|
2594
2515
|
|
|
2516
|
+
const padding = 1000;
|
|
2517
|
+
const exteriorWallOffset = 180;
|
|
2518
|
+
|
|
2595
2519
|
function instance$g($$self, $$props, $$invalidate) {
|
|
2596
|
-
let
|
|
2597
|
-
let
|
|
2598
|
-
|
|
2520
|
+
let bounding;
|
|
2521
|
+
let ruleLabelData;
|
|
2522
|
+
let ruleLabelDataKeys;
|
|
2523
|
+
let ruleLabelArray;
|
|
2524
|
+
let boundingWidth;
|
|
2525
|
+
let boundingHeight;
|
|
2526
|
+
let contentWidth;
|
|
2527
|
+
let contentHeight;
|
|
2528
|
+
let width;
|
|
2529
|
+
let height;
|
|
2599
2530
|
let { floorIndex } = $$props;
|
|
2600
2531
|
let { floorplanData } = $$props;
|
|
2601
2532
|
|
|
2602
2533
|
$$self.$$set = $$props => {
|
|
2603
|
-
if ('floorIndex' in $$props) $$invalidate(
|
|
2604
|
-
if ('floorplanData' in $$props) $$invalidate(
|
|
2534
|
+
if ('floorIndex' in $$props) $$invalidate(4, floorIndex = $$props.floorIndex);
|
|
2535
|
+
if ('floorplanData' in $$props) $$invalidate(5, floorplanData = $$props.floorplanData);
|
|
2605
2536
|
};
|
|
2606
2537
|
|
|
2607
2538
|
$$self.$$.update = () => {
|
|
2608
|
-
if ($$self.$$.dirty & /*floorplanData
|
|
2609
|
-
$$invalidate(
|
|
2539
|
+
if ($$self.$$.dirty & /*floorplanData*/ 32) {
|
|
2540
|
+
$$invalidate(0, bounding = floorplanData.bounding);
|
|
2610
2541
|
}
|
|
2611
2542
|
|
|
2612
|
-
if ($$self.$$.dirty & /*floorplanData,
|
|
2613
|
-
$$invalidate(
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2543
|
+
if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 48) {
|
|
2544
|
+
$$invalidate(10, ruleLabelData = floorplanData.floorDatas[floorIndex].rules);
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
if ($$self.$$.dirty & /*ruleLabelData*/ 1024) {
|
|
2548
|
+
$$invalidate(11, ruleLabelDataKeys = Object.keys(ruleLabelData));
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
if ($$self.$$.dirty & /*ruleLabelDataKeys, ruleLabelData*/ 3072) {
|
|
2552
|
+
$$invalidate(3, ruleLabelArray = ruleLabelDataKeys.map(key => [key, ruleLabelData[key]]));
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
if ($$self.$$.dirty & /*bounding*/ 1) {
|
|
2556
|
+
$$invalidate(8, boundingWidth = bounding.max.x - bounding.min.x);
|
|
2557
|
+
}
|
|
2558
|
+
|
|
2559
|
+
if ($$self.$$.dirty & /*bounding*/ 1) {
|
|
2560
|
+
$$invalidate(6, boundingHeight = bounding.max.y - bounding.min.y);
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
if ($$self.$$.dirty & /*bounding*/ 1) {
|
|
2564
|
+
$$invalidate(9, contentWidth = bounding.max.x - bounding.min.x - (padding - exteriorWallOffset) * 2);
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
if ($$self.$$.dirty & /*bounding*/ 1) {
|
|
2568
|
+
$$invalidate(7, contentHeight = bounding.max.y - bounding.min.y - (padding - exteriorWallOffset) * 2);
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
if ($$self.$$.dirty & /*contentWidth, boundingWidth*/ 768) {
|
|
2572
|
+
$$invalidate(2, width = contentWidth / boundingWidth * 100 + '%');
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
if ($$self.$$.dirty & /*contentHeight, boundingHeight*/ 192) {
|
|
2576
|
+
$$invalidate(1, height = contentHeight / boundingHeight * 100 + '%');
|
|
2618
2577
|
}
|
|
2619
2578
|
};
|
|
2620
2579
|
|
|
2621
|
-
return [
|
|
2580
|
+
return [
|
|
2581
|
+
bounding,
|
|
2582
|
+
height,
|
|
2583
|
+
width,
|
|
2584
|
+
ruleLabelArray,
|
|
2585
|
+
floorIndex,
|
|
2586
|
+
floorplanData,
|
|
2587
|
+
boundingHeight,
|
|
2588
|
+
contentHeight,
|
|
2589
|
+
boundingWidth,
|
|
2590
|
+
contentWidth,
|
|
2591
|
+
ruleLabelData,
|
|
2592
|
+
ruleLabelDataKeys
|
|
2593
|
+
];
|
|
2622
2594
|
}
|
|
2623
2595
|
|
|
2624
|
-
class
|
|
2596
|
+
class RuleLabels extends SvelteComponent {
|
|
2625
2597
|
constructor(options) {
|
|
2626
2598
|
super();
|
|
2627
|
-
init(this, options, instance$g, create_fragment$g, safe_not_equal, { floorIndex:
|
|
2599
|
+
init(this, options, instance$g, create_fragment$g, safe_not_equal, { floorIndex: 4, floorplanData: 5 }, add_css$c);
|
|
2628
2600
|
}
|
|
2629
2601
|
}
|
|
2630
2602
|
|
|
@@ -2895,20 +2867,20 @@ class RoomMaterial_2 extends SvelteComponent {
|
|
|
2895
2867
|
/* src/floorplan/Components/RoomMaterials/RoomMaterial.svelte generated by Svelte v3.47.0 */
|
|
2896
2868
|
|
|
2897
2869
|
function add_css$b(target) {
|
|
2898
|
-
append_styles(target, "svelte-
|
|
2870
|
+
append_styles(target, "svelte-1d4xj70", "svg.svelte-1d4xj70{position:absolute;width:100%;height:100%;overflow:visible}");
|
|
2899
2871
|
}
|
|
2900
2872
|
|
|
2901
|
-
function get_each_context$
|
|
2873
|
+
function get_each_context$5(ctx, list, i) {
|
|
2902
2874
|
const child_ctx = ctx.slice();
|
|
2903
|
-
child_ctx[
|
|
2875
|
+
child_ctx[5] = list[i];
|
|
2904
2876
|
return child_ctx;
|
|
2905
2877
|
}
|
|
2906
2878
|
|
|
2907
|
-
// (
|
|
2879
|
+
// (19:6) {:else}
|
|
2908
2880
|
function create_else_block(ctx) {
|
|
2909
2881
|
let roommaterial_1;
|
|
2910
2882
|
let current;
|
|
2911
|
-
roommaterial_1 = new RoomMaterial_1({ props: { path: /*room*/ ctx[
|
|
2883
|
+
roommaterial_1 = new RoomMaterial_1({ props: { path: /*room*/ ctx[5].path } });
|
|
2912
2884
|
|
|
2913
2885
|
return {
|
|
2914
2886
|
c() {
|
|
@@ -2920,7 +2892,7 @@ function create_else_block(ctx) {
|
|
|
2920
2892
|
},
|
|
2921
2893
|
p(ctx, dirty) {
|
|
2922
2894
|
const roommaterial_1_changes = {};
|
|
2923
|
-
if (dirty & /*rooms*/ 1) roommaterial_1_changes.path = /*room*/ ctx[
|
|
2895
|
+
if (dirty & /*rooms*/ 1) roommaterial_1_changes.path = /*room*/ ctx[5].path;
|
|
2924
2896
|
roommaterial_1.$set(roommaterial_1_changes);
|
|
2925
2897
|
},
|
|
2926
2898
|
i(local) {
|
|
@@ -2938,11 +2910,11 @@ function create_else_block(ctx) {
|
|
|
2938
2910
|
};
|
|
2939
2911
|
}
|
|
2940
2912
|
|
|
2941
|
-
// (
|
|
2913
|
+
// (17:37)
|
|
2942
2914
|
function create_if_block_1$2(ctx) {
|
|
2943
2915
|
let roommaterial_2;
|
|
2944
2916
|
let current;
|
|
2945
|
-
roommaterial_2 = new RoomMaterial_2({ props: { path: /*room*/ ctx[
|
|
2917
|
+
roommaterial_2 = new RoomMaterial_2({ props: { path: /*room*/ ctx[5].path } });
|
|
2946
2918
|
|
|
2947
2919
|
return {
|
|
2948
2920
|
c() {
|
|
@@ -2954,7 +2926,7 @@ function create_if_block_1$2(ctx) {
|
|
|
2954
2926
|
},
|
|
2955
2927
|
p(ctx, dirty) {
|
|
2956
2928
|
const roommaterial_2_changes = {};
|
|
2957
|
-
if (dirty & /*rooms*/ 1) roommaterial_2_changes.path = /*room*/ ctx[
|
|
2929
|
+
if (dirty & /*rooms*/ 1) roommaterial_2_changes.path = /*room*/ ctx[5].path;
|
|
2958
2930
|
roommaterial_2.$set(roommaterial_2_changes);
|
|
2959
2931
|
},
|
|
2960
2932
|
i(local) {
|
|
@@ -2972,11 +2944,11 @@ function create_if_block_1$2(ctx) {
|
|
|
2972
2944
|
};
|
|
2973
2945
|
}
|
|
2974
2946
|
|
|
2975
|
-
// (
|
|
2947
|
+
// (15:6) {#if room.floorType === 1}
|
|
2976
2948
|
function create_if_block$4(ctx) {
|
|
2977
2949
|
let roommaterial_0;
|
|
2978
2950
|
let current;
|
|
2979
|
-
roommaterial_0 = new RoomMaterial_0({ props: { path: /*room*/ ctx[
|
|
2951
|
+
roommaterial_0 = new RoomMaterial_0({ props: { path: /*room*/ ctx[5].path } });
|
|
2980
2952
|
|
|
2981
2953
|
return {
|
|
2982
2954
|
c() {
|
|
@@ -2988,7 +2960,7 @@ function create_if_block$4(ctx) {
|
|
|
2988
2960
|
},
|
|
2989
2961
|
p(ctx, dirty) {
|
|
2990
2962
|
const roommaterial_0_changes = {};
|
|
2991
|
-
if (dirty & /*rooms*/ 1) roommaterial_0_changes.path = /*room*/ ctx[
|
|
2963
|
+
if (dirty & /*rooms*/ 1) roommaterial_0_changes.path = /*room*/ ctx[5].path;
|
|
2992
2964
|
roommaterial_0.$set(roommaterial_0_changes);
|
|
2993
2965
|
},
|
|
2994
2966
|
i(local) {
|
|
@@ -3006,18 +2978,19 @@ function create_if_block$4(ctx) {
|
|
|
3006
2978
|
};
|
|
3007
2979
|
}
|
|
3008
2980
|
|
|
3009
|
-
// (
|
|
3010
|
-
function create_each_block$
|
|
2981
|
+
// (13:2) {#each rooms as room}
|
|
2982
|
+
function create_each_block$5(ctx) {
|
|
3011
2983
|
let svg;
|
|
3012
2984
|
let current_block_type_index;
|
|
3013
2985
|
let if_block;
|
|
2986
|
+
let svg_viewBox_value;
|
|
3014
2987
|
let current;
|
|
3015
2988
|
const if_block_creators = [create_if_block$4, create_if_block_1$2, create_else_block];
|
|
3016
2989
|
const if_blocks = [];
|
|
3017
2990
|
|
|
3018
2991
|
function select_block_type(ctx, dirty) {
|
|
3019
|
-
if (/*room*/ ctx[
|
|
3020
|
-
if (/*room*/ ctx[
|
|
2992
|
+
if (/*room*/ ctx[5].floorType === 1) return 0;
|
|
2993
|
+
if (/*room*/ ctx[5].floorType === 0) return 1;
|
|
3021
2994
|
return 2;
|
|
3022
2995
|
}
|
|
3023
2996
|
|
|
@@ -3028,7 +3001,10 @@ function create_each_block$4(ctx) {
|
|
|
3028
3001
|
c() {
|
|
3029
3002
|
svg = svg_element("svg");
|
|
3030
3003
|
if_block.c();
|
|
3031
|
-
attr(svg, "
|
|
3004
|
+
attr(svg, "width", "100%");
|
|
3005
|
+
attr(svg, "height", "100%");
|
|
3006
|
+
attr(svg, "viewBox", svg_viewBox_value = `0 0 ${/*boundingWidth*/ ctx[1]} ${/*boundingHeight*/ ctx[2]}`);
|
|
3007
|
+
attr(svg, "class", "svelte-1d4xj70");
|
|
3032
3008
|
},
|
|
3033
3009
|
m(target, anchor) {
|
|
3034
3010
|
insert(target, svg, anchor);
|
|
@@ -3085,7 +3061,7 @@ function create_fragment$c(ctx) {
|
|
|
3085
3061
|
let each_blocks = [];
|
|
3086
3062
|
|
|
3087
3063
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
3088
|
-
each_blocks[i] = create_each_block$
|
|
3064
|
+
each_blocks[i] = create_each_block$5(get_each_context$5(ctx, each_value, i));
|
|
3089
3065
|
}
|
|
3090
3066
|
|
|
3091
3067
|
const out = i => transition_out(each_blocks[i], 1, 1, () => {
|
|
@@ -3112,18 +3088,18 @@ function create_fragment$c(ctx) {
|
|
|
3112
3088
|
current = true;
|
|
3113
3089
|
},
|
|
3114
3090
|
p(ctx, [dirty]) {
|
|
3115
|
-
if (dirty & /*rooms*/
|
|
3091
|
+
if (dirty & /*boundingWidth, boundingHeight, rooms*/ 7) {
|
|
3116
3092
|
each_value = /*rooms*/ ctx[0];
|
|
3117
3093
|
let i;
|
|
3118
3094
|
|
|
3119
3095
|
for (i = 0; i < each_value.length; i += 1) {
|
|
3120
|
-
const child_ctx = get_each_context$
|
|
3096
|
+
const child_ctx = get_each_context$5(ctx, each_value, i);
|
|
3121
3097
|
|
|
3122
3098
|
if (each_blocks[i]) {
|
|
3123
3099
|
each_blocks[i].p(child_ctx, dirty);
|
|
3124
3100
|
transition_in(each_blocks[i], 1);
|
|
3125
3101
|
} else {
|
|
3126
|
-
each_blocks[i] = create_each_block$
|
|
3102
|
+
each_blocks[i] = create_each_block$5(child_ctx);
|
|
3127
3103
|
each_blocks[i].c();
|
|
3128
3104
|
transition_in(each_blocks[i], 1);
|
|
3129
3105
|
each_blocks[i].m(div, null);
|
|
@@ -3167,37 +3143,37 @@ function create_fragment$c(ctx) {
|
|
|
3167
3143
|
function instance$c($$self, $$props, $$invalidate) {
|
|
3168
3144
|
let rooms;
|
|
3169
3145
|
let { floorIndex } = $$props;
|
|
3170
|
-
let { pxmm } = $$props;
|
|
3171
3146
|
let { floorplanData } = $$props;
|
|
3147
|
+
const boundingWidth = floorplanData.bounding.max.x - floorplanData.bounding.min.x;
|
|
3148
|
+
const boundingHeight = floorplanData.bounding.max.y - floorplanData.bounding.min.y;
|
|
3172
3149
|
|
|
3173
3150
|
$$self.$$set = $$props => {
|
|
3174
|
-
if ('floorIndex' in $$props) $$invalidate(
|
|
3175
|
-
if ('
|
|
3176
|
-
if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
|
|
3151
|
+
if ('floorIndex' in $$props) $$invalidate(3, floorIndex = $$props.floorIndex);
|
|
3152
|
+
if ('floorplanData' in $$props) $$invalidate(4, floorplanData = $$props.floorplanData);
|
|
3177
3153
|
};
|
|
3178
3154
|
|
|
3179
3155
|
$$self.$$.update = () => {
|
|
3180
|
-
if ($$self.$$.dirty & /*floorplanData, floorIndex
|
|
3156
|
+
if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 24) {
|
|
3181
3157
|
$$invalidate(0, rooms = floorplanData.floorDatas[floorIndex].rooms.map(room => Object.assign(Object.assign({}, room), {
|
|
3182
|
-
path: room.path.map(p => formatFloorplanPoint(p,
|
|
3158
|
+
path: room.path.map(p => formatFloorplanPoint(p, floorplanData.bounding))
|
|
3183
3159
|
})));
|
|
3184
3160
|
}
|
|
3185
3161
|
};
|
|
3186
3162
|
|
|
3187
|
-
return [rooms,
|
|
3163
|
+
return [rooms, boundingWidth, boundingHeight, floorIndex, floorplanData];
|
|
3188
3164
|
}
|
|
3189
3165
|
|
|
3190
3166
|
class RoomMaterial extends SvelteComponent {
|
|
3191
3167
|
constructor(options) {
|
|
3192
3168
|
super();
|
|
3193
|
-
init(this, options, instance$c, create_fragment$c, safe_not_equal, { floorIndex:
|
|
3169
|
+
init(this, options, instance$c, create_fragment$c, safe_not_equal, { floorIndex: 3, floorplanData: 4 }, add_css$b);
|
|
3194
3170
|
}
|
|
3195
3171
|
}
|
|
3196
3172
|
|
|
3197
3173
|
/* src/floorplan/Components/RoomHighlight/Room.svelte generated by Svelte v3.47.0 */
|
|
3198
3174
|
|
|
3199
3175
|
function add_css$a(target) {
|
|
3200
|
-
append_styles(target, "svelte-
|
|
3176
|
+
append_styles(target, "svelte-19uvvss", "path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}");
|
|
3201
3177
|
}
|
|
3202
3178
|
|
|
3203
3179
|
function create_fragment$b(ctx) {
|
|
@@ -3208,7 +3184,7 @@ function create_fragment$b(ctx) {
|
|
|
3208
3184
|
path = svg_element("path");
|
|
3209
3185
|
attr(path, "d", /*_pathD*/ ctx[0]);
|
|
3210
3186
|
attr(path, "fill", `#fff`);
|
|
3211
|
-
attr(path, "class", "svelte-
|
|
3187
|
+
attr(path, "class", "svelte-19uvvss");
|
|
3212
3188
|
},
|
|
3213
3189
|
m(target, anchor) {
|
|
3214
3190
|
insert(target, path, anchor);
|
|
@@ -3223,55 +3199,52 @@ function create_fragment$b(ctx) {
|
|
|
3223
3199
|
}
|
|
3224
3200
|
|
|
3225
3201
|
function instance$b($$self, $$props, $$invalidate) {
|
|
3226
|
-
let { pxmm } = $$props;
|
|
3227
3202
|
let { room } = $$props;
|
|
3228
3203
|
let { floorplanData } = $$props;
|
|
3229
3204
|
const { bounding } = floorplanData;
|
|
3230
3205
|
|
|
3231
3206
|
const _pathD = pathD(room.path, {
|
|
3232
3207
|
needZ: true,
|
|
3233
|
-
format: vector => formatFloorplanPoint(vector,
|
|
3208
|
+
format: vector => formatFloorplanPoint(vector, bounding)
|
|
3234
3209
|
});
|
|
3235
3210
|
|
|
3236
3211
|
$$self.$$set = $$props => {
|
|
3237
|
-
if ('
|
|
3238
|
-
if ('
|
|
3239
|
-
if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
|
|
3212
|
+
if ('room' in $$props) $$invalidate(1, room = $$props.room);
|
|
3213
|
+
if ('floorplanData' in $$props) $$invalidate(2, floorplanData = $$props.floorplanData);
|
|
3240
3214
|
};
|
|
3241
3215
|
|
|
3242
|
-
return [_pathD,
|
|
3216
|
+
return [_pathD, room, floorplanData];
|
|
3243
3217
|
}
|
|
3244
3218
|
|
|
3245
3219
|
class Room extends SvelteComponent {
|
|
3246
3220
|
constructor(options) {
|
|
3247
3221
|
super();
|
|
3248
|
-
init(this, options, instance$b, create_fragment$b, safe_not_equal, {
|
|
3222
|
+
init(this, options, instance$b, create_fragment$b, safe_not_equal, { room: 1, floorplanData: 2 }, add_css$a);
|
|
3249
3223
|
}
|
|
3250
3224
|
}
|
|
3251
3225
|
|
|
3252
3226
|
/* src/floorplan/Components/RoomHighlight/RoomHighlight.svelte generated by Svelte v3.47.0 */
|
|
3253
3227
|
|
|
3254
3228
|
function add_css$9(target) {
|
|
3255
|
-
append_styles(target, "svelte-
|
|
3229
|
+
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}");
|
|
3256
3230
|
}
|
|
3257
3231
|
|
|
3258
|
-
function get_each_context$
|
|
3232
|
+
function get_each_context$4(ctx, list, i) {
|
|
3259
3233
|
const child_ctx = ctx.slice();
|
|
3260
|
-
child_ctx[
|
|
3234
|
+
child_ctx[4] = list[i];
|
|
3261
3235
|
return child_ctx;
|
|
3262
3236
|
}
|
|
3263
3237
|
|
|
3264
|
-
// (
|
|
3265
|
-
function create_each_block$
|
|
3238
|
+
// (10:4) {#each floorplanData.floorDatas[floorIndex].rooms as room (room.id)}
|
|
3239
|
+
function create_each_block$4(key_1, ctx) {
|
|
3266
3240
|
let first;
|
|
3267
3241
|
let room;
|
|
3268
3242
|
let current;
|
|
3269
3243
|
|
|
3270
3244
|
const room_spread_levels = [
|
|
3271
3245
|
{
|
|
3272
|
-
room: /*room*/ ctx[
|
|
3273
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
3274
|
-
pxmm: /*pxmm*/ ctx[0]
|
|
3246
|
+
room: /*room*/ ctx[4],
|
|
3247
|
+
floorplanData: /*floorplanData*/ ctx[1]
|
|
3275
3248
|
}
|
|
3276
3249
|
];
|
|
3277
3250
|
|
|
@@ -3299,12 +3272,11 @@ function create_each_block$3(key_1, ctx) {
|
|
|
3299
3272
|
p(new_ctx, dirty) {
|
|
3300
3273
|
ctx = new_ctx;
|
|
3301
3274
|
|
|
3302
|
-
const room_changes = (dirty & /*floorplanData, floorIndex
|
|
3275
|
+
const room_changes = (dirty & /*floorplanData, floorIndex*/ 3)
|
|
3303
3276
|
? get_spread_update(room_spread_levels, [
|
|
3304
3277
|
{
|
|
3305
|
-
room: /*room*/ ctx[
|
|
3306
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
3307
|
-
pxmm: /*pxmm*/ ctx[0]
|
|
3278
|
+
room: /*room*/ ctx[4],
|
|
3279
|
+
floorplanData: /*floorplanData*/ ctx[1]
|
|
3308
3280
|
}
|
|
3309
3281
|
])
|
|
3310
3282
|
: {};
|
|
@@ -3332,17 +3304,14 @@ function create_fragment$a(ctx) {
|
|
|
3332
3304
|
let svg;
|
|
3333
3305
|
let each_blocks = [];
|
|
3334
3306
|
let each_1_lookup = new Map();
|
|
3335
|
-
let div_resize_listener;
|
|
3336
3307
|
let current;
|
|
3337
|
-
let
|
|
3338
|
-
|
|
3339
|
-
let each_value = /*floorplanData*/ ctx[2].floorDatas[/*floorIndex*/ ctx[1]].rooms;
|
|
3340
|
-
const get_key = ctx => /*room*/ ctx[12].id;
|
|
3308
|
+
let each_value = /*floorplanData*/ ctx[1].floorDatas[/*floorIndex*/ ctx[0]].rooms;
|
|
3309
|
+
const get_key = ctx => /*room*/ ctx[4].id;
|
|
3341
3310
|
|
|
3342
3311
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
3343
|
-
let child_ctx = get_each_context$
|
|
3312
|
+
let child_ctx = get_each_context$4(ctx, each_value, i);
|
|
3344
3313
|
let key = get_key(child_ctx);
|
|
3345
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block$
|
|
3314
|
+
each_1_lookup.set(key, each_blocks[i] = create_each_block$4(key, child_ctx));
|
|
3346
3315
|
}
|
|
3347
3316
|
|
|
3348
3317
|
return {
|
|
@@ -3354,9 +3323,11 @@ function create_fragment$a(ctx) {
|
|
|
3354
3323
|
each_blocks[i].c();
|
|
3355
3324
|
}
|
|
3356
3325
|
|
|
3357
|
-
attr(svg, "
|
|
3358
|
-
attr(
|
|
3359
|
-
|
|
3326
|
+
attr(svg, "width", "100%");
|
|
3327
|
+
attr(svg, "height", "100%");
|
|
3328
|
+
attr(svg, "viewBox", `0 0 ${/*boundingWidth*/ ctx[2]} ${/*boundingHeight*/ ctx[3]}`);
|
|
3329
|
+
attr(svg, "class", "svelte-1kqo6e4");
|
|
3330
|
+
attr(div, "class", "floorplan-plugin__room-highlight svelte-1kqo6e4");
|
|
3360
3331
|
},
|
|
3361
3332
|
m(target, anchor) {
|
|
3362
3333
|
insert(target, div, anchor);
|
|
@@ -3366,20 +3337,13 @@ function create_fragment$a(ctx) {
|
|
|
3366
3337
|
each_blocks[i].m(svg, null);
|
|
3367
3338
|
}
|
|
3368
3339
|
|
|
3369
|
-
/*div_binding*/ ctx[9](div);
|
|
3370
|
-
div_resize_listener = add_resize_listener(div, /*div_elementresize_handler*/ ctx[10].bind(div));
|
|
3371
3340
|
current = true;
|
|
3372
|
-
|
|
3373
|
-
if (!mounted) {
|
|
3374
|
-
dispose = listen(div, "click", /*handleClick*/ ctx[6]);
|
|
3375
|
-
mounted = true;
|
|
3376
|
-
}
|
|
3377
3341
|
},
|
|
3378
3342
|
p(ctx, [dirty]) {
|
|
3379
|
-
if (dirty & /*floorplanData, floorIndex
|
|
3380
|
-
each_value = /*floorplanData*/ ctx[
|
|
3343
|
+
if (dirty & /*floorplanData, floorIndex*/ 3) {
|
|
3344
|
+
each_value = /*floorplanData*/ ctx[1].floorDatas[/*floorIndex*/ ctx[0]].rooms;
|
|
3381
3345
|
group_outros();
|
|
3382
|
-
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$
|
|
3346
|
+
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$4, null, get_each_context$4);
|
|
3383
3347
|
check_outros();
|
|
3384
3348
|
}
|
|
3385
3349
|
},
|
|
@@ -3405,127 +3369,46 @@ function create_fragment$a(ctx) {
|
|
|
3405
3369
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
3406
3370
|
each_blocks[i].d();
|
|
3407
3371
|
}
|
|
3408
|
-
|
|
3409
|
-
/*div_binding*/ ctx[9](null);
|
|
3410
|
-
div_resize_listener();
|
|
3411
|
-
mounted = false;
|
|
3412
|
-
dispose();
|
|
3413
3372
|
}
|
|
3414
3373
|
};
|
|
3415
3374
|
}
|
|
3416
3375
|
|
|
3417
3376
|
function instance$a($$self, $$props, $$invalidate) {
|
|
3418
|
-
let { five } = $$props;
|
|
3419
|
-
let { pxmm } = $$props;
|
|
3420
3377
|
let { floorIndex } = $$props;
|
|
3421
3378
|
let { floorplanData } = $$props;
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
let clientHeight;
|
|
3425
|
-
let highlightContainerDom;
|
|
3426
|
-
const { observers: floorplan_observers } = floorplanData;
|
|
3427
|
-
|
|
3428
|
-
const handleClick = function (e) {
|
|
3429
|
-
if ((onRoomHeightClick === null || onRoomHeightClick === void 0
|
|
3430
|
-
? void 0
|
|
3431
|
-
: onRoomHeightClick(e)) === false) return;
|
|
3432
|
-
|
|
3433
|
-
// 因为 mouse.offsetX 的兼容性问题,手动计算 mouse offsetX offsetY
|
|
3434
|
-
const boundingClientRect = highlightContainerDom.getBoundingClientRect();
|
|
3435
|
-
|
|
3436
|
-
const mouseClientVector = new Vector2(e.clientX, e.clientY);
|
|
3437
|
-
const domTopLeftVector = new Vector2(boundingClientRect.left, boundingClientRect.top);
|
|
3438
|
-
const mouseOffsetVector = mouseClientVector.clone().sub(domTopLeftVector);
|
|
3439
|
-
|
|
3440
|
-
// px 转换为 百分比
|
|
3441
|
-
const mouseOffsetRelativeVector = new Vector2(mouseOffsetVector.x / clientWidth, mouseOffsetVector.y / clientHeight);
|
|
3442
|
-
|
|
3443
|
-
const closestPoint = floorplan_observers.filter(observer => observer.floorIndex === floorIndex).sort((ob1, ob2) => {
|
|
3444
|
-
const position1 = new Vector2(ob1.positionInImage.x, ob1.positionInImage.y);
|
|
3445
|
-
const position2 = new Vector2(ob2.positionInImage.x, ob2.positionInImage.y);
|
|
3446
|
-
return position1.distanceTo(mouseOffsetRelativeVector) - position2.distanceTo(mouseOffsetRelativeVector);
|
|
3447
|
-
})[0];
|
|
3448
|
-
|
|
3449
|
-
five.moveToPano(closestPoint.index);
|
|
3450
|
-
};
|
|
3451
|
-
|
|
3452
|
-
function div_binding($$value) {
|
|
3453
|
-
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
3454
|
-
highlightContainerDom = $$value;
|
|
3455
|
-
$$invalidate(5, highlightContainerDom);
|
|
3456
|
-
});
|
|
3457
|
-
}
|
|
3458
|
-
|
|
3459
|
-
function div_elementresize_handler() {
|
|
3460
|
-
clientWidth = this.clientWidth;
|
|
3461
|
-
clientHeight = this.clientHeight;
|
|
3462
|
-
$$invalidate(3, clientWidth);
|
|
3463
|
-
$$invalidate(4, clientHeight);
|
|
3464
|
-
}
|
|
3379
|
+
const boundingWidth = floorplanData.bounding.max.x - floorplanData.bounding.min.x;
|
|
3380
|
+
const boundingHeight = floorplanData.bounding.max.y - floorplanData.bounding.min.y;
|
|
3465
3381
|
|
|
3466
3382
|
$$self.$$set = $$props => {
|
|
3467
|
-
if ('
|
|
3468
|
-
if ('
|
|
3469
|
-
if ('floorIndex' in $$props) $$invalidate(1, floorIndex = $$props.floorIndex);
|
|
3470
|
-
if ('floorplanData' in $$props) $$invalidate(2, floorplanData = $$props.floorplanData);
|
|
3471
|
-
if ('onRoomHeightClick' in $$props) $$invalidate(8, onRoomHeightClick = $$props.onRoomHeightClick);
|
|
3383
|
+
if ('floorIndex' in $$props) $$invalidate(0, floorIndex = $$props.floorIndex);
|
|
3384
|
+
if ('floorplanData' in $$props) $$invalidate(1, floorplanData = $$props.floorplanData);
|
|
3472
3385
|
};
|
|
3473
3386
|
|
|
3474
|
-
return [
|
|
3475
|
-
pxmm,
|
|
3476
|
-
floorIndex,
|
|
3477
|
-
floorplanData,
|
|
3478
|
-
clientWidth,
|
|
3479
|
-
clientHeight,
|
|
3480
|
-
highlightContainerDom,
|
|
3481
|
-
handleClick,
|
|
3482
|
-
five,
|
|
3483
|
-
onRoomHeightClick,
|
|
3484
|
-
div_binding,
|
|
3485
|
-
div_elementresize_handler
|
|
3486
|
-
];
|
|
3387
|
+
return [floorIndex, floorplanData, boundingWidth, boundingHeight];
|
|
3487
3388
|
}
|
|
3488
3389
|
|
|
3489
3390
|
class RoomHighlight extends SvelteComponent {
|
|
3490
3391
|
constructor(options) {
|
|
3491
3392
|
super();
|
|
3492
|
-
|
|
3493
|
-
init(
|
|
3494
|
-
this,
|
|
3495
|
-
options,
|
|
3496
|
-
instance$a,
|
|
3497
|
-
create_fragment$a,
|
|
3498
|
-
safe_not_equal,
|
|
3499
|
-
{
|
|
3500
|
-
five: 7,
|
|
3501
|
-
pxmm: 0,
|
|
3502
|
-
floorIndex: 1,
|
|
3503
|
-
floorplanData: 2,
|
|
3504
|
-
onRoomHeightClick: 8
|
|
3505
|
-
},
|
|
3506
|
-
add_css$9
|
|
3507
|
-
);
|
|
3393
|
+
init(this, options, instance$a, create_fragment$a, safe_not_equal, { floorIndex: 0, floorplanData: 1 }, add_css$9);
|
|
3508
3394
|
}
|
|
3509
3395
|
}
|
|
3510
3396
|
|
|
3511
|
-
/* src/floorplan/
|
|
3397
|
+
/* src/floorplan/Components/CurrentFloor.svelte generated by Svelte v3.47.0 */
|
|
3512
3398
|
|
|
3513
3399
|
function add_css$8(target) {
|
|
3514
|
-
append_styles(target, "svelte-
|
|
3400
|
+
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}");
|
|
3515
3401
|
}
|
|
3516
3402
|
|
|
3517
|
-
// (
|
|
3403
|
+
// (17:2) {#if hoverEnable}
|
|
3518
3404
|
function create_if_block_2(ctx) {
|
|
3519
3405
|
let roomhighlight;
|
|
3520
3406
|
let current;
|
|
3521
3407
|
|
|
3522
3408
|
const roomhighlight_spread_levels = [
|
|
3523
3409
|
{
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
floorIndex: /*floorIndex*/ ctx[2],
|
|
3527
|
-
floorplanData: /*floorplanData*/ ctx[6],
|
|
3528
|
-
onRoomHeightClick: /*onRoomHeightClick*/ ctx[7]
|
|
3410
|
+
floorIndex: /*floorIndex*/ ctx[1],
|
|
3411
|
+
floorplanData: /*floorplanData*/ ctx[5]
|
|
3529
3412
|
}
|
|
3530
3413
|
];
|
|
3531
3414
|
|
|
@@ -3546,14 +3429,11 @@ function create_if_block_2(ctx) {
|
|
|
3546
3429
|
current = true;
|
|
3547
3430
|
},
|
|
3548
3431
|
p(ctx, dirty) {
|
|
3549
|
-
const roomhighlight_changes = (dirty & /*
|
|
3432
|
+
const roomhighlight_changes = (dirty & /*floorIndex, floorplanData*/ 34)
|
|
3550
3433
|
? get_spread_update(roomhighlight_spread_levels, [
|
|
3551
3434
|
{
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
floorIndex: /*floorIndex*/ ctx[2],
|
|
3555
|
-
floorplanData: /*floorplanData*/ ctx[6],
|
|
3556
|
-
onRoomHeightClick: /*onRoomHeightClick*/ ctx[7]
|
|
3435
|
+
floorIndex: /*floorIndex*/ ctx[1],
|
|
3436
|
+
floorplanData: /*floorplanData*/ ctx[5]
|
|
3557
3437
|
}
|
|
3558
3438
|
])
|
|
3559
3439
|
: {};
|
|
@@ -3575,16 +3455,16 @@ function create_if_block_2(ctx) {
|
|
|
3575
3455
|
};
|
|
3576
3456
|
}
|
|
3577
3457
|
|
|
3578
|
-
// (
|
|
3458
|
+
// (21:2) {#if roomLabelsEnable}
|
|
3579
3459
|
function create_if_block_1$1(ctx) {
|
|
3580
3460
|
let roomlabels;
|
|
3581
3461
|
let current;
|
|
3582
3462
|
|
|
3583
3463
|
const roomlabels_spread_levels = [
|
|
3584
3464
|
{
|
|
3585
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
3586
|
-
floorIndex: /*floorIndex*/ ctx[
|
|
3587
|
-
getLabelElement: /*getLabelElement*/ ctx[
|
|
3465
|
+
floorplanData: /*floorplanData*/ ctx[5],
|
|
3466
|
+
floorIndex: /*floorIndex*/ ctx[1],
|
|
3467
|
+
getLabelElement: /*getLabelElement*/ ctx[6]
|
|
3588
3468
|
}
|
|
3589
3469
|
];
|
|
3590
3470
|
|
|
@@ -3605,12 +3485,12 @@ function create_if_block_1$1(ctx) {
|
|
|
3605
3485
|
current = true;
|
|
3606
3486
|
},
|
|
3607
3487
|
p(ctx, dirty) {
|
|
3608
|
-
const roomlabels_changes = (dirty & /*floorplanData, floorIndex, getLabelElement*/
|
|
3488
|
+
const roomlabels_changes = (dirty & /*floorplanData, floorIndex, getLabelElement*/ 98)
|
|
3609
3489
|
? get_spread_update(roomlabels_spread_levels, [
|
|
3610
3490
|
{
|
|
3611
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
3612
|
-
floorIndex: /*floorIndex*/ ctx[
|
|
3613
|
-
getLabelElement: /*getLabelElement*/ ctx[
|
|
3491
|
+
floorplanData: /*floorplanData*/ ctx[5],
|
|
3492
|
+
floorIndex: /*floorIndex*/ ctx[1],
|
|
3493
|
+
getLabelElement: /*getLabelElement*/ ctx[6]
|
|
3614
3494
|
}
|
|
3615
3495
|
])
|
|
3616
3496
|
: {};
|
|
@@ -3632,16 +3512,15 @@ function create_if_block_1$1(ctx) {
|
|
|
3632
3512
|
};
|
|
3633
3513
|
}
|
|
3634
3514
|
|
|
3635
|
-
// (
|
|
3515
|
+
// (24:2) {#if ruleLabelsEnable}
|
|
3636
3516
|
function create_if_block$3(ctx) {
|
|
3637
3517
|
let rulelabels;
|
|
3638
3518
|
let current;
|
|
3639
3519
|
|
|
3640
3520
|
const rulelabels_spread_levels = [
|
|
3641
3521
|
{
|
|
3642
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
3643
|
-
floorIndex: /*floorIndex*/ ctx[
|
|
3644
|
-
pxmm: /*pxmm*/ ctx[0]
|
|
3522
|
+
floorplanData: /*floorplanData*/ ctx[5],
|
|
3523
|
+
floorIndex: /*floorIndex*/ ctx[1]
|
|
3645
3524
|
}
|
|
3646
3525
|
];
|
|
3647
3526
|
|
|
@@ -3662,12 +3541,11 @@ function create_if_block$3(ctx) {
|
|
|
3662
3541
|
current = true;
|
|
3663
3542
|
},
|
|
3664
3543
|
p(ctx, dirty) {
|
|
3665
|
-
const rulelabels_changes = (dirty & /*floorplanData, floorIndex
|
|
3544
|
+
const rulelabels_changes = (dirty & /*floorplanData, floorIndex*/ 34)
|
|
3666
3545
|
? get_spread_update(rulelabels_spread_levels, [
|
|
3667
3546
|
{
|
|
3668
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
3669
|
-
floorIndex: /*floorIndex*/ ctx[
|
|
3670
|
-
pxmm: /*pxmm*/ ctx[0]
|
|
3547
|
+
floorplanData: /*floorplanData*/ ctx[5],
|
|
3548
|
+
floorIndex: /*floorIndex*/ ctx[1]
|
|
3671
3549
|
}
|
|
3672
3550
|
])
|
|
3673
3551
|
: {};
|
|
@@ -3697,13 +3575,13 @@ function create_fragment$9(ctx) {
|
|
|
3697
3575
|
let baseimage;
|
|
3698
3576
|
let t2;
|
|
3699
3577
|
let t3;
|
|
3578
|
+
let div_class_value;
|
|
3700
3579
|
let current;
|
|
3701
3580
|
|
|
3702
3581
|
const roommaterial_spread_levels = [
|
|
3703
3582
|
{
|
|
3704
|
-
floorIndex: /*floorIndex*/ ctx[
|
|
3705
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
3706
|
-
pxmm: /*pxmm*/ ctx[0]
|
|
3583
|
+
floorIndex: /*floorIndex*/ ctx[1],
|
|
3584
|
+
floorplanData: /*floorplanData*/ ctx[5]
|
|
3707
3585
|
}
|
|
3708
3586
|
];
|
|
3709
3587
|
|
|
@@ -3714,12 +3592,12 @@ function create_fragment$9(ctx) {
|
|
|
3714
3592
|
}
|
|
3715
3593
|
|
|
3716
3594
|
roommaterial = new RoomMaterial({ props: roommaterial_props });
|
|
3717
|
-
let if_block0 = /*hoverEnable*/ ctx[
|
|
3595
|
+
let if_block0 = /*hoverEnable*/ ctx[2] && create_if_block_2(ctx);
|
|
3718
3596
|
|
|
3719
3597
|
const baseimage_spread_levels = [
|
|
3720
3598
|
{
|
|
3721
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
3722
|
-
floorIndex: /*floorIndex*/ ctx[
|
|
3599
|
+
floorplanData: /*floorplanData*/ ctx[5],
|
|
3600
|
+
floorIndex: /*floorIndex*/ ctx[1]
|
|
3723
3601
|
}
|
|
3724
3602
|
];
|
|
3725
3603
|
|
|
@@ -3730,8 +3608,8 @@ function create_fragment$9(ctx) {
|
|
|
3730
3608
|
}
|
|
3731
3609
|
|
|
3732
3610
|
baseimage = new BaseImage({ props: baseimage_props });
|
|
3733
|
-
let if_block1 = /*roomLabelsEnable*/ ctx[
|
|
3734
|
-
let if_block2 = /*ruleLabelsEnable*/ ctx[
|
|
3611
|
+
let if_block1 = /*roomLabelsEnable*/ ctx[3] && create_if_block_1$1(ctx);
|
|
3612
|
+
let if_block2 = /*ruleLabelsEnable*/ ctx[4] && create_if_block$3(ctx);
|
|
3735
3613
|
|
|
3736
3614
|
return {
|
|
3737
3615
|
c() {
|
|
@@ -3745,7 +3623,10 @@ function create_fragment$9(ctx) {
|
|
|
3745
3623
|
if (if_block1) if_block1.c();
|
|
3746
3624
|
t3 = space();
|
|
3747
3625
|
if (if_block2) if_block2.c();
|
|
3748
|
-
|
|
3626
|
+
|
|
3627
|
+
attr(div, "class", div_class_value = "" + (null_to_empty(`floorplan-plugin__floor${/*isCurrent*/ ctx[0]
|
|
3628
|
+
? ' floorplan-plugin__floor--is-current'
|
|
3629
|
+
: ''}`) + " svelte-bl8zrz"));
|
|
3749
3630
|
},
|
|
3750
3631
|
m(target, anchor) {
|
|
3751
3632
|
insert(target, div, anchor);
|
|
@@ -3761,23 +3642,22 @@ function create_fragment$9(ctx) {
|
|
|
3761
3642
|
current = true;
|
|
3762
3643
|
},
|
|
3763
3644
|
p(ctx, [dirty]) {
|
|
3764
|
-
const roommaterial_changes = (dirty & /*floorIndex, floorplanData
|
|
3645
|
+
const roommaterial_changes = (dirty & /*floorIndex, floorplanData*/ 34)
|
|
3765
3646
|
? get_spread_update(roommaterial_spread_levels, [
|
|
3766
3647
|
{
|
|
3767
|
-
floorIndex: /*floorIndex*/ ctx[
|
|
3768
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
3769
|
-
pxmm: /*pxmm*/ ctx[0]
|
|
3648
|
+
floorIndex: /*floorIndex*/ ctx[1],
|
|
3649
|
+
floorplanData: /*floorplanData*/ ctx[5]
|
|
3770
3650
|
}
|
|
3771
3651
|
])
|
|
3772
3652
|
: {};
|
|
3773
3653
|
|
|
3774
3654
|
roommaterial.$set(roommaterial_changes);
|
|
3775
3655
|
|
|
3776
|
-
if (/*hoverEnable*/ ctx[
|
|
3656
|
+
if (/*hoverEnable*/ ctx[2]) {
|
|
3777
3657
|
if (if_block0) {
|
|
3778
3658
|
if_block0.p(ctx, dirty);
|
|
3779
3659
|
|
|
3780
|
-
if (dirty & /*hoverEnable*/
|
|
3660
|
+
if (dirty & /*hoverEnable*/ 4) {
|
|
3781
3661
|
transition_in(if_block0, 1);
|
|
3782
3662
|
}
|
|
3783
3663
|
} else {
|
|
@@ -3796,22 +3676,22 @@ function create_fragment$9(ctx) {
|
|
|
3796
3676
|
check_outros();
|
|
3797
3677
|
}
|
|
3798
3678
|
|
|
3799
|
-
const baseimage_changes = (dirty & /*floorplanData, floorIndex*/
|
|
3679
|
+
const baseimage_changes = (dirty & /*floorplanData, floorIndex*/ 34)
|
|
3800
3680
|
? get_spread_update(baseimage_spread_levels, [
|
|
3801
3681
|
{
|
|
3802
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
3803
|
-
floorIndex: /*floorIndex*/ ctx[
|
|
3682
|
+
floorplanData: /*floorplanData*/ ctx[5],
|
|
3683
|
+
floorIndex: /*floorIndex*/ ctx[1]
|
|
3804
3684
|
}
|
|
3805
3685
|
])
|
|
3806
3686
|
: {};
|
|
3807
3687
|
|
|
3808
3688
|
baseimage.$set(baseimage_changes);
|
|
3809
3689
|
|
|
3810
|
-
if (/*roomLabelsEnable*/ ctx[
|
|
3690
|
+
if (/*roomLabelsEnable*/ ctx[3]) {
|
|
3811
3691
|
if (if_block1) {
|
|
3812
3692
|
if_block1.p(ctx, dirty);
|
|
3813
3693
|
|
|
3814
|
-
if (dirty & /*roomLabelsEnable*/
|
|
3694
|
+
if (dirty & /*roomLabelsEnable*/ 8) {
|
|
3815
3695
|
transition_in(if_block1, 1);
|
|
3816
3696
|
}
|
|
3817
3697
|
} else {
|
|
@@ -3830,11 +3710,11 @@ function create_fragment$9(ctx) {
|
|
|
3830
3710
|
check_outros();
|
|
3831
3711
|
}
|
|
3832
3712
|
|
|
3833
|
-
if (/*ruleLabelsEnable*/ ctx[
|
|
3713
|
+
if (/*ruleLabelsEnable*/ ctx[4]) {
|
|
3834
3714
|
if (if_block2) {
|
|
3835
3715
|
if_block2.p(ctx, dirty);
|
|
3836
3716
|
|
|
3837
|
-
if (dirty & /*ruleLabelsEnable*/
|
|
3717
|
+
if (dirty & /*ruleLabelsEnable*/ 16) {
|
|
3838
3718
|
transition_in(if_block2, 1);
|
|
3839
3719
|
}
|
|
3840
3720
|
} else {
|
|
@@ -3852,6 +3732,12 @@ function create_fragment$9(ctx) {
|
|
|
3852
3732
|
|
|
3853
3733
|
check_outros();
|
|
3854
3734
|
}
|
|
3735
|
+
|
|
3736
|
+
if (!current || dirty & /*isCurrent*/ 1 && div_class_value !== (div_class_value = "" + (null_to_empty(`floorplan-plugin__floor${/*isCurrent*/ ctx[0]
|
|
3737
|
+
? ' floorplan-plugin__floor--is-current'
|
|
3738
|
+
: ''}`) + " svelte-bl8zrz"))) {
|
|
3739
|
+
attr(div, "class", div_class_value);
|
|
3740
|
+
}
|
|
3855
3741
|
},
|
|
3856
3742
|
i(local) {
|
|
3857
3743
|
if (current) return;
|
|
@@ -3882,37 +3768,31 @@ function create_fragment$9(ctx) {
|
|
|
3882
3768
|
}
|
|
3883
3769
|
|
|
3884
3770
|
function instance$9($$self, $$props, $$invalidate) {
|
|
3885
|
-
let {
|
|
3886
|
-
let { five } = $$props;
|
|
3771
|
+
let { isCurrent } = $$props;
|
|
3887
3772
|
let { floorIndex } = $$props;
|
|
3888
3773
|
let { hoverEnable } = $$props;
|
|
3889
3774
|
let { roomLabelsEnable } = $$props;
|
|
3890
3775
|
let { ruleLabelsEnable } = $$props;
|
|
3891
3776
|
let { floorplanData } = $$props;
|
|
3892
|
-
let { onRoomHeightClick } = $$props;
|
|
3893
3777
|
let { getLabelElement } = $$props;
|
|
3894
3778
|
|
|
3895
3779
|
$$self.$$set = $$props => {
|
|
3896
|
-
if ('
|
|
3897
|
-
if ('
|
|
3898
|
-
if ('
|
|
3899
|
-
if ('
|
|
3900
|
-
if ('
|
|
3901
|
-
if ('
|
|
3902
|
-
if ('
|
|
3903
|
-
if ('onRoomHeightClick' in $$props) $$invalidate(7, onRoomHeightClick = $$props.onRoomHeightClick);
|
|
3904
|
-
if ('getLabelElement' in $$props) $$invalidate(8, getLabelElement = $$props.getLabelElement);
|
|
3780
|
+
if ('isCurrent' in $$props) $$invalidate(0, isCurrent = $$props.isCurrent);
|
|
3781
|
+
if ('floorIndex' in $$props) $$invalidate(1, floorIndex = $$props.floorIndex);
|
|
3782
|
+
if ('hoverEnable' in $$props) $$invalidate(2, hoverEnable = $$props.hoverEnable);
|
|
3783
|
+
if ('roomLabelsEnable' in $$props) $$invalidate(3, roomLabelsEnable = $$props.roomLabelsEnable);
|
|
3784
|
+
if ('ruleLabelsEnable' in $$props) $$invalidate(4, ruleLabelsEnable = $$props.ruleLabelsEnable);
|
|
3785
|
+
if ('floorplanData' in $$props) $$invalidate(5, floorplanData = $$props.floorplanData);
|
|
3786
|
+
if ('getLabelElement' in $$props) $$invalidate(6, getLabelElement = $$props.getLabelElement);
|
|
3905
3787
|
};
|
|
3906
3788
|
|
|
3907
3789
|
return [
|
|
3908
|
-
|
|
3909
|
-
five,
|
|
3790
|
+
isCurrent,
|
|
3910
3791
|
floorIndex,
|
|
3911
3792
|
hoverEnable,
|
|
3912
3793
|
roomLabelsEnable,
|
|
3913
3794
|
ruleLabelsEnable,
|
|
3914
3795
|
floorplanData,
|
|
3915
|
-
onRoomHeightClick,
|
|
3916
3796
|
getLabelElement
|
|
3917
3797
|
];
|
|
3918
3798
|
}
|
|
@@ -3928,65 +3808,56 @@ class CurrentFloor$1 extends SvelteComponent {
|
|
|
3928
3808
|
create_fragment$9,
|
|
3929
3809
|
safe_not_equal,
|
|
3930
3810
|
{
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
onRoomHeightClick: 7,
|
|
3939
|
-
getLabelElement: 8
|
|
3811
|
+
isCurrent: 0,
|
|
3812
|
+
floorIndex: 1,
|
|
3813
|
+
hoverEnable: 2,
|
|
3814
|
+
roomLabelsEnable: 3,
|
|
3815
|
+
ruleLabelsEnable: 4,
|
|
3816
|
+
floorplanData: 5,
|
|
3817
|
+
getLabelElement: 6
|
|
3940
3818
|
},
|
|
3941
3819
|
add_css$8
|
|
3942
3820
|
);
|
|
3943
3821
|
}
|
|
3944
3822
|
}
|
|
3945
3823
|
|
|
3946
|
-
/* src/floorplan/
|
|
3824
|
+
/* src/floorplan/Components/Main.svelte generated by Svelte v3.47.0 */
|
|
3947
3825
|
|
|
3948
3826
|
function add_css$7(target) {
|
|
3949
|
-
append_styles(target, "svelte-
|
|
3827
|
+
append_styles(target, "svelte-q5wdnn", ".floorplan-main.svelte-q5wdnn{width:100%;height:100%}");
|
|
3828
|
+
}
|
|
3829
|
+
|
|
3830
|
+
function get_each_context$3(ctx, list, i) {
|
|
3831
|
+
const child_ctx = ctx.slice();
|
|
3832
|
+
child_ctx[13] = list[i];
|
|
3833
|
+
return child_ctx;
|
|
3950
3834
|
}
|
|
3951
3835
|
|
|
3952
|
-
// (
|
|
3836
|
+
// (21:0) {#if visible}
|
|
3953
3837
|
function create_if_block$2(ctx) {
|
|
3954
3838
|
let div;
|
|
3955
|
-
let currentfloor;
|
|
3956
3839
|
let t0;
|
|
3957
3840
|
let camera;
|
|
3958
3841
|
let t1;
|
|
3959
3842
|
let div_intro;
|
|
3960
3843
|
let current;
|
|
3844
|
+
let each_value = /*floorplanData*/ ctx[9].floorDatas;
|
|
3845
|
+
let each_blocks = [];
|
|
3961
3846
|
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
five: /*five*/ ctx[2],
|
|
3965
|
-
pxmm: /*pxmm*/ ctx[1],
|
|
3966
|
-
floorIndex: /*floorIndex*/ ctx[6],
|
|
3967
|
-
hoverEnable: /*hoverEnable*/ ctx[7],
|
|
3968
|
-
floorplanData: /*floorplanData*/ ctx[11],
|
|
3969
|
-
getLabelElement: /*getLabelElement*/ ctx[15],
|
|
3970
|
-
roomLabelsEnable: /*roomLabelsEnable*/ ctx[9],
|
|
3971
|
-
ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[10],
|
|
3972
|
-
onRoomHeightClick: /*onRoomHeightClick*/ ctx[14]
|
|
3973
|
-
}
|
|
3974
|
-
];
|
|
3975
|
-
|
|
3976
|
-
let currentfloor_props = {};
|
|
3977
|
-
|
|
3978
|
-
for (let i = 0; i < currentfloor_spread_levels.length; i += 1) {
|
|
3979
|
-
currentfloor_props = assign(currentfloor_props, currentfloor_spread_levels[i]);
|
|
3847
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
3848
|
+
each_blocks[i] = create_each_block$3(get_each_context$3(ctx, each_value, i));
|
|
3980
3849
|
}
|
|
3981
3850
|
|
|
3982
|
-
|
|
3851
|
+
const out = i => transition_out(each_blocks[i], 1, 1, () => {
|
|
3852
|
+
each_blocks[i] = null;
|
|
3853
|
+
});
|
|
3983
3854
|
|
|
3984
3855
|
const camera_spread_levels = [
|
|
3985
3856
|
{
|
|
3986
|
-
panoIndex: /*panoIndex*/ ctx[
|
|
3987
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
3988
|
-
lastPanoramaLongitude: /*lastPanoramaLongitude*/ ctx[
|
|
3989
|
-
cameraImageUrl: /*cameraImageUrl*/ ctx[
|
|
3857
|
+
panoIndex: /*panoIndex*/ ctx[3],
|
|
3858
|
+
floorplanData: /*floorplanData*/ ctx[9],
|
|
3859
|
+
lastPanoramaLongitude: /*lastPanoramaLongitude*/ ctx[10],
|
|
3860
|
+
cameraImageUrl: /*cameraImageUrl*/ ctx[11]
|
|
3990
3861
|
}
|
|
3991
3862
|
];
|
|
3992
3863
|
|
|
@@ -3997,21 +3868,29 @@ function create_if_block$2(ctx) {
|
|
|
3997
3868
|
}
|
|
3998
3869
|
|
|
3999
3870
|
camera = new Camera$1({ props: camera_props });
|
|
4000
|
-
let if_block = /*compassEnable*/ ctx[
|
|
3871
|
+
let if_block = /*compassEnable*/ ctx[6] && create_if_block_1(ctx);
|
|
4001
3872
|
|
|
4002
3873
|
return {
|
|
4003
3874
|
c() {
|
|
4004
3875
|
div = element("div");
|
|
4005
|
-
|
|
3876
|
+
|
|
3877
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
3878
|
+
each_blocks[i].c();
|
|
3879
|
+
}
|
|
3880
|
+
|
|
4006
3881
|
t0 = space();
|
|
4007
3882
|
create_component(camera.$$.fragment);
|
|
4008
3883
|
t1 = space();
|
|
4009
3884
|
if (if_block) if_block.c();
|
|
4010
|
-
attr(div, "class", "floorplan-main svelte-
|
|
3885
|
+
attr(div, "class", "floorplan-main svelte-q5wdnn");
|
|
4011
3886
|
},
|
|
4012
3887
|
m(target, anchor) {
|
|
4013
3888
|
insert(target, div, anchor);
|
|
4014
|
-
|
|
3889
|
+
|
|
3890
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
3891
|
+
each_blocks[i].m(div, null);
|
|
3892
|
+
}
|
|
3893
|
+
|
|
4015
3894
|
append(div, t0);
|
|
4016
3895
|
mount_component(camera, div, null);
|
|
4017
3896
|
append(div, t1);
|
|
@@ -4021,42 +3900,51 @@ function create_if_block$2(ctx) {
|
|
|
4021
3900
|
p(new_ctx, dirty) {
|
|
4022
3901
|
ctx = new_ctx;
|
|
4023
3902
|
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
3903
|
+
if (dirty & /*hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable, floorIndex*/ 5040) {
|
|
3904
|
+
each_value = /*floorplanData*/ ctx[9].floorDatas;
|
|
3905
|
+
let i;
|
|
3906
|
+
|
|
3907
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
3908
|
+
const child_ctx = get_each_context$3(ctx, each_value, i);
|
|
3909
|
+
|
|
3910
|
+
if (each_blocks[i]) {
|
|
3911
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
3912
|
+
transition_in(each_blocks[i], 1);
|
|
3913
|
+
} else {
|
|
3914
|
+
each_blocks[i] = create_each_block$3(child_ctx);
|
|
3915
|
+
each_blocks[i].c();
|
|
3916
|
+
transition_in(each_blocks[i], 1);
|
|
3917
|
+
each_blocks[i].m(div, t0);
|
|
4036
3918
|
}
|
|
4037
|
-
|
|
4038
|
-
: {};
|
|
3919
|
+
}
|
|
4039
3920
|
|
|
4040
|
-
|
|
3921
|
+
group_outros();
|
|
3922
|
+
|
|
3923
|
+
for (i = each_value.length; i < each_blocks.length; i += 1) {
|
|
3924
|
+
out(i);
|
|
3925
|
+
}
|
|
3926
|
+
|
|
3927
|
+
check_outros();
|
|
3928
|
+
}
|
|
4041
3929
|
|
|
4042
|
-
const camera_changes = (dirty & /*panoIndex, floorplanData, lastPanoramaLongitude, cameraImageUrl*/
|
|
3930
|
+
const camera_changes = (dirty & /*panoIndex, floorplanData, lastPanoramaLongitude, cameraImageUrl*/ 3592)
|
|
4043
3931
|
? get_spread_update(camera_spread_levels, [
|
|
4044
3932
|
{
|
|
4045
|
-
panoIndex: /*panoIndex*/ ctx[
|
|
4046
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
4047
|
-
lastPanoramaLongitude: /*lastPanoramaLongitude*/ ctx[
|
|
4048
|
-
cameraImageUrl: /*cameraImageUrl*/ ctx[
|
|
3933
|
+
panoIndex: /*panoIndex*/ ctx[3],
|
|
3934
|
+
floorplanData: /*floorplanData*/ ctx[9],
|
|
3935
|
+
lastPanoramaLongitude: /*lastPanoramaLongitude*/ ctx[10],
|
|
3936
|
+
cameraImageUrl: /*cameraImageUrl*/ ctx[11]
|
|
4049
3937
|
}
|
|
4050
3938
|
])
|
|
4051
3939
|
: {};
|
|
4052
3940
|
|
|
4053
3941
|
camera.$set(camera_changes);
|
|
4054
3942
|
|
|
4055
|
-
if (/*compassEnable*/ ctx[
|
|
3943
|
+
if (/*compassEnable*/ ctx[6]) {
|
|
4056
3944
|
if (if_block) {
|
|
4057
3945
|
if_block.p(ctx, dirty);
|
|
4058
3946
|
|
|
4059
|
-
if (dirty & /*compassEnable*/
|
|
3947
|
+
if (dirty & /*compassEnable*/ 64) {
|
|
4060
3948
|
transition_in(if_block, 1);
|
|
4061
3949
|
}
|
|
4062
3950
|
} else {
|
|
@@ -4077,14 +3965,18 @@ function create_if_block$2(ctx) {
|
|
|
4077
3965
|
},
|
|
4078
3966
|
i(local) {
|
|
4079
3967
|
if (current) return;
|
|
4080
|
-
|
|
3968
|
+
|
|
3969
|
+
for (let i = 0; i < each_value.length; i += 1) {
|
|
3970
|
+
transition_in(each_blocks[i]);
|
|
3971
|
+
}
|
|
3972
|
+
|
|
4081
3973
|
transition_in(camera.$$.fragment, local);
|
|
4082
3974
|
transition_in(if_block);
|
|
4083
3975
|
|
|
4084
3976
|
if (!div_intro) {
|
|
4085
3977
|
add_render_callback(() => {
|
|
4086
3978
|
div_intro = create_in_transition(div, fade, {
|
|
4087
|
-
duration: /*duration*/ ctx[
|
|
3979
|
+
duration: /*duration*/ ctx[0],
|
|
4088
3980
|
easing: linear
|
|
4089
3981
|
});
|
|
4090
3982
|
|
|
@@ -4095,29 +3987,107 @@ function create_if_block$2(ctx) {
|
|
|
4095
3987
|
current = true;
|
|
4096
3988
|
},
|
|
4097
3989
|
o(local) {
|
|
4098
|
-
|
|
3990
|
+
each_blocks = each_blocks.filter(Boolean);
|
|
3991
|
+
|
|
3992
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
3993
|
+
transition_out(each_blocks[i]);
|
|
3994
|
+
}
|
|
3995
|
+
|
|
4099
3996
|
transition_out(camera.$$.fragment, local);
|
|
4100
3997
|
transition_out(if_block);
|
|
4101
3998
|
current = false;
|
|
4102
3999
|
},
|
|
4103
4000
|
d(detaching) {
|
|
4104
4001
|
if (detaching) detach(div);
|
|
4105
|
-
|
|
4002
|
+
destroy_each(each_blocks, detaching);
|
|
4106
4003
|
destroy_component(camera);
|
|
4107
4004
|
if (if_block) if_block.d();
|
|
4108
4005
|
}
|
|
4109
4006
|
};
|
|
4110
4007
|
}
|
|
4111
4008
|
|
|
4112
|
-
// (
|
|
4009
|
+
// (23:4) {#each floorplanData.floorDatas as floorData}
|
|
4010
|
+
function create_each_block$3(ctx) {
|
|
4011
|
+
let currentfloor;
|
|
4012
|
+
let current;
|
|
4013
|
+
|
|
4014
|
+
const currentfloor_spread_levels = [
|
|
4015
|
+
{
|
|
4016
|
+
hoverEnable: /*hoverEnable*/ ctx[5],
|
|
4017
|
+
floorplanData: /*floorplanData*/ ctx[9],
|
|
4018
|
+
getLabelElement: /*getLabelElement*/ ctx[12],
|
|
4019
|
+
roomLabelsEnable: /*roomLabelsEnable*/ ctx[7],
|
|
4020
|
+
ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[8]
|
|
4021
|
+
},
|
|
4022
|
+
{
|
|
4023
|
+
floorIndex: /*floorData*/ ctx[13].floorIndex
|
|
4024
|
+
},
|
|
4025
|
+
{
|
|
4026
|
+
isCurrent: /*floorData*/ ctx[13].floorIndex === /*floorIndex*/ ctx[4]
|
|
4027
|
+
}
|
|
4028
|
+
];
|
|
4029
|
+
|
|
4030
|
+
let currentfloor_props = {};
|
|
4031
|
+
|
|
4032
|
+
for (let i = 0; i < currentfloor_spread_levels.length; i += 1) {
|
|
4033
|
+
currentfloor_props = assign(currentfloor_props, currentfloor_spread_levels[i]);
|
|
4034
|
+
}
|
|
4035
|
+
|
|
4036
|
+
currentfloor = new CurrentFloor$1({ props: currentfloor_props });
|
|
4037
|
+
|
|
4038
|
+
return {
|
|
4039
|
+
c() {
|
|
4040
|
+
create_component(currentfloor.$$.fragment);
|
|
4041
|
+
},
|
|
4042
|
+
m(target, anchor) {
|
|
4043
|
+
mount_component(currentfloor, target, anchor);
|
|
4044
|
+
current = true;
|
|
4045
|
+
},
|
|
4046
|
+
p(ctx, dirty) {
|
|
4047
|
+
const currentfloor_changes = (dirty & /*hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable, floorIndex*/ 5040)
|
|
4048
|
+
? get_spread_update(currentfloor_spread_levels, [
|
|
4049
|
+
dirty & /*hoverEnable, floorplanData, getLabelElement, roomLabelsEnable, ruleLabelsEnable*/ 5024 && {
|
|
4050
|
+
hoverEnable: /*hoverEnable*/ ctx[5],
|
|
4051
|
+
floorplanData: /*floorplanData*/ ctx[9],
|
|
4052
|
+
getLabelElement: /*getLabelElement*/ ctx[12],
|
|
4053
|
+
roomLabelsEnable: /*roomLabelsEnable*/ ctx[7],
|
|
4054
|
+
ruleLabelsEnable: /*ruleLabelsEnable*/ ctx[8]
|
|
4055
|
+
},
|
|
4056
|
+
dirty & /*floorplanData*/ 512 && {
|
|
4057
|
+
floorIndex: /*floorData*/ ctx[13].floorIndex
|
|
4058
|
+
},
|
|
4059
|
+
dirty & /*floorplanData, floorIndex*/ 528 && {
|
|
4060
|
+
isCurrent: /*floorData*/ ctx[13].floorIndex === /*floorIndex*/ ctx[4]
|
|
4061
|
+
}
|
|
4062
|
+
])
|
|
4063
|
+
: {};
|
|
4064
|
+
|
|
4065
|
+
currentfloor.$set(currentfloor_changes);
|
|
4066
|
+
},
|
|
4067
|
+
i(local) {
|
|
4068
|
+
if (current) return;
|
|
4069
|
+
transition_in(currentfloor.$$.fragment, local);
|
|
4070
|
+
current = true;
|
|
4071
|
+
},
|
|
4072
|
+
o(local) {
|
|
4073
|
+
transition_out(currentfloor.$$.fragment, local);
|
|
4074
|
+
current = false;
|
|
4075
|
+
},
|
|
4076
|
+
d(detaching) {
|
|
4077
|
+
destroy_component(currentfloor, detaching);
|
|
4078
|
+
}
|
|
4079
|
+
};
|
|
4080
|
+
}
|
|
4081
|
+
|
|
4082
|
+
// (37:4) {#if compassEnable}
|
|
4113
4083
|
function create_if_block_1(ctx) {
|
|
4114
4084
|
let compass;
|
|
4115
4085
|
let current;
|
|
4116
4086
|
|
|
4117
4087
|
compass = new Compass({
|
|
4118
4088
|
props: {
|
|
4119
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
4120
|
-
northDesc: /*northDesc*/ ctx[
|
|
4089
|
+
floorplanData: /*floorplanData*/ ctx[9],
|
|
4090
|
+
northDesc: /*northDesc*/ ctx[2]
|
|
4121
4091
|
}
|
|
4122
4092
|
});
|
|
4123
4093
|
|
|
@@ -4131,8 +4101,8 @@ function create_if_block_1(ctx) {
|
|
|
4131
4101
|
},
|
|
4132
4102
|
p(ctx, dirty) {
|
|
4133
4103
|
const compass_changes = {};
|
|
4134
|
-
if (dirty & /*floorplanData*/
|
|
4135
|
-
if (dirty & /*northDesc*/
|
|
4104
|
+
if (dirty & /*floorplanData*/ 512) compass_changes.floorplanData = /*floorplanData*/ ctx[9];
|
|
4105
|
+
if (dirty & /*northDesc*/ 4) compass_changes.northDesc = /*northDesc*/ ctx[2];
|
|
4136
4106
|
compass.$set(compass_changes);
|
|
4137
4107
|
},
|
|
4138
4108
|
i(local) {
|
|
@@ -4153,7 +4123,7 @@ function create_if_block_1(ctx) {
|
|
|
4153
4123
|
function create_fragment$8(ctx) {
|
|
4154
4124
|
let if_block_anchor;
|
|
4155
4125
|
let current;
|
|
4156
|
-
let if_block = /*visible*/ ctx[
|
|
4126
|
+
let if_block = /*visible*/ ctx[1] && create_if_block$2(ctx);
|
|
4157
4127
|
|
|
4158
4128
|
return {
|
|
4159
4129
|
c() {
|
|
@@ -4166,11 +4136,11 @@ function create_fragment$8(ctx) {
|
|
|
4166
4136
|
current = true;
|
|
4167
4137
|
},
|
|
4168
4138
|
p(ctx, [dirty]) {
|
|
4169
|
-
if (/*visible*/ ctx[
|
|
4139
|
+
if (/*visible*/ ctx[1]) {
|
|
4170
4140
|
if (if_block) {
|
|
4171
4141
|
if_block.p(ctx, dirty);
|
|
4172
4142
|
|
|
4173
|
-
if (dirty & /*visible*/
|
|
4143
|
+
if (dirty & /*visible*/ 2) {
|
|
4174
4144
|
transition_in(if_block, 1);
|
|
4175
4145
|
}
|
|
4176
4146
|
} else {
|
|
@@ -4206,11 +4176,9 @@ function create_fragment$8(ctx) {
|
|
|
4206
4176
|
}
|
|
4207
4177
|
|
|
4208
4178
|
function instance$8($$self, $$props, $$invalidate) {
|
|
4209
|
-
let { northDesc } = $$props;
|
|
4210
|
-
let { pxmm } = $$props;
|
|
4211
|
-
let { five } = $$props;
|
|
4212
4179
|
let { duration = 0 } = $$props;
|
|
4213
4180
|
let { visible } = $$props;
|
|
4181
|
+
let { northDesc } = $$props;
|
|
4214
4182
|
let { panoIndex } = $$props;
|
|
4215
4183
|
let { floorIndex } = $$props;
|
|
4216
4184
|
let { hoverEnable } = $$props;
|
|
@@ -4220,34 +4188,28 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
4220
4188
|
let { floorplanData } = $$props;
|
|
4221
4189
|
let { lastPanoramaLongitude } = $$props;
|
|
4222
4190
|
let { cameraImageUrl } = $$props;
|
|
4223
|
-
let { onRoomHeightClick } = $$props;
|
|
4224
4191
|
let { getLabelElement } = $$props;
|
|
4225
4192
|
|
|
4226
4193
|
$$self.$$set = $$props => {
|
|
4227
|
-
if ('
|
|
4228
|
-
if ('
|
|
4229
|
-
if ('
|
|
4230
|
-
if ('
|
|
4231
|
-
if ('
|
|
4232
|
-
if ('
|
|
4233
|
-
if ('
|
|
4234
|
-
if ('
|
|
4235
|
-
if ('
|
|
4236
|
-
if ('
|
|
4237
|
-
if ('
|
|
4238
|
-
if ('
|
|
4239
|
-
if ('
|
|
4240
|
-
if ('cameraImageUrl' in $$props) $$invalidate(13, cameraImageUrl = $$props.cameraImageUrl);
|
|
4241
|
-
if ('onRoomHeightClick' in $$props) $$invalidate(14, onRoomHeightClick = $$props.onRoomHeightClick);
|
|
4242
|
-
if ('getLabelElement' in $$props) $$invalidate(15, getLabelElement = $$props.getLabelElement);
|
|
4194
|
+
if ('duration' in $$props) $$invalidate(0, duration = $$props.duration);
|
|
4195
|
+
if ('visible' in $$props) $$invalidate(1, visible = $$props.visible);
|
|
4196
|
+
if ('northDesc' in $$props) $$invalidate(2, northDesc = $$props.northDesc);
|
|
4197
|
+
if ('panoIndex' in $$props) $$invalidate(3, panoIndex = $$props.panoIndex);
|
|
4198
|
+
if ('floorIndex' in $$props) $$invalidate(4, floorIndex = $$props.floorIndex);
|
|
4199
|
+
if ('hoverEnable' in $$props) $$invalidate(5, hoverEnable = $$props.hoverEnable);
|
|
4200
|
+
if ('compassEnable' in $$props) $$invalidate(6, compassEnable = $$props.compassEnable);
|
|
4201
|
+
if ('roomLabelsEnable' in $$props) $$invalidate(7, roomLabelsEnable = $$props.roomLabelsEnable);
|
|
4202
|
+
if ('ruleLabelsEnable' in $$props) $$invalidate(8, ruleLabelsEnable = $$props.ruleLabelsEnable);
|
|
4203
|
+
if ('floorplanData' in $$props) $$invalidate(9, floorplanData = $$props.floorplanData);
|
|
4204
|
+
if ('lastPanoramaLongitude' in $$props) $$invalidate(10, lastPanoramaLongitude = $$props.lastPanoramaLongitude);
|
|
4205
|
+
if ('cameraImageUrl' in $$props) $$invalidate(11, cameraImageUrl = $$props.cameraImageUrl);
|
|
4206
|
+
if ('getLabelElement' in $$props) $$invalidate(12, getLabelElement = $$props.getLabelElement);
|
|
4243
4207
|
};
|
|
4244
4208
|
|
|
4245
4209
|
return [
|
|
4246
|
-
northDesc,
|
|
4247
|
-
pxmm,
|
|
4248
|
-
five,
|
|
4249
4210
|
duration,
|
|
4250
4211
|
visible,
|
|
4212
|
+
northDesc,
|
|
4251
4213
|
panoIndex,
|
|
4252
4214
|
floorIndex,
|
|
4253
4215
|
hoverEnable,
|
|
@@ -4257,7 +4219,6 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
4257
4219
|
floorplanData,
|
|
4258
4220
|
lastPanoramaLongitude,
|
|
4259
4221
|
cameraImageUrl,
|
|
4260
|
-
onRoomHeightClick,
|
|
4261
4222
|
getLabelElement
|
|
4262
4223
|
];
|
|
4263
4224
|
}
|
|
@@ -4273,22 +4234,19 @@ class Main$1 extends SvelteComponent {
|
|
|
4273
4234
|
create_fragment$8,
|
|
4274
4235
|
safe_not_equal,
|
|
4275
4236
|
{
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
cameraImageUrl: 13,
|
|
4290
|
-
onRoomHeightClick: 14,
|
|
4291
|
-
getLabelElement: 15
|
|
4237
|
+
duration: 0,
|
|
4238
|
+
visible: 1,
|
|
4239
|
+
northDesc: 2,
|
|
4240
|
+
panoIndex: 3,
|
|
4241
|
+
floorIndex: 4,
|
|
4242
|
+
hoverEnable: 5,
|
|
4243
|
+
compassEnable: 6,
|
|
4244
|
+
roomLabelsEnable: 7,
|
|
4245
|
+
ruleLabelsEnable: 8,
|
|
4246
|
+
floorplanData: 9,
|
|
4247
|
+
lastPanoramaLongitude: 10,
|
|
4248
|
+
cameraImageUrl: 11,
|
|
4249
|
+
getLabelElement: 12
|
|
4292
4250
|
},
|
|
4293
4251
|
add_css$7
|
|
4294
4252
|
);
|
|
@@ -4398,32 +4356,58 @@ class TopviewFloorplanPluginController {
|
|
|
4398
4356
|
value: () => {
|
|
4399
4357
|
var _a, _b;
|
|
4400
4358
|
this.hide();
|
|
4401
|
-
(_a = this.
|
|
4402
|
-
(_b = this.
|
|
4403
|
-
this.five.off('modeChange', this.
|
|
4404
|
-
this.five.off('
|
|
4405
|
-
this.five.off('
|
|
4406
|
-
this.five.off('
|
|
4407
|
-
this.five.off('
|
|
4408
|
-
this.five.off('
|
|
4359
|
+
(_a = this.app) === null || _a === void 0 ? void 0 : _a.$destroy();
|
|
4360
|
+
(_b = this.container) === null || _b === void 0 ? void 0 : _b.remove();
|
|
4361
|
+
this.five.off('modeChange', this.onFiveModeChange);
|
|
4362
|
+
this.five.off('panGesture', this.onFivePanGesture);
|
|
4363
|
+
this.five.off('panoArrived', this.onFivePanoArrived);
|
|
4364
|
+
this.five.off('modelLoaded', this.onFiveModelLoaded);
|
|
4365
|
+
this.five.off('pinchGesture', this.onFivePinchGesture);
|
|
4366
|
+
this.five.off('wantsGesture', this.onFiveWantsGesture);
|
|
4367
|
+
this.five.off('wantsMoveToPano', this.onFiveWantsMoveToPano);
|
|
4368
|
+
this.five.off('initAnimationEnded', this.onFiveInitAnimationEnded);
|
|
4409
4369
|
this.five.off('modelShownFloorChange', this.onModelShownFloorChange);
|
|
4410
4370
|
}
|
|
4411
4371
|
});
|
|
4412
|
-
|
|
4372
|
+
Object.defineProperty(this, "onFiveWantsMoveToPano", {
|
|
4373
|
+
enumerable: true,
|
|
4374
|
+
configurable: true,
|
|
4375
|
+
writable: true,
|
|
4376
|
+
value: () => {
|
|
4377
|
+
if (this.visible && this.configs.preventRoomClick)
|
|
4378
|
+
return false;
|
|
4379
|
+
}
|
|
4380
|
+
});
|
|
4381
|
+
Object.defineProperty(this, "onFiveWantsGesture", {
|
|
4382
|
+
enumerable: true,
|
|
4383
|
+
configurable: true,
|
|
4384
|
+
writable: true,
|
|
4385
|
+
value: (type) => {
|
|
4386
|
+
if (type !== 'pan' && type !== 'pinch' && type !== 'mouseWheel')
|
|
4387
|
+
return;
|
|
4388
|
+
if (this.visible && !this.configs.gestureEnable)
|
|
4389
|
+
return false;
|
|
4390
|
+
}
|
|
4391
|
+
});
|
|
4413
4392
|
Object.defineProperty(this, "onModelShownFloorChange", {
|
|
4414
4393
|
enumerable: true,
|
|
4415
4394
|
configurable: true,
|
|
4416
4395
|
writable: true,
|
|
4417
4396
|
value: (shownFloor) => {
|
|
4418
|
-
if (
|
|
4397
|
+
if (this.floorIndex === shownFloor)
|
|
4419
4398
|
return;
|
|
4399
|
+
if (shownFloor === null) {
|
|
4400
|
+
const panoIndex = this.five.getCurrentState().panoIndex;
|
|
4401
|
+
this.floorIndex = this.five.work.observers[panoIndex].floorIndex;
|
|
4402
|
+
return;
|
|
4403
|
+
}
|
|
4404
|
+
// 模型楼层高亮改变时,自动进行楼层切换
|
|
4420
4405
|
this.floorIndex = shownFloor;
|
|
4421
4406
|
this.updateSize();
|
|
4422
4407
|
this.render();
|
|
4423
4408
|
}
|
|
4424
4409
|
});
|
|
4425
|
-
|
|
4426
|
-
Object.defineProperty(this, "handlePanoArrived", {
|
|
4410
|
+
Object.defineProperty(this, "onFivePanoArrived", {
|
|
4427
4411
|
enumerable: true,
|
|
4428
4412
|
configurable: true,
|
|
4429
4413
|
writable: true,
|
|
@@ -4435,31 +4419,28 @@ class TopviewFloorplanPluginController {
|
|
|
4435
4419
|
this.floorIndex = this.five.work.observers[index].floorIndex;
|
|
4436
4420
|
}
|
|
4437
4421
|
});
|
|
4438
|
-
|
|
4439
|
-
Object.defineProperty(this, "handleWantsMoveToPano", {
|
|
4422
|
+
Object.defineProperty(this, "onFivePanGesture", {
|
|
4440
4423
|
enumerable: true,
|
|
4441
4424
|
configurable: true,
|
|
4442
4425
|
writable: true,
|
|
4443
4426
|
value: () => {
|
|
4444
4427
|
if (!this.visible)
|
|
4445
4428
|
return;
|
|
4446
|
-
|
|
4447
|
-
return false;
|
|
4448
|
-
return;
|
|
4429
|
+
this.updatePosition();
|
|
4449
4430
|
}
|
|
4450
4431
|
});
|
|
4451
|
-
|
|
4452
|
-
Object.defineProperty(this, "handleWantsPanGesture", {
|
|
4432
|
+
Object.defineProperty(this, "onFivePinchGesture", {
|
|
4453
4433
|
enumerable: true,
|
|
4454
4434
|
configurable: true,
|
|
4455
4435
|
writable: true,
|
|
4456
4436
|
value: () => {
|
|
4457
4437
|
if (!this.visible)
|
|
4458
4438
|
return;
|
|
4459
|
-
|
|
4439
|
+
this.updatePosition();
|
|
4440
|
+
this.updateSize();
|
|
4460
4441
|
}
|
|
4461
4442
|
});
|
|
4462
|
-
Object.defineProperty(this, "
|
|
4443
|
+
Object.defineProperty(this, "onFiveModelLoaded", {
|
|
4463
4444
|
enumerable: true,
|
|
4464
4445
|
configurable: true,
|
|
4465
4446
|
writable: true,
|
|
@@ -4476,7 +4457,7 @@ class TopviewFloorplanPluginController {
|
|
|
4476
4457
|
}
|
|
4477
4458
|
});
|
|
4478
4459
|
/** 非 Topview 态隐藏户型图 */
|
|
4479
|
-
Object.defineProperty(this, "
|
|
4460
|
+
Object.defineProperty(this, "onFiveModeChange", {
|
|
4480
4461
|
enumerable: true,
|
|
4481
4462
|
configurable: true,
|
|
4482
4463
|
writable: true,
|
|
@@ -4486,7 +4467,7 @@ class TopviewFloorplanPluginController {
|
|
|
4486
4467
|
}
|
|
4487
4468
|
});
|
|
4488
4469
|
/** 动画结束后是 Topview 态就展示户型图 */
|
|
4489
|
-
Object.defineProperty(this, "
|
|
4470
|
+
Object.defineProperty(this, "onFiveInitAnimationEnded", {
|
|
4490
4471
|
enumerable: true,
|
|
4491
4472
|
configurable: true,
|
|
4492
4473
|
writable: true,
|
|
@@ -4526,24 +4507,30 @@ class TopviewFloorplanPluginController {
|
|
|
4526
4507
|
this.five = five;
|
|
4527
4508
|
this.selector = params.selector;
|
|
4528
4509
|
this.configs = omit(params, ['selector']);
|
|
4510
|
+
this.five.addExtraElement(this.container);
|
|
4529
4511
|
// 设置 container 样式
|
|
4530
4512
|
this.container.classList.add('floorplan-plugin');
|
|
4531
4513
|
Object.assign(this.container.style, pluginStyle$1);
|
|
4532
4514
|
// 如果初始化的时候模型已经加载完毕了,就不用再等 modelLoaded
|
|
4533
|
-
this.five.model.loaded
|
|
4515
|
+
this.five.model.loaded
|
|
4516
|
+
? this.onFiveModelLoaded()
|
|
4517
|
+
: five.once('modelLoaded', this.onFiveModelLoaded);
|
|
4534
4518
|
this.five.once('dispose', this.dispose);
|
|
4535
|
-
this.five.on('modeChange', this.
|
|
4536
|
-
this.five.on('
|
|
4537
|
-
this.five.on('
|
|
4519
|
+
this.five.on('modeChange', this.onFiveModeChange);
|
|
4520
|
+
this.five.on('panGesture', this.onFivePanGesture);
|
|
4521
|
+
this.five.on('mouseWheel', this.onFivePinchGesture);
|
|
4522
|
+
this.five.on('panoArrived', this.onFivePanoArrived);
|
|
4523
|
+
this.five.on('pinchGesture', this.onFivePinchGesture);
|
|
4524
|
+
this.five.on('wantsGesture', this.onFiveWantsGesture);
|
|
4525
|
+
this.five.on('wantsMoveToPano', this.onFiveWantsMoveToPano);
|
|
4526
|
+
this.five.on('initAnimationEnded', this.onFiveInitAnimationEnded);
|
|
4538
4527
|
this.five.on('modelShownFloorChange', this.onModelShownFloorChange);
|
|
4539
4528
|
}
|
|
4540
4529
|
/** 加载户型图数据 */
|
|
4541
|
-
load(data) {
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
this.render();
|
|
4546
|
-
});
|
|
4530
|
+
async load(data) {
|
|
4531
|
+
const copyData = JSON.parse(JSON.stringify(data));
|
|
4532
|
+
this.floorplanData = await formatData(copyData);
|
|
4533
|
+
this.render();
|
|
4547
4534
|
}
|
|
4548
4535
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
4549
4536
|
appendTo(wrapper) {
|
|
@@ -4554,6 +4541,7 @@ class TopviewFloorplanPluginController {
|
|
|
4554
4541
|
show() {
|
|
4555
4542
|
this.visible = true;
|
|
4556
4543
|
this.five.model.show(this.floorIndex);
|
|
4544
|
+
this.updatePosition();
|
|
4557
4545
|
this.updateSize();
|
|
4558
4546
|
const renderDuration = 500;
|
|
4559
4547
|
const modelOpacity = this.configs.modelOpacity;
|
|
@@ -4561,8 +4549,6 @@ class TopviewFloorplanPluginController {
|
|
|
4561
4549
|
changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
|
|
4562
4550
|
}
|
|
4563
4551
|
this.render(renderDuration);
|
|
4564
|
-
this.five.on('wantsMoveToPano', this.handleWantsMoveToPano);
|
|
4565
|
-
this.five.on('wantsPanGesture', this.handleWantsPanGesture);
|
|
4566
4552
|
}
|
|
4567
4553
|
hide() {
|
|
4568
4554
|
const modelOpacity = 1;
|
|
@@ -4570,20 +4556,28 @@ class TopviewFloorplanPluginController {
|
|
|
4570
4556
|
this.visible = false;
|
|
4571
4557
|
changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
|
|
4572
4558
|
this.render();
|
|
4573
|
-
|
|
4574
|
-
|
|
4559
|
+
}
|
|
4560
|
+
/** 更新户型图位置 */
|
|
4561
|
+
updatePosition() {
|
|
4562
|
+
var _a;
|
|
4563
|
+
const modelCenter = (_a = this.five.model) === null || _a === void 0 ? void 0 : _a.bounding.getCenter(new THREE.Vector3());
|
|
4564
|
+
if (!modelCenter)
|
|
4565
|
+
return;
|
|
4566
|
+
const ndcModelCenter = modelCenter.clone().project(this.five.camera);
|
|
4567
|
+
const left = (ndcModelCenter.x + 1) / 2;
|
|
4568
|
+
const top = -(ndcModelCenter.y - 1) / 2;
|
|
4569
|
+
this.container.style.left = left * 100 + '%';
|
|
4570
|
+
this.container.style.top = top * 100 + '%';
|
|
4575
4571
|
}
|
|
4576
4572
|
render(duration) {
|
|
4577
4573
|
if (!this.container || !this.floorplanData)
|
|
4578
4574
|
return;
|
|
4579
4575
|
if (this.size.width === 0)
|
|
4580
4576
|
return;
|
|
4581
|
-
const { northDesc, getLabelElement, cameraImageUrl,
|
|
4582
|
-
const handleClick = preventRoomClick ? () => false : undefined;
|
|
4577
|
+
const { northDesc, getLabelElement, cameraImageUrl, hoverEnable, compassEnable, roomLabelsEnable, ruleLabelsEnable, } = this.configs;
|
|
4583
4578
|
const props = {
|
|
4579
|
+
getLabelElement,
|
|
4584
4580
|
northDesc: northDesc !== null && northDesc !== void 0 ? northDesc : '北',
|
|
4585
|
-
five: this.five,
|
|
4586
|
-
pxmm: this.pxmm,
|
|
4587
4581
|
cameraImageUrl,
|
|
4588
4582
|
visible: this.visible,
|
|
4589
4583
|
duration: duration !== null && duration !== void 0 ? duration : 0,
|
|
@@ -4595,8 +4589,6 @@ class TopviewFloorplanPluginController {
|
|
|
4595
4589
|
ruleLabelsEnable: ruleLabelsEnable !== null && ruleLabelsEnable !== void 0 ? ruleLabelsEnable : true,
|
|
4596
4590
|
roomLabelsEnable: roomLabelsEnable !== null && roomLabelsEnable !== void 0 ? roomLabelsEnable : true,
|
|
4597
4591
|
lastPanoramaLongitude: this.lastPanoramaLongitude,
|
|
4598
|
-
getLabelElement,
|
|
4599
|
-
onRoomHeightClick: handleClick,
|
|
4600
4592
|
};
|
|
4601
4593
|
if (!this.app) {
|
|
4602
4594
|
this.app = new Main$1({
|
|
@@ -4637,7 +4629,7 @@ function throttle(func, wait = 200) {
|
|
|
4637
4629
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte generated by Svelte v3.47.0 */
|
|
4638
4630
|
|
|
4639
4631
|
function add_css$6(target) {
|
|
4640
|
-
append_styles(target, "svelte-
|
|
4632
|
+
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%}");
|
|
4641
4633
|
}
|
|
4642
4634
|
|
|
4643
4635
|
function create_fragment$7(ctx) {
|
|
@@ -4650,12 +4642,12 @@ function create_fragment$7(ctx) {
|
|
|
4650
4642
|
div2 = element("div");
|
|
4651
4643
|
div1 = element("div");
|
|
4652
4644
|
div0 = element("div");
|
|
4653
|
-
attr(div0, "class", "plugin-radar__camera-rotate svelte-
|
|
4645
|
+
attr(div0, "class", "plugin-radar__camera-rotate svelte-1ty3s4p");
|
|
4654
4646
|
set_style(div0, "background-image", "url(" + (/*cameraImageUrl*/ ctx[0] || CAMERA_IMAGE) + ")");
|
|
4655
4647
|
set_style(div0, "transform", /*rotateTransform*/ ctx[1], false);
|
|
4656
|
-
attr(div1, "class", "plugin-radar__camera-position svelte-
|
|
4648
|
+
attr(div1, "class", "plugin-radar__camera-position svelte-1ty3s4p");
|
|
4657
4649
|
set_style(div1, "transform", /*positionTransform*/ ctx[2], false);
|
|
4658
|
-
attr(div2, "class", "plugin-radar__camera-wrapper svelte-
|
|
4650
|
+
attr(div2, "class", "plugin-radar__camera-wrapper svelte-1ty3s4p");
|
|
4659
4651
|
},
|
|
4660
4652
|
m(target, anchor) {
|
|
4661
4653
|
insert(target, div2, anchor);
|
|
@@ -4771,7 +4763,7 @@ class Camera extends SvelteComponent {
|
|
|
4771
4763
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte generated by Svelte v3.47.0 */
|
|
4772
4764
|
|
|
4773
4765
|
function add_css$5(target) {
|
|
4774
|
-
append_styles(target, "svelte-
|
|
4766
|
+
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%)}");
|
|
4775
4767
|
}
|
|
4776
4768
|
|
|
4777
4769
|
function get_each_context$2(ctx, list, i) {
|
|
@@ -4797,11 +4789,11 @@ function create_each_block$2(key_1, ctx) {
|
|
|
4797
4789
|
div1 = element("div");
|
|
4798
4790
|
div0 = element("div");
|
|
4799
4791
|
t = space();
|
|
4800
|
-
attr(div0, "class", "plugin-pano-floorplan__extra-object-item svelte-
|
|
4792
|
+
attr(div0, "class", "plugin-pano-floorplan__extra-object-item svelte-1i87fz7");
|
|
4801
4793
|
set_style(div0, "background-image", `url(${/*extraObject*/ ctx[1].icon.url})`);
|
|
4802
4794
|
set_style(div0, "width", style_width, false);
|
|
4803
4795
|
set_style(div0, "height", style_height, false);
|
|
4804
|
-
attr(div1, "class", "plugin-pano-floorplan__extra-object-item--position svelte-
|
|
4796
|
+
attr(div1, "class", "plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7");
|
|
4805
4797
|
set_style(div1, "top", style_top, false);
|
|
4806
4798
|
set_style(div1, "left", style_left, false);
|
|
4807
4799
|
this.first = div1;
|
|
@@ -4861,7 +4853,7 @@ function create_fragment$6(ctx) {
|
|
|
4861
4853
|
each_blocks[i].c();
|
|
4862
4854
|
}
|
|
4863
4855
|
|
|
4864
|
-
attr(div, "class", "plugin-pano-floorplan__extra-objects svelte-
|
|
4856
|
+
attr(div, "class", "plugin-pano-floorplan__extra-objects svelte-1i87fz7");
|
|
4865
4857
|
},
|
|
4866
4858
|
m(target, anchor) {
|
|
4867
4859
|
insert(target, div, anchor);
|
|
@@ -5135,7 +5127,7 @@ class CurrentFloor extends SvelteComponent {
|
|
|
5135
5127
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte generated by Svelte v3.47.0 */
|
|
5136
5128
|
|
|
5137
5129
|
function add_css$4(target) {
|
|
5138
|
-
append_styles(target, "svelte-
|
|
5130
|
+
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}");
|
|
5139
5131
|
}
|
|
5140
5132
|
|
|
5141
5133
|
// (41:2) {#if clientWidth !== 0}
|
|
@@ -5190,7 +5182,7 @@ function create_if_block(ctx) {
|
|
|
5190
5182
|
create_component(currentfloor.$$.fragment);
|
|
5191
5183
|
t = space();
|
|
5192
5184
|
create_component(camera.$$.fragment);
|
|
5193
|
-
attr(div, "class", "plugin-floorplan-radar-container svelte-
|
|
5185
|
+
attr(div, "class", "plugin-floorplan-radar-container svelte-1mvqyqq");
|
|
5194
5186
|
set_style(div, "width", style_width, false);
|
|
5195
5187
|
set_style(div, "height", style_height, false);
|
|
5196
5188
|
},
|
|
@@ -5267,7 +5259,7 @@ function create_fragment$4(ctx) {
|
|
|
5267
5259
|
c() {
|
|
5268
5260
|
div = element("div");
|
|
5269
5261
|
if (if_block) if_block.c();
|
|
5270
|
-
attr(div, "class", "plugin-floorplan-radar svelte-
|
|
5262
|
+
attr(div, "class", "plugin-floorplan-radar svelte-1mvqyqq");
|
|
5271
5263
|
add_render_callback(() => /*div_elementresize_handler*/ ctx[11].call(div));
|
|
5272
5264
|
},
|
|
5273
5265
|
m(target, anchor) {
|
|
@@ -5478,9 +5470,9 @@ class PanoFloorplanRadarPluginController {
|
|
|
5478
5470
|
enumerable: true,
|
|
5479
5471
|
configurable: true,
|
|
5480
5472
|
writable: true,
|
|
5481
|
-
value: (data) =>
|
|
5473
|
+
value: async (data) => {
|
|
5482
5474
|
const copyData = JSON.parse(JSON.stringify(data));
|
|
5483
|
-
const floorplanData =
|
|
5475
|
+
const floorplanData = await formatData(copyData);
|
|
5484
5476
|
this.data = floorplanData;
|
|
5485
5477
|
// const loadImage = async () => {
|
|
5486
5478
|
// const floorIndex = this.five.work.observers[this.five.getCurrentState().panoIndex].floorIndex
|
|
@@ -5498,7 +5490,7 @@ class PanoFloorplanRadarPluginController {
|
|
|
5498
5490
|
// }
|
|
5499
5491
|
// await loadImage()
|
|
5500
5492
|
this.render();
|
|
5501
|
-
}
|
|
5493
|
+
}
|
|
5502
5494
|
});
|
|
5503
5495
|
this.five = five;
|
|
5504
5496
|
(params === null || params === void 0 ? void 0 : params.configs) && Object.assign(this.configs, params.configs);
|
|
@@ -5558,24 +5550,37 @@ const PanoFloorplanRadarPlugin = (five, params) => {
|
|
|
5558
5550
|
return new PanoFloorplanRadarPluginController(five, params);
|
|
5559
5551
|
};
|
|
5560
5552
|
|
|
5553
|
+
var FloorplanErrorType;
|
|
5554
|
+
(function (FloorplanErrorType) {
|
|
5555
|
+
FloorplanErrorType["UnknownError"] = "UnknowError";
|
|
5556
|
+
FloorplanErrorType["DataNotLoaded"] = "DataNotLoaded";
|
|
5557
|
+
FloorplanErrorType["BreakOffByHide"] = "BreakOffByHide";
|
|
5558
|
+
FloorplanErrorType["ModelNotLoaded"] = "ModelNotLoaded";
|
|
5559
|
+
FloorplanErrorType["ChangeModeError"] = "ChangeModeError";
|
|
5560
|
+
FloorplanErrorType["UpdateCameraError"] = "UpdateCameraError";
|
|
5561
|
+
FloorplanErrorType["DifferentShowParams"] = "DifferentShowParams";
|
|
5562
|
+
})(FloorplanErrorType || (FloorplanErrorType = {}));
|
|
5563
|
+
/** 户型图展示 & 模型消失的默认时间 */
|
|
5564
|
+
const SHOW_ANIME_DURATION = 500;
|
|
5565
|
+
/** Five camera 默认 fov */
|
|
5566
|
+
const FIVE_CAMERA_DEFAULT_FOV = 80;
|
|
5567
|
+
|
|
5561
5568
|
/**
|
|
5562
5569
|
* 传入一个 Promise
|
|
5563
5570
|
* 无异常,返回 [null, data]
|
|
5564
5571
|
* 有异常,则返回 [Error, undefined]
|
|
5565
5572
|
* 用于替代 try&catch 处理 await 异常的方案
|
|
5566
5573
|
*/
|
|
5567
|
-
function to(promise) {
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
}
|
|
5578
|
-
});
|
|
5574
|
+
async function to(promise) {
|
|
5575
|
+
try {
|
|
5576
|
+
const data = await promise;
|
|
5577
|
+
return [null, data];
|
|
5578
|
+
}
|
|
5579
|
+
catch (error) {
|
|
5580
|
+
if (error instanceof Error)
|
|
5581
|
+
return [error, null];
|
|
5582
|
+
return [new Error(''), null];
|
|
5583
|
+
}
|
|
5579
5584
|
}
|
|
5580
5585
|
|
|
5581
5586
|
/**
|
|
@@ -5683,38 +5688,21 @@ function equal(value, other, opt = { deep: false }) {
|
|
|
5683
5688
|
return isDeepEqual(value, other);
|
|
5684
5689
|
}
|
|
5685
5690
|
|
|
5686
|
-
function changeMode(five, ...changeModeParams) {
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
five.on('modeChange', handleModeChange);
|
|
5699
|
-
});
|
|
5691
|
+
async function changeMode(five, ...changeModeParams) {
|
|
5692
|
+
const [changeModeError] = await to(five.changeMode(...changeModeParams));
|
|
5693
|
+
if (changeModeError)
|
|
5694
|
+
throw changeModeError;
|
|
5695
|
+
await new Promise((reslove, reject) => {
|
|
5696
|
+
five.once('initAnimationEnded', reslove);
|
|
5697
|
+
const handleModeChange = (mode) => {
|
|
5698
|
+
if (mode !== changeModeParams[0])
|
|
5699
|
+
reject('changeMode 被中断');
|
|
5700
|
+
five.off('modeChange', handleModeChange);
|
|
5701
|
+
};
|
|
5702
|
+
five.on('modeChange', handleModeChange);
|
|
5700
5703
|
});
|
|
5701
5704
|
}
|
|
5702
5705
|
|
|
5703
|
-
var FloorplanErrorType;
|
|
5704
|
-
(function (FloorplanErrorType) {
|
|
5705
|
-
FloorplanErrorType["UnknownError"] = "UnknowError";
|
|
5706
|
-
FloorplanErrorType["DataNotLoaded"] = "DataNotLoaded";
|
|
5707
|
-
FloorplanErrorType["BreakOffByHide"] = "BreakOffByHide";
|
|
5708
|
-
FloorplanErrorType["ModelNotLoaded"] = "ModelNotLoaded";
|
|
5709
|
-
FloorplanErrorType["ChangeModeError"] = "ChangeModeError";
|
|
5710
|
-
FloorplanErrorType["UpdateCameraError"] = "UpdateCameraError";
|
|
5711
|
-
FloorplanErrorType["DifferentShowParams"] = "DifferentShowParams";
|
|
5712
|
-
})(FloorplanErrorType || (FloorplanErrorType = {}));
|
|
5713
|
-
/** 户型图展示 & 模型消失的默认时间 */
|
|
5714
|
-
const SHOW_ANIME_DURATION = 500;
|
|
5715
|
-
/** Five camera 默认 fov */
|
|
5716
|
-
const FIVE_CAMERA_DEFAULT_FOV = 80;
|
|
5717
|
-
|
|
5718
5706
|
/**
|
|
5719
5707
|
* 比较两个数字近似相等
|
|
5720
5708
|
* @param num1 数字1
|
|
@@ -5741,32 +5729,30 @@ function checkShowState(five, showState) {
|
|
|
5741
5729
|
* 2. 内置了相应的动画时间计算
|
|
5742
5730
|
* 3. 纠正成功会返回 true,失败「可能会被用户行为中断」会返回 false
|
|
5743
5731
|
*/
|
|
5744
|
-
function correctFiveState(five, showState, userAction = true) {
|
|
5745
|
-
|
|
5746
|
-
|
|
5732
|
+
async function correctFiveState(five, showState, userAction = true) {
|
|
5733
|
+
// 当前已满足状态,不需要变更
|
|
5734
|
+
const result = checkShowState(five, showState);
|
|
5735
|
+
if (result === true)
|
|
5736
|
+
return;
|
|
5737
|
+
// 纠正 mode
|
|
5738
|
+
if (five.currentMode !== Five.Mode.Floorplan) {
|
|
5739
|
+
const [changeModeError] = await to(changeMode(five, Five.Mode.Floorplan, showState, undefined, userAction));
|
|
5740
|
+
if (changeModeError)
|
|
5741
|
+
throw changeModeError;
|
|
5742
|
+
// changeMode 是异步行为,可能会被打断,需要在结束后加一次判断
|
|
5747
5743
|
const result = checkShowState(five, showState);
|
|
5748
|
-
if (result ===
|
|
5749
|
-
|
|
5750
|
-
// 纠正 mode
|
|
5751
|
-
if (five.currentMode !== Five.Mode.Floorplan) {
|
|
5752
|
-
const [changeModeError] = yield to(changeMode(five, Five.Mode.Floorplan, showState, undefined, userAction));
|
|
5753
|
-
if (changeModeError)
|
|
5754
|
-
throw changeModeError;
|
|
5755
|
-
// changeMode 是异步行为,可能会被打断,需要在结束后加一次判断
|
|
5756
|
-
const result = checkShowState(five, showState);
|
|
5757
|
-
if (result === false)
|
|
5758
|
-
throw new Error(FloorplanErrorType.ChangeModeError);
|
|
5759
|
-
return;
|
|
5760
|
-
}
|
|
5761
|
-
// 纠正相机状态
|
|
5762
|
-
// 根据 latitude、longitude、fov 计算动画时间,最多 1s
|
|
5763
|
-
const { latitude, longitude, fov } = five.getCurrentState();
|
|
5764
|
-
const time = Math.min(1000, Math.max(200, Math.abs(latitude - Math.PI / 2) * 1000, (longitude > Math.PI ? 2 * Math.PI - longitude : longitude) * 500, Math.abs(fov - showState.fov) * 10));
|
|
5765
|
-
const [updateCameraError] = yield to(five.updateCamera(showState, time, userAction));
|
|
5766
|
-
if (updateCameraError)
|
|
5767
|
-
throw new Error(FloorplanErrorType.UpdateCameraError);
|
|
5744
|
+
if (result === false)
|
|
5745
|
+
throw new Error(FloorplanErrorType.ChangeModeError);
|
|
5768
5746
|
return;
|
|
5769
|
-
}
|
|
5747
|
+
}
|
|
5748
|
+
// 纠正相机状态
|
|
5749
|
+
// 根据 latitude、longitude、fov 计算动画时间,最多 1s
|
|
5750
|
+
const { latitude, longitude, fov } = five.getCurrentState();
|
|
5751
|
+
const time = Math.min(1000, Math.max(200, Math.abs(latitude - Math.PI / 2) * 1000, (longitude > Math.PI ? 2 * Math.PI - longitude : longitude) * 500, Math.abs(fov - showState.fov) * 10));
|
|
5752
|
+
const [updateCameraError] = await to(five.updateCamera(showState, time, userAction));
|
|
5753
|
+
if (updateCameraError)
|
|
5754
|
+
throw new Error(FloorplanErrorType.UpdateCameraError);
|
|
5755
|
+
return;
|
|
5770
5756
|
}
|
|
5771
5757
|
|
|
5772
5758
|
const MODEL_FLOORPLAN_PLUGIN_NAME = 'modelFloorplanPlugin';
|
|
@@ -5955,12 +5941,12 @@ class ModelFloorplanPluginController {
|
|
|
5955
5941
|
enumerable: true,
|
|
5956
5942
|
configurable: true,
|
|
5957
5943
|
writable: true,
|
|
5958
|
-
value: (opts) =>
|
|
5959
|
-
var
|
|
5944
|
+
value: async (opts) => {
|
|
5945
|
+
var _a, _b;
|
|
5960
5946
|
// 已经在展示中了
|
|
5961
5947
|
if (!this.showPromise && this.visible)
|
|
5962
5948
|
return true;
|
|
5963
|
-
if (!((
|
|
5949
|
+
if (!((_a = this.five.model) === null || _a === void 0 ? void 0 : _a.loaded))
|
|
5964
5950
|
throw new Error(FloorplanErrorType.ModelNotLoaded);
|
|
5965
5951
|
if (!this.floorplanData)
|
|
5966
5952
|
throw new Error(FloorplanErrorType.DataNotLoaded);
|
|
@@ -5970,18 +5956,18 @@ class ModelFloorplanPluginController {
|
|
|
5970
5956
|
if (!!this.showPromise && sameWithLastOpts)
|
|
5971
5957
|
return this.showPromise;
|
|
5972
5958
|
if (!!this.showPromise && !sameWithLastOpts)
|
|
5973
|
-
(
|
|
5959
|
+
(_b = this.showRejection) === null || _b === void 0 ? void 0 : _b.call(this, FloorplanErrorType.DifferentShowParams);
|
|
5974
5960
|
}
|
|
5975
5961
|
this.ModelFloorplanPluginsShowOpts = opts;
|
|
5976
|
-
const getShowPromise = () =>
|
|
5977
|
-
var
|
|
5962
|
+
const getShowPromise = async () => {
|
|
5963
|
+
var _a, _b;
|
|
5978
5964
|
let hasRejected = false;
|
|
5979
5965
|
let externalErrorMsg;
|
|
5980
5966
|
this.showRejection = (errorMsg) => {
|
|
5981
5967
|
hasRejected = true;
|
|
5982
5968
|
externalErrorMsg = errorMsg;
|
|
5983
5969
|
};
|
|
5984
|
-
const [correctError] =
|
|
5970
|
+
const [correctError] = await to(correctFiveState(this.five, this.showState, opts === null || opts === void 0 ? void 0 : opts.userAction));
|
|
5985
5971
|
if (correctError)
|
|
5986
5972
|
throw correctError;
|
|
5987
5973
|
// 异步结束要判断当前是不是被中断了,是不是调用了隐藏
|
|
@@ -6000,7 +5986,7 @@ class ModelFloorplanPluginController {
|
|
|
6000
5986
|
this.floorIndex = opts.floorIndex;
|
|
6001
5987
|
this.five.model.show(this.floorIndex);
|
|
6002
5988
|
// 模型消失, 渲染户型图
|
|
6003
|
-
const modelOpacity = (
|
|
5989
|
+
const modelOpacity = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.modelOpacity) !== null && _a !== void 0 ? _a : this.configs.modelOpacity) !== null && _b !== void 0 ? _b : 1;
|
|
6004
5990
|
const renderDuration = (opts === null || opts === void 0 ? void 0 : opts.immediately) ? 0 : SHOW_ANIME_DURATION;
|
|
6005
5991
|
changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
|
|
6006
5992
|
this.render(renderDuration);
|
|
@@ -6008,7 +5994,7 @@ class ModelFloorplanPluginController {
|
|
|
6008
5994
|
this.five.on('wantsGesture', this.handleWantsGesture);
|
|
6009
5995
|
this.five.on('wantsTapGesture', this.handleWantsTapGesture);
|
|
6010
5996
|
return true;
|
|
6011
|
-
}
|
|
5997
|
+
};
|
|
6012
5998
|
const showPromise = getShowPromise()
|
|
6013
5999
|
.then(() => {
|
|
6014
6000
|
var _a;
|
|
@@ -6030,7 +6016,7 @@ class ModelFloorplanPluginController {
|
|
|
6030
6016
|
});
|
|
6031
6017
|
this.showPromise = showPromise;
|
|
6032
6018
|
return showPromise;
|
|
6033
|
-
}
|
|
6019
|
+
}
|
|
6034
6020
|
});
|
|
6035
6021
|
/** 隐藏户型图 */
|
|
6036
6022
|
Object.defineProperty(this, "hide", {
|
|
@@ -6060,8 +6046,13 @@ class ModelFloorplanPluginController {
|
|
|
6060
6046
|
configurable: true,
|
|
6061
6047
|
writable: true,
|
|
6062
6048
|
value: (shownFloor) => {
|
|
6063
|
-
if (
|
|
6049
|
+
if (this.floorIndex === shownFloor)
|
|
6064
6050
|
return;
|
|
6051
|
+
if (shownFloor === null) {
|
|
6052
|
+
const panoIndex = this.five.getCurrentState().panoIndex;
|
|
6053
|
+
this.floorIndex = this.five.work.observers[panoIndex].floorIndex;
|
|
6054
|
+
return;
|
|
6055
|
+
}
|
|
6065
6056
|
this.floorIndex = shownFloor;
|
|
6066
6057
|
this.updateSize();
|
|
6067
6058
|
this.render();
|
|
@@ -6174,7 +6165,9 @@ class ModelFloorplanPluginController {
|
|
|
6174
6165
|
enumerable: true,
|
|
6175
6166
|
configurable: true,
|
|
6176
6167
|
writable: true,
|
|
6177
|
-
value: ({ latitude, longitude }, isFinal) =>
|
|
6168
|
+
value: async ({ latitude, longitude }, isFinal) => {
|
|
6169
|
+
if (this.five.getCurrentState().mode !== 'Floorplan')
|
|
6170
|
+
return;
|
|
6178
6171
|
if (this.configs.autoShowEnable === false)
|
|
6179
6172
|
return;
|
|
6180
6173
|
// 如果操作结束后,户型图还在展示中,初始化模型状态
|
|
@@ -6195,16 +6188,16 @@ class ModelFloorplanPluginController {
|
|
|
6195
6188
|
const longitudeVisible = longitude < 30 * (Math.PI / 180) || longitude > 330 * (Math.PI / 180);
|
|
6196
6189
|
if (isFinal && !this.visible && latitudeVisible && longitudeVisible) {
|
|
6197
6190
|
// 当手指离开时需要等惯性结束之后在进行判断
|
|
6198
|
-
const handleInteriaPan = (any, isFinal) =>
|
|
6191
|
+
const handleInteriaPan = async (any, isFinal) => {
|
|
6199
6192
|
if (!isFinal)
|
|
6200
6193
|
return;
|
|
6201
6194
|
this.five.off('interiaPan', handleInteriaPan);
|
|
6202
|
-
|
|
6203
|
-
}
|
|
6195
|
+
await this.show({ isAutoShow: true });
|
|
6196
|
+
};
|
|
6204
6197
|
this.five.on('interiaPan', handleInteriaPan);
|
|
6205
6198
|
return;
|
|
6206
6199
|
}
|
|
6207
|
-
}
|
|
6200
|
+
}
|
|
6208
6201
|
});
|
|
6209
6202
|
this.five = five;
|
|
6210
6203
|
this.hooks = new Subscribe();
|
|
@@ -6218,9 +6211,9 @@ class ModelFloorplanPluginController {
|
|
|
6218
6211
|
left: '50%',
|
|
6219
6212
|
top: '50%',
|
|
6220
6213
|
transform: 'translate(-50%, -50%)',
|
|
6221
|
-
pointerEvents: 'none',
|
|
6222
6214
|
zIndex: 10,
|
|
6223
6215
|
});
|
|
6216
|
+
this.five.addExtraElement(this.container);
|
|
6224
6217
|
// 如果初始化的时候模型已经加载完毕了,就不用再等 modelLoaded
|
|
6225
6218
|
this.five.model.loaded ? this.handleModelLoaded() : five.once('modelLoaded', this.handleModelLoaded);
|
|
6226
6219
|
five.once('dispose', this.dispose);
|
|
@@ -6231,12 +6224,10 @@ class ModelFloorplanPluginController {
|
|
|
6231
6224
|
five.on('modelShownFloorChange', this.onModelShownFloorChange);
|
|
6232
6225
|
}
|
|
6233
6226
|
/** 加载户型图数据 */
|
|
6234
|
-
load(data) {
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
this.render();
|
|
6239
|
-
});
|
|
6227
|
+
async load(data) {
|
|
6228
|
+
const copyData = JSON.parse(JSON.stringify(data));
|
|
6229
|
+
this.floorplanData = await formatData(copyData);
|
|
6230
|
+
this.render();
|
|
6240
6231
|
}
|
|
6241
6232
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
6242
6233
|
appendTo(wrapper) {
|
|
@@ -6247,8 +6238,6 @@ class ModelFloorplanPluginController {
|
|
|
6247
6238
|
/** 更改户型图楼层 */
|
|
6248
6239
|
changeFloor(floorIndex) {
|
|
6249
6240
|
this.five.model.show(floorIndex);
|
|
6250
|
-
this.floorIndex = floorIndex;
|
|
6251
|
-
this.render();
|
|
6252
6241
|
}
|
|
6253
6242
|
changeConfigs(params) {
|
|
6254
6243
|
Object.assign(this.configs, params);
|
|
@@ -6263,10 +6252,9 @@ class ModelFloorplanPluginController {
|
|
|
6263
6252
|
return;
|
|
6264
6253
|
const { northDesc, hoverEnable, cameraImageUrl, getLabelElement, roomLabelsEnable, compassEnable, ruleLabelsEnable } = this.configs;
|
|
6265
6254
|
const props = {
|
|
6266
|
-
northDesc: northDesc !== null && northDesc !== void 0 ? northDesc : '北',
|
|
6267
|
-
five: this.five,
|
|
6268
|
-
pxmm: this.pxmm,
|
|
6269
6255
|
cameraImageUrl,
|
|
6256
|
+
getLabelElement,
|
|
6257
|
+
northDesc: northDesc !== null && northDesc !== void 0 ? northDesc : '北',
|
|
6270
6258
|
visible: this.visible,
|
|
6271
6259
|
duration: duration !== null && duration !== void 0 ? duration : 0,
|
|
6272
6260
|
panoIndex: this.panoIndex,
|
|
@@ -6277,8 +6265,6 @@ class ModelFloorplanPluginController {
|
|
|
6277
6265
|
ruleLabelsEnable: ruleLabelsEnable !== null && ruleLabelsEnable !== void 0 ? ruleLabelsEnable : true,
|
|
6278
6266
|
roomLabelsEnable: roomLabelsEnable !== null && roomLabelsEnable !== void 0 ? roomLabelsEnable : true,
|
|
6279
6267
|
lastPanoramaLongitude: this.lastPanoramaLongitude,
|
|
6280
|
-
getLabelElement,
|
|
6281
|
-
onRoomHeightClick: this.handleClick,
|
|
6282
6268
|
};
|
|
6283
6269
|
if (!this.app) {
|
|
6284
6270
|
this.app = new Main$1({
|
|
@@ -6348,7 +6334,7 @@ const ModelChassisCompassPlugin = (five, params) => {
|
|
|
6348
6334
|
const defaultNorthRad = params.north_rad || undefined;
|
|
6349
6335
|
// 局部状态
|
|
6350
6336
|
const state = {};
|
|
6351
|
-
const load = (data) =>
|
|
6337
|
+
const load = async (data) => {
|
|
6352
6338
|
const fbxUrl = (data === null || data === void 0 ? void 0 : data.fbx_url) || defaultFbxUrl;
|
|
6353
6339
|
const northRad = (data === null || data === void 0 ? void 0 : data.north_rad) || defaultNorthRad;
|
|
6354
6340
|
if (!northRad) {
|
|
@@ -6359,7 +6345,7 @@ const ModelChassisCompassPlugin = (five, params) => {
|
|
|
6359
6345
|
const zOffset = bounding.max.z - bounding.min.z;
|
|
6360
6346
|
const maxOffset = Math.max(xOffset, zOffset);
|
|
6361
6347
|
const fbxLoader = new FBXLoader();
|
|
6362
|
-
const object =
|
|
6348
|
+
const object = await fbxLoader.loadAsync(fbxUrl);
|
|
6363
6349
|
transfromToMeshBasicMaterial(object, {
|
|
6364
6350
|
transparent: true,
|
|
6365
6351
|
side: THREE.DoubleSide,
|
|
@@ -6373,7 +6359,7 @@ const ModelChassisCompassPlugin = (five, params) => {
|
|
|
6373
6359
|
bject3d2LocalMatrix(object, { position, rotation, scale });
|
|
6374
6360
|
state.object = object;
|
|
6375
6361
|
return true;
|
|
6376
|
-
}
|
|
6362
|
+
};
|
|
6377
6363
|
const onCameraUpdate = ({ latitude }) => {
|
|
6378
6364
|
if (!state.object)
|
|
6379
6365
|
return;
|
|
@@ -6443,25 +6429,25 @@ const ModelEntryDoorGuidePlugin = (five, params) => {
|
|
|
6443
6429
|
const defaultRad = (_c = params.rad) !== null && _c !== void 0 ? _c : undefined;
|
|
6444
6430
|
const defaultFbxUrl = params.fbx_url || '//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx';
|
|
6445
6431
|
const mixers = [];
|
|
6446
|
-
const load = (data) =>
|
|
6447
|
-
var
|
|
6448
|
-
const position = (
|
|
6432
|
+
const load = async (data) => {
|
|
6433
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
6434
|
+
const position = (_a = data === null || data === void 0 ? void 0 : data.position) !== null && _a !== void 0 ? _a : defaultModelPosition;
|
|
6449
6435
|
if (!position)
|
|
6450
6436
|
return Promise.reject(`ModelEntryDoorGuidePlugin.load(): position is undefined`);
|
|
6451
6437
|
const modelPosition = transformPositionToVector3(position);
|
|
6452
|
-
const rad = (
|
|
6453
|
-
const fbxUrl = (
|
|
6438
|
+
const rad = (_b = data === null || data === void 0 ? void 0 : data.rad) !== null && _b !== void 0 ? _b : defaultRad;
|
|
6439
|
+
const fbxUrl = (_c = data === null || data === void 0 ? void 0 : data.fbx_url) !== null && _c !== void 0 ? _c : defaultFbxUrl;
|
|
6454
6440
|
state.rad = rad;
|
|
6455
6441
|
if (rad === undefined)
|
|
6456
6442
|
return Promise.reject(`ModelEntryDoorGuidePlugin.load(): rad is ${rad}`);
|
|
6457
6443
|
// 加载模型
|
|
6458
|
-
const object =
|
|
6444
|
+
const object = await new FBXLoader().loadAsync(fbxUrl);
|
|
6459
6445
|
// 设置位置
|
|
6460
6446
|
object.position.copy(modelPosition);
|
|
6461
6447
|
object.rotation.z = rad;
|
|
6462
6448
|
object.scale.set(0.8, 0.8, 0.8);
|
|
6463
6449
|
transfromToMeshBasicMaterial(object, { transparent: true, side: THREE.DoubleSide });
|
|
6464
|
-
const textMesh = (
|
|
6450
|
+
const textMesh = (_g = (_f = (_e = (_d = object.children) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.children) === null || _f === void 0 ? void 0 : _f[3]) === null || _g === void 0 ? void 0 : _g.clone();
|
|
6465
6451
|
if (!textMesh)
|
|
6466
6452
|
return Promise.reject(`ModelEntryDoorGuidePlugin.load(): textMesh is ${textMesh}`);
|
|
6467
6453
|
textMesh.material = new MeshBasicMaterial({ transparent: true, map: createCanvasTextTexture('入户门') });
|
|
@@ -6469,7 +6455,7 @@ const ModelEntryDoorGuidePlugin = (five, params) => {
|
|
|
6469
6455
|
object.children[0].add(textMesh);
|
|
6470
6456
|
state.object = object;
|
|
6471
6457
|
return true;
|
|
6472
|
-
}
|
|
6458
|
+
};
|
|
6473
6459
|
const initAnimation = () => {
|
|
6474
6460
|
if (state.animation)
|
|
6475
6461
|
return;
|
|
@@ -6706,21 +6692,21 @@ const getLongitudeParams = (from, to, rotation) => {
|
|
|
6706
6692
|
*/
|
|
6707
6693
|
const CameraMovementPlugin = (five) => {
|
|
6708
6694
|
const state = {};
|
|
6709
|
-
const move = (args, duration, opts = { preload: true }) =>
|
|
6695
|
+
const move = async (args, duration, opts = { preload: true }) => {
|
|
6710
6696
|
if (state.interruptCallback) {
|
|
6711
6697
|
state.interruptCallback(false);
|
|
6712
6698
|
}
|
|
6713
6699
|
if (opts.asyncStartCallback) {
|
|
6714
|
-
|
|
6700
|
+
await opts.asyncStartCallback();
|
|
6715
6701
|
}
|
|
6716
6702
|
if (args.mode && args.mode !== five.currentMode) {
|
|
6717
|
-
|
|
6703
|
+
await five.changeMode(args.mode);
|
|
6718
6704
|
}
|
|
6719
6705
|
if (opts.preload && args.panoIndex !== undefined && args.panoIndex !== five.panoIndex) {
|
|
6720
|
-
|
|
6706
|
+
await five.preloadPano(args.panoIndex);
|
|
6721
6707
|
}
|
|
6722
6708
|
if (opts.asyncEndCallback) {
|
|
6723
|
-
|
|
6709
|
+
await opts.asyncEndCallback();
|
|
6724
6710
|
}
|
|
6725
6711
|
if (args.panoIndex === undefined &&
|
|
6726
6712
|
args.fov === undefined &&
|
|
@@ -6728,7 +6714,7 @@ const CameraMovementPlugin = (five) => {
|
|
|
6728
6714
|
args.longitude === undefined) {
|
|
6729
6715
|
return true;
|
|
6730
6716
|
}
|
|
6731
|
-
return
|
|
6717
|
+
return await new Promise((resolve, reject) => {
|
|
6732
6718
|
const panoIndex = args.panoIndex !== undefined ? args.panoIndex : five.panoIndex;
|
|
6733
6719
|
if (panoIndex !== undefined) {
|
|
6734
6720
|
five.moveToPano(panoIndex, Object.assign({
|
|
@@ -6741,7 +6727,7 @@ const CameraMovementPlugin = (five) => {
|
|
|
6741
6727
|
reject(false);
|
|
6742
6728
|
}
|
|
6743
6729
|
});
|
|
6744
|
-
}
|
|
6730
|
+
};
|
|
6745
6731
|
const getAnimeParams = (args) => {
|
|
6746
6732
|
const currentFiveState = five.state;
|
|
6747
6733
|
// latitude
|
|
@@ -6757,20 +6743,20 @@ const CameraMovementPlugin = (five) => {
|
|
|
6757
6743
|
to: { latitude: toLatitude, longitude: toLongitude, fov: toFov },
|
|
6758
6744
|
};
|
|
6759
6745
|
};
|
|
6760
|
-
const rotate = (args, duration, opts = {}) =>
|
|
6746
|
+
const rotate = async (args, duration, opts = {}) => {
|
|
6761
6747
|
if (state.interruptCallback) {
|
|
6762
6748
|
state.interruptCallback(false);
|
|
6763
6749
|
}
|
|
6764
6750
|
if (opts.asyncStartCallback) {
|
|
6765
|
-
|
|
6751
|
+
await opts.asyncStartCallback();
|
|
6766
6752
|
}
|
|
6767
6753
|
if (five.currentMode !== Five.Mode.Panorama) {
|
|
6768
|
-
|
|
6754
|
+
await five.changeMode(Five.Mode.Panorama);
|
|
6769
6755
|
}
|
|
6770
6756
|
if (args.panoIndex !== undefined && args.panoIndex !== five.panoIndex) {
|
|
6771
6757
|
if (opts.preload)
|
|
6772
|
-
|
|
6773
|
-
|
|
6758
|
+
await five.preloadPano(args.panoIndex);
|
|
6759
|
+
await new Promise((resolve, reject) => {
|
|
6774
6760
|
if (!args.panoIndex) {
|
|
6775
6761
|
resolve(true);
|
|
6776
6762
|
return;
|
|
@@ -6782,10 +6768,10 @@ const CameraMovementPlugin = (five) => {
|
|
|
6782
6768
|
});
|
|
6783
6769
|
}
|
|
6784
6770
|
if (opts.asyncEndCallback) {
|
|
6785
|
-
|
|
6771
|
+
await opts.asyncEndCallback();
|
|
6786
6772
|
}
|
|
6787
6773
|
const { from, to } = getAnimeParams(args);
|
|
6788
|
-
return
|
|
6774
|
+
return await new Promise((resolve) => {
|
|
6789
6775
|
const onUpdate = ({ progress }) => {
|
|
6790
6776
|
const state = {};
|
|
6791
6777
|
state.longitude = progressNumber(from.longitude, to.longitude, progress);
|
|
@@ -6827,7 +6813,7 @@ const CameraMovementPlugin = (five) => {
|
|
|
6827
6813
|
state.interruptCallback(true);
|
|
6828
6814
|
}, duration);
|
|
6829
6815
|
});
|
|
6830
|
-
}
|
|
6816
|
+
};
|
|
6831
6817
|
return {
|
|
6832
6818
|
move,
|
|
6833
6819
|
rotate,
|
|
@@ -7186,7 +7172,7 @@ const PanoRulerPlugin = (five, params) => {
|
|
|
7186
7172
|
state.loaded = true;
|
|
7187
7173
|
return true;
|
|
7188
7174
|
};
|
|
7189
|
-
const load = (_roomInfo, _roomRules, options) =>
|
|
7175
|
+
const load = async (_roomInfo, _roomRules, options) => {
|
|
7190
7176
|
const roomInfo = _roomInfo || params.roomInfo;
|
|
7191
7177
|
const roomRules = _roomRules || params.roomRules;
|
|
7192
7178
|
if (!roomInfo || !roomRules) {
|
|
@@ -7197,9 +7183,9 @@ const PanoRulerPlugin = (five, params) => {
|
|
|
7197
7183
|
return _load(roomInfo, roomRules);
|
|
7198
7184
|
}
|
|
7199
7185
|
else {
|
|
7200
|
-
return
|
|
7186
|
+
return await new Promise((resolve) => five.once('modelLoaded', () => resolve(_load(roomInfo, roomRules))));
|
|
7201
7187
|
}
|
|
7202
|
-
}
|
|
7188
|
+
};
|
|
7203
7189
|
if (params.roomInfo && params.roomRules) {
|
|
7204
7190
|
load(params.roomInfo, params.roomRules);
|
|
7205
7191
|
}
|
|
@@ -7464,14 +7450,12 @@ function getRoomInfoInstance() {
|
|
|
7464
7450
|
}
|
|
7465
7451
|
|
|
7466
7452
|
const textureLoader = new THREE.TextureLoader();
|
|
7467
|
-
function loadTexture(url) {
|
|
7468
|
-
return
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
return texture;
|
|
7474
|
-
});
|
|
7453
|
+
async function loadTexture(url) {
|
|
7454
|
+
return new Promise((resolve, reject) => {
|
|
7455
|
+
textureLoader.load(url, resolve, undefined, reject);
|
|
7456
|
+
}).then((texture) => {
|
|
7457
|
+
texture.encoding = THREE.sRGBEncoding;
|
|
7458
|
+
return texture;
|
|
7475
7459
|
});
|
|
7476
7460
|
}
|
|
7477
7461
|
|
|
@@ -7711,65 +7695,59 @@ class PanoCompassController {
|
|
|
7711
7695
|
if (this.modelLoaded)
|
|
7712
7696
|
this.init();
|
|
7713
7697
|
}
|
|
7714
|
-
init() {
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
}
|
|
7738
|
-
loadCompassMesh() {
|
|
7698
|
+
async init() {
|
|
7699
|
+
if (!this.data || !this.modelLoaded)
|
|
7700
|
+
return;
|
|
7701
|
+
const northRad = this.data.north_rad;
|
|
7702
|
+
if (northRad != null) {
|
|
7703
|
+
this.compassMesh = await this.loadCompassMesh();
|
|
7704
|
+
this.compassMesh.rotateX(-Math.PI / 2);
|
|
7705
|
+
this.compassMesh.rotateZ(northRad - Math.PI / 2);
|
|
7706
|
+
this.group.add(this.compassMesh);
|
|
7707
|
+
}
|
|
7708
|
+
if (this.data.entrance != null) {
|
|
7709
|
+
this.entryDoorMesh = await this.loadEntryDoorMesh();
|
|
7710
|
+
this.roomInfoWrapperInstance = this.loadRoomInfo();
|
|
7711
|
+
this.roomInfoInstance = getRoomInfoInstance();
|
|
7712
|
+
this.entryDoorMesh.rotateX(-Math.PI / 2);
|
|
7713
|
+
if (this.roomInfoWrapperInstance)
|
|
7714
|
+
this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container);
|
|
7715
|
+
this.group.add(this.entryDoorMesh);
|
|
7716
|
+
}
|
|
7717
|
+
this.onFivePanoArrived(this.five.panoIndex || 0);
|
|
7718
|
+
this.five.needsRender = true;
|
|
7719
|
+
}
|
|
7720
|
+
async loadCompassMesh() {
|
|
7739
7721
|
var _a;
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
depthTest: false,
|
|
7750
|
-
});
|
|
7751
|
-
const compassMesh = new THREE.Mesh(compassGeometry, compassMaterial);
|
|
7752
|
-
compassMesh.name = 'pano-compass-mesh';
|
|
7753
|
-
return compassMesh;
|
|
7722
|
+
const compassImageUrl = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.compassImageUrl) ||
|
|
7723
|
+
'//vrlab-image4.ljcdn.com/release/web/v3/north-point-circle.96498e69.png';
|
|
7724
|
+
const compassTexture = await loadTexture(compassImageUrl);
|
|
7725
|
+
const compassGeometry = new THREE.CircleGeometry(0.7, 32);
|
|
7726
|
+
const compassMaterial = new THREE.MeshBasicMaterial({
|
|
7727
|
+
map: compassTexture,
|
|
7728
|
+
transparent: true,
|
|
7729
|
+
opacity: 0,
|
|
7730
|
+
depthTest: false,
|
|
7754
7731
|
});
|
|
7732
|
+
const compassMesh = new THREE.Mesh(compassGeometry, compassMaterial);
|
|
7733
|
+
compassMesh.name = 'pano-compass-mesh';
|
|
7734
|
+
return compassMesh;
|
|
7755
7735
|
}
|
|
7756
|
-
loadEntryDoorMesh() {
|
|
7736
|
+
async loadEntryDoorMesh() {
|
|
7757
7737
|
var _a;
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
depthTest: false,
|
|
7768
|
-
});
|
|
7769
|
-
const entryDoorMesh = new THREE.Mesh(entryDoorGeometry, entryDoorMaterial);
|
|
7770
|
-
entryDoorMesh.name = 'pano-compass-entry-door';
|
|
7771
|
-
return entryDoorMesh;
|
|
7738
|
+
const entryDoorImageUrl = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.entryDoorImageUrl) ||
|
|
7739
|
+
'//vrlab-image4.ljcdn.com/release/web/enterDoor.831b8208.png';
|
|
7740
|
+
const entryDoorTexture = await loadTexture(entryDoorImageUrl);
|
|
7741
|
+
const entryDoorGeometry = new THREE.PlaneGeometry(0.2, 0.16);
|
|
7742
|
+
const entryDoorMaterial = new THREE.MeshBasicMaterial({
|
|
7743
|
+
map: entryDoorTexture,
|
|
7744
|
+
transparent: true,
|
|
7745
|
+
opacity: 0.8,
|
|
7746
|
+
depthTest: false,
|
|
7772
7747
|
});
|
|
7748
|
+
const entryDoorMesh = new THREE.Mesh(entryDoorGeometry, entryDoorMaterial);
|
|
7749
|
+
entryDoorMesh.name = 'pano-compass-entry-door';
|
|
7750
|
+
return entryDoorMesh;
|
|
7773
7751
|
}
|
|
7774
7752
|
loadRoomInfo() {
|
|
7775
7753
|
const points = [
|
|
@@ -10634,11 +10612,6 @@ if (typeof undefined$1 === 'function' && undefined$1.amd) {
|
|
|
10634
10612
|
|
|
10635
10613
|
var Hammer = hammer.exports;
|
|
10636
10614
|
|
|
10637
|
-
var Hammer$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/_mergeNamespaces({
|
|
10638
|
-
__proto__: null,
|
|
10639
|
-
'default': Hammer
|
|
10640
|
-
}, [hammer.exports]));
|
|
10641
|
-
|
|
10642
10615
|
// uuid
|
|
10643
10616
|
function S4() {
|
|
10644
10617
|
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
@@ -11634,7 +11607,7 @@ class EditController extends BaseController {
|
|
|
11634
11607
|
const fiveElement = this.five.getElement();
|
|
11635
11608
|
if (fiveElement) {
|
|
11636
11609
|
this.fiveElement = fiveElement;
|
|
11637
|
-
const hammer = new Hammer
|
|
11610
|
+
const hammer = new Hammer(fiveElement);
|
|
11638
11611
|
this.hammer = hammer;
|
|
11639
11612
|
hammer.on('tap', this.onTap);
|
|
11640
11613
|
hammer.on('pan', this.onPan);
|
|
@@ -13197,7 +13170,7 @@ const currentTarget = writable(null);
|
|
|
13197
13170
|
/* src/PanoSpatialTagPlugin/Components/origins.svelte generated by Svelte v3.47.0 */
|
|
13198
13171
|
|
|
13199
13172
|
function add_css$3(target) {
|
|
13200
|
-
append_styles(target, "svelte-
|
|
13173
|
+
append_styles(target, "svelte-1kuu68s", ".PanoSpatialTagPlugin__tag-origin.svelte-1kuu68s{position:absolute;width:0.5rem;height:0.5rem;border-radius:50%;background:#fff;box-shadow:0 0 .6rem #fff;transform:translate(-50%, -50%) scale(1);transform-origin:center center;-webkit-animation:svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin 1.2s forwards;animation:svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin 1.2s forwards;pointer-events:auto}.PanoSpatialTagPlugin__tag-origin.svelte-1kuu68s:after{content:'';position:absolute;top:50%;height:50%;width:2rem;height:2rem;transform:translate(-50%, -50%)}.PanoSpatialTagPlugin__tag-origin-destroy.svelte-1kuu68s{transform:translate(-50%, -50%) scale(0.6);-webkit-animation:svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin-destroy 1.2s forwards .7s;animation:svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin-destroy 1.2s forwards .7s}@-webkit-keyframes svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin{0%{transform:translate(-50%, -50%) scale(1);opacity:0}100%{transform:translate(-50%, -50%) scale(0.6);opacity:1 }}@keyframes svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin{0%{transform:translate(-50%, -50%) scale(1);opacity:0}100%{transform:translate(-50%, -50%) scale(0.6);opacity:1 }}@-webkit-keyframes svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin-destroy{0%{transform:translate(-50%, -50%) scale(0.6);opacity:1}10%{transform:translate(-50%, -50%) scale(1);opacity:0.9}100%{transform:translate(-50%, -50%) scale(1);opacity:0}}@keyframes svelte-1kuu68s-PanoSpatialTagPlugin__tag-origin-destroy{0%{transform:translate(-50%, -50%) scale(0.6);opacity:1}10%{transform:translate(-50%, -50%) scale(1);opacity:0.9}100%{transform:translate(-50%, -50%) scale(1);opacity:0}}");
|
|
13201
13174
|
}
|
|
13202
13175
|
|
|
13203
13176
|
function get_each_context$1(ctx, list, i) {
|
|
@@ -13221,7 +13194,7 @@ function create_each_block$1(ctx) {
|
|
|
13221
13194
|
return {
|
|
13222
13195
|
c() {
|
|
13223
13196
|
i = element("i");
|
|
13224
|
-
attr(i, "class", "svelte-
|
|
13197
|
+
attr(i, "class", "svelte-1kuu68s");
|
|
13225
13198
|
toggle_class(i, "PanoSpatialTagPlugin__tag-origin", true);
|
|
13226
13199
|
toggle_class(i, "PanoSpatialTagPlugin__tag-origin-destroy", /*origin*/ ctx[3].destroying);
|
|
13227
13200
|
set_style(i, "top", style_top, false);
|
|
@@ -13346,7 +13319,7 @@ class Origins extends SvelteComponent {
|
|
|
13346
13319
|
/* src/PanoSpatialTagPlugin/Components/tag.svelte generated by Svelte v3.47.0 */
|
|
13347
13320
|
|
|
13348
13321
|
function add_css$2(target) {
|
|
13349
|
-
append_styles(target, "svelte-
|
|
13322
|
+
append_styles(target, "svelte-1wukaol", ".PanoSpatialTagPlugin__tag-x.svelte-1wukaol.svelte-1wukaol{position:relative;display:block;white-space:nowrap;box-sizing:border-box;width:25rem;height:14rem;color:#FFF;transform:translate(0, -100%);transition:height .5s linear}.PanoSpatialTagPlugin__tag-shadow.svelte-1wukaol.svelte-1wukaol{content:'';position:absolute;width:30rem;height:30rem;top:-15rem;left:-15rem;z-index:-1;opacity:0;transition:opacity .8s .6s;background:url('https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png');background-size:30rem 30rem}.PanoSpatialTagPlugin__tag-line.svelte-1wukaol.svelte-1wukaol{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-1wukaol.svelte-1wukaol{position:absolute;top:0;left:1rem;height:calc(100% - 1.5rem);width:.15rem;background:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, .1));box-shadow:0 .1rem .5rem rgba(0, 0, 0, .2);opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .4s cubic-bezier(.44,.44,.74,.98) , opacity .4s cubic-bezier(.44,.44,.74,.98), width .5s linear, height .5s linear ;transform-origin:center bottom}.PanoSpatialTagPlugin__tag-line1.svelte-1wukaol.svelte-1wukaol{position:absolute;top:0;left:0.3rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-line2.svelte-1wukaol.svelte-1wukaol{position:absolute;top:0;left:0.5rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-show.svelte-1wukaol .PanoSpatialTagPlugin__tag-line1.svelte-1wukaol{-webkit-animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s;animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s}.PanoSpatialTagPlugin__tag-show.svelte-1wukaol .PanoSpatialTagPlugin__tag-line2.svelte-1wukaol{-webkit-animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s;animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s}.PanoSpatialTagPlugin__tag-x.PanoSpatialTagPlugin__tag-upside-down.svelte-1wukaol.svelte-1wukaol{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1wukaol .PanoSpatialTagPlugin__tag-line.svelte-1wukaol{transform:scaleY(-1)}.PanoSpatialTagPlugin__tag-animate.svelte-1wukaol.svelte-1wukaol{position:relative;height:100%;overflow:hidden;transform-origin:left top;transition:transform .5s linear}.PanoSpatialTagPlugin__tag-upside-down.svelte-1wukaol .PanoSpatialTagPlugin__tag-animate.svelte-1wukaol{transform-origin:left bottom}.PanoSpatialTagPlugin__tag-content.svelte-1wukaol.svelte-1wukaol{position:absolute;display:inline-block;transform:translate(-100%, 0);transition:transform .9s cubic-bezier(0,.65,.16,1.08) .6s;padding-left:.5rem;font-size:1rem}.PanoSpatialTagPlugin__tag-upside-down.svelte-1wukaol .PanoSpatialTagPlugin__tag-content.svelte-1wukaol{bottom:0}.PanoSpatialTagPlugin__tag-show.svelte-1wukaol .PanoSpatialTagPlugin__tag-flagpole.svelte-1wukaol{opacity:1;transform:translate(-50%, 0) scaleY(1)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1wukaol .PanoSpatialTagPlugin__tag-shadow.svelte-1wukaol{top:unset;bottom:-15rem}.PanoSpatialTagPlugin__tag-show.svelte-1wukaol .PanoSpatialTagPlugin__tag-shadow.svelte-1wukaol{opacity:.32}.PanoSpatialTagPlugin__tag-show.svelte-1wukaol .PanoSpatialTagPlugin__tag-content.svelte-1wukaol{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-hide.svelte-1wukaol .PanoSpatialTagPlugin__tag-flagpole.svelte-1wukaol{opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .5s .55s, opacity .4s .55s}.PanoSpatialTagPlugin__tag-hide.svelte-1wukaol .PanoSpatialTagPlugin__tag-shadow.svelte-1wukaol{opacity:0;transition:opacity .8s}.PanoSpatialTagPlugin__tag-hide.svelte-1wukaol .PanoSpatialTagPlugin__tag-content.svelte-1wukaol{transform:translate(-100%, 0);transition:transform .6s cubic-bezier(.53,.06,.88,.59)}.PanoSpatialTagPlugin__tag-hide.svelte-1wukaol .PanoSpatialTagPlugin__tag-content .svelte-1wukaol{pointer-events:none}.PanoSpatialTagPlugin__tag-hide.svelte-1wukaol .PanoSpatialTagPlugin__tag-line1.svelte-1wukaol{opacity:0.5;transform:translate(-50%, 10%) scaleY(0);-webkit-animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s;animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s}.PanoSpatialTagPlugin__tag-hide.svelte-1wukaol .PanoSpatialTagPlugin__tag-line2.svelte-1wukaol{opacity:0.5;transform:translate(-50%, 0) scaleY(0);-webkit-animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s;animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s}@-webkit-keyframes svelte-1wukaol-PanoSpatialTagPlugin__tag-line1{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 135%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 20%) scaleY(0)}}@keyframes svelte-1wukaol-PanoSpatialTagPlugin__tag-line1{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 135%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 20%) scaleY(0)}}@-webkit-keyframes svelte-1wukaol-PanoSpatialTagPlugin__tag-line2{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 125%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}}@keyframes svelte-1wukaol-PanoSpatialTagPlugin__tag-line2{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 125%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}}@-webkit-keyframes svelte-1wukaol-PanoSpatialTagPlugin__tag-line1-hide{0%{opacity:0.5;transform:translate(-50%, 10%) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 105%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@keyframes svelte-1wukaol-PanoSpatialTagPlugin__tag-line1-hide{0%{opacity:0.5;transform:translate(-50%, 10%) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 105%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@-webkit-keyframes svelte-1wukaol-PanoSpatialTagPlugin__tag-line2-hide{0%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 100%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@keyframes svelte-1wukaol-PanoSpatialTagPlugin__tag-line2-hide{0%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 100%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}");
|
|
13350
13323
|
}
|
|
13351
13324
|
|
|
13352
13325
|
function create_fragment$2(ctx) {
|
|
@@ -13380,19 +13353,19 @@ function create_fragment$2(ctx) {
|
|
|
13380
13353
|
t3 = space();
|
|
13381
13354
|
div3 = element("div");
|
|
13382
13355
|
div2 = element("div");
|
|
13383
|
-
attr(div0, "class", "PanoSpatialTagPlugin__tag-shadow svelte-
|
|
13356
|
+
attr(div0, "class", "PanoSpatialTagPlugin__tag-shadow svelte-1wukaol");
|
|
13384
13357
|
set_style(div0, "transform", "translate(" + /*contentWidth*/ ctx[7] / 2 * /*contentZoom*/ ctx[3] * 3 + "px, " + /*contentHeight*/ ctx[8] / 2 * (/*upsideDown*/ ctx[1] ? -1 : 1) * /*contentZoom*/ ctx[3] * 3 + "px)");
|
|
13385
|
-
attr(i0, "class", "PanoSpatialTagPlugin__tag-flagpole svelte-
|
|
13358
|
+
attr(i0, "class", "PanoSpatialTagPlugin__tag-flagpole svelte-1wukaol");
|
|
13386
13359
|
set_style(i0, "width", /*lineWidthZoom*/ ctx[4] + "rem");
|
|
13387
|
-
attr(i1, "class", "PanoSpatialTagPlugin__tag-line1 svelte-
|
|
13388
|
-
attr(i2, "class", "PanoSpatialTagPlugin__tag-line2 svelte-
|
|
13389
|
-
attr(div1, "class", "PanoSpatialTagPlugin__tag-line svelte-
|
|
13390
|
-
attr(div2, "class", "PanoSpatialTagPlugin__tag-content svelte-
|
|
13391
|
-
attr(div3, "class", "PanoSpatialTagPlugin__tag-animate svelte-
|
|
13360
|
+
attr(i1, "class", "PanoSpatialTagPlugin__tag-line1 svelte-1wukaol");
|
|
13361
|
+
attr(i2, "class", "PanoSpatialTagPlugin__tag-line2 svelte-1wukaol");
|
|
13362
|
+
attr(div1, "class", "PanoSpatialTagPlugin__tag-line svelte-1wukaol");
|
|
13363
|
+
attr(div2, "class", "PanoSpatialTagPlugin__tag-content svelte-1wukaol");
|
|
13364
|
+
attr(div3, "class", "PanoSpatialTagPlugin__tag-animate svelte-1wukaol");
|
|
13392
13365
|
set_style(div3, "transform", "scale(" + /*contentZoom*/ ctx[3] * 3 + ")");
|
|
13393
13366
|
attr(div4, "id", div4_id_value = 'PanoSpatialTagPlugin__' + /*id*/ ctx[0]);
|
|
13394
13367
|
set_style(div4, "height", 20 * /*lineHeightZoom*/ ctx[5] + "rem");
|
|
13395
|
-
attr(div4, "class", "svelte-
|
|
13368
|
+
attr(div4, "class", "svelte-1wukaol");
|
|
13396
13369
|
toggle_class(div4, "PanoSpatialTagPlugin__tag-x", true);
|
|
13397
13370
|
toggle_class(div4, "PanoSpatialTagPlugin__tag-upside-down", /*upsideDown*/ ctx[1]);
|
|
13398
13371
|
toggle_class(div4, "PanoSpatialTagPlugin__tag-show", /*show*/ ctx[10]);
|
|
@@ -14259,7 +14232,7 @@ var DISPLAY_STRATEGY_TYPE;
|
|
|
14259
14232
|
/* src/ModelItemLabelPlugin/ItemLabelItem.svelte generated by Svelte v3.47.0 */
|
|
14260
14233
|
|
|
14261
14234
|
function add_css$1(target) {
|
|
14262
|
-
append_styles(target, "svelte-
|
|
14235
|
+
append_styles(target, "svelte-1hzvil1", ".item-label-item.svelte-1hzvil1{position:absolute;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;opacity:0}.item-label-item.visible.svelte-1hzvil1{opacity:1;-webkit-animation:svelte-1hzvil1-fadeIn .3s ease-in;animation:svelte-1hzvil1-fadeIn .3s ease-in}.item-label-item__text-wrap.svelte-1hzvil1::before{content:'';position:absolute;width:100%;height:100%;background-color:rgba(0, 0, 0, .3);filter:blur(0.83333rem);z-index:-1}.item-label-item__text-wrap.svelte-1hzvil1{padding:0.3125rem 0.3125rem 0;position:absolute;height:1.04167rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap;line-height:0.52083rem;font-size:0.57292rem;font-weight:bold;color:#FFEAC0;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center}.item-label-item__text.svelte-1hzvil1{padding-bottom:0.20833rem;border-top:0 solid;border-left:0 solid;border-right:0 solid;border-bottom:1px solid;-o-border-image:linear-gradient(to right, rgba(234, 208, 154, 0), rgba(234, 208, 154, 100), rgba(234, 208, 154, 0)) 4.5 1 4.5;border-image:linear-gradient(to right, rgba(234, 208, 154, 0), rgba(234, 208, 154, 100), rgba(234, 208, 154, 0)) 4.5 1 4.5}.item-label-item__bar.svelte-1hzvil1{position:absolute;bottom:0;width:1px;background-image:linear-gradient(to bottom, rgba(234, 208, 154, 0), rgba(234, 208, 154, 1))}@-webkit-keyframes svelte-1hzvil1-fadeIn{from{opacity:0\n }to{opacity:1\n }}@keyframes svelte-1hzvil1-fadeIn{from{opacity:0\n }to{opacity:1\n }}");
|
|
14263
14236
|
}
|
|
14264
14237
|
|
|
14265
14238
|
function create_fragment$1(ctx) {
|
|
@@ -14286,12 +14259,12 @@ function create_fragment$1(ctx) {
|
|
|
14286
14259
|
t0 = text(t0_value);
|
|
14287
14260
|
t1 = space();
|
|
14288
14261
|
div1 = element("div");
|
|
14289
|
-
attr(span, "class", "item-label-item__text svelte-
|
|
14290
|
-
attr(div0, "class", "item-label-item__text-wrap svelte-
|
|
14262
|
+
attr(span, "class", "item-label-item__text svelte-1hzvil1");
|
|
14263
|
+
attr(div0, "class", "item-label-item__text-wrap svelte-1hzvil1");
|
|
14291
14264
|
set_style(div0, "top", `-${/*itemLabel*/ ctx[0].strokeLength + 26}px`);
|
|
14292
|
-
attr(div1, "class", "item-label-item__bar svelte-
|
|
14265
|
+
attr(div1, "class", "item-label-item__bar svelte-1hzvil1");
|
|
14293
14266
|
set_style(div1, "height", `${/*itemLabel*/ ctx[0].strokeLength}px`);
|
|
14294
|
-
attr(div2, "class", div2_class_value = "" + (null_to_empty(classNames("item-label-item", { visible: /*itemLabel*/ ctx[0].visible })) + " svelte-
|
|
14267
|
+
attr(div2, "class", div2_class_value = "" + (null_to_empty(classNames("item-label-item", { visible: /*itemLabel*/ ctx[0].visible })) + " svelte-1hzvil1"));
|
|
14295
14268
|
set_style(div2, "z-index", /*itemLabel*/ ctx[0].zIndex, false);
|
|
14296
14269
|
set_style(div2, "transform", /*itemLabel*/ ctx[0].transform, false);
|
|
14297
14270
|
},
|
|
@@ -14321,7 +14294,7 @@ function create_fragment$1(ctx) {
|
|
|
14321
14294
|
set_style(div1, "height", `${/*itemLabel*/ ctx[0].strokeLength}px`);
|
|
14322
14295
|
}
|
|
14323
14296
|
|
|
14324
|
-
if (dirty & /*itemLabel*/ 1 && div2_class_value !== (div2_class_value = "" + (null_to_empty(classNames("item-label-item", { visible: /*itemLabel*/ ctx[0].visible })) + " svelte-
|
|
14297
|
+
if (dirty & /*itemLabel*/ 1 && div2_class_value !== (div2_class_value = "" + (null_to_empty(classNames("item-label-item", { visible: /*itemLabel*/ ctx[0].visible })) + " svelte-1hzvil1"))) {
|
|
14325
14298
|
attr(div2, "class", div2_class_value);
|
|
14326
14299
|
}
|
|
14327
14300
|
|
|
@@ -14385,7 +14358,7 @@ function debounce(func, wait = 200) {
|
|
|
14385
14358
|
/* src/ModelItemLabelPlugin/ItemLabelComponent.svelte generated by Svelte v3.47.0 */
|
|
14386
14359
|
|
|
14387
14360
|
function add_css(target) {
|
|
14388
|
-
append_styles(target, "svelte-
|
|
14361
|
+
append_styles(target, "svelte-gk8s47", ".item-labels-container.svelte-gk8s47{width:100%;height:100%;position:relative}");
|
|
14389
14362
|
}
|
|
14390
14363
|
|
|
14391
14364
|
function get_each_context(ctx, list, i) {
|
|
@@ -14466,7 +14439,7 @@ function create_fragment(ctx) {
|
|
|
14466
14439
|
each_blocks[i].c();
|
|
14467
14440
|
}
|
|
14468
14441
|
|
|
14469
|
-
attr(div, "class", "item-labels-container svelte-
|
|
14442
|
+
attr(div, "class", "item-labels-container svelte-gk8s47");
|
|
14470
14443
|
add_render_callback(() => /*div_elementresize_handler*/ ctx[10].call(div));
|
|
14471
14444
|
set_style(div, "opacity", /*itemsVisible*/ ctx[4] ? 1 : 0, false);
|
|
14472
14445
|
},
|
|
@@ -15054,7 +15027,7 @@ const ModelTVVideoPlugin = (five, { videoElement }) => {
|
|
|
15054
15027
|
xhr.send();
|
|
15055
15028
|
});
|
|
15056
15029
|
};
|
|
15057
|
-
const load = (data, videoElement) =>
|
|
15030
|
+
const load = async (data, videoElement) => {
|
|
15058
15031
|
const { video_src, video_poster_src, points } = data;
|
|
15059
15032
|
state.videoSource = video_src;
|
|
15060
15033
|
// TODO 存疑,先处理多一次遍历 o(2n)
|
|
@@ -15064,11 +15037,11 @@ const ModelTVVideoPlugin = (five, { videoElement }) => {
|
|
|
15064
15037
|
if (videoElement) {
|
|
15065
15038
|
state.videoElement = videoElement;
|
|
15066
15039
|
}
|
|
15067
|
-
state.videoTexture =
|
|
15040
|
+
state.videoTexture = await getVideoTexture(state.videoSource, state.videoElement);
|
|
15068
15041
|
state.enabled = !!data.enable;
|
|
15069
15042
|
if (state.enabled)
|
|
15070
15043
|
enable();
|
|
15071
|
-
}
|
|
15044
|
+
};
|
|
15072
15045
|
const dispose = () => {
|
|
15073
15046
|
disable();
|
|
15074
15047
|
state.videoTexture = undefined;
|