@realsee/dnalogel 2.11.0 → 2.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ModelRoomLabelPlugin/Controller.d.ts +2 -0
- package/dist/floorplan/MapviewFloorplanPlugin/Controller.d.ts +5 -1
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +5 -1
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +5 -1
- package/dist/floorplan/typings/index.d.ts +12 -0
- package/dist/index.cjs.js +48 -48
- package/dist/index.js +3024 -2919
- package/dist/index.umd.js +41 -41
- package/docs/classes/CSS3DRender.html +31 -31
- package/docs/classes/CruisePluginController.html +25 -25
- package/docs/classes/Magnifier.html +20 -20
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +25 -25
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoMeasurePluginLine.html +23 -23
- package/docs/classes/PanoMeasurePluginModel.html +22 -22
- package/docs/classes/PanoMeasurePluginPoint.html +14 -14
- package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
- package/docs/classes/PanoTagPluginController.html +47 -47
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.FivePointSelector.html +12 -12
- package/docs/classes/Util.Interval.html +12 -12
- package/docs/classes/Util.Magnifier.html +17 -17
- package/docs/classes/Util.PointDomHelper.html +11 -11
- package/docs/classes/Util.PointHelper.html +11 -11
- package/docs/classes/Util.Rectangle.html +13 -13
- package/docs/enums/CameraMovementEffect.html +7 -7
- package/docs/enums/ContentType.html +19 -19
- package/docs/enums/DIRECTION.html +9 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/DimensionType.html +7 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/PaintBrushTypeEnum.html +8 -8
- package/docs/enums/PointType.html +7 -7
- package/docs/enums/Rotation.html +8 -8
- package/docs/functions/CSS3DRenderPlugin.html +4 -4
- package/docs/functions/CameraMovementPlugin.html +4 -4
- package/docs/functions/CruisePlugin.html +4 -4
- package/docs/functions/GuideLinePlugin.html +5 -5
- package/docs/functions/ItemLabelPlugin.html +4 -4
- package/docs/functions/MapviewFloorplanPlugin.html +4 -4
- package/docs/functions/ModelChassisCompassPlugin.html +4 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
- package/docs/functions/ModelFloorplanPlugin.html +4 -4
- package/docs/functions/ModelItemLabelPlugin.html +4 -4
- package/docs/functions/ModelRoomLabelPlugin.html +4 -4
- package/docs/functions/ModelTVVideoPlugin.html +4 -4
- package/docs/functions/ModelViewPlugin.html +4 -4
- package/docs/functions/Object3DHelperPlugin.html +4 -4
- package/docs/functions/PanoCompassPlugin.html +4 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
- package/docs/functions/PanoDoorLabelPlugin.html +4 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
- package/docs/functions/PanoMeasurePlugin.html +4 -4
- package/docs/functions/PanoRulerPlugin.html +4 -4
- package/docs/functions/PanoRulerProPlugin.html +4 -4
- package/docs/functions/PanoSpatialTagPlugin.html +4 -4
- package/docs/functions/PanoTagPlugin.html +4 -4
- package/docs/functions/PanoVideoPlugin.html +4 -4
- package/docs/functions/TopviewFloorplanPlugin.html +4 -4
- package/docs/functions/Util.getCoordsFromClient.html +5 -5
- package/docs/functions/Util.getCoordsFromElement.html +5 -5
- package/docs/functions/Util.getFrameTime.html +5 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
- package/docs/functions/Util.isNil.html +5 -5
- package/docs/functions/Util.nextFrame.html +5 -5
- package/docs/functions/Util.notNil.html +5 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
- package/docs/functions/Util.tweenProgress.html +5 -5
- package/docs/functions/pluginFlag.html +5 -5
- package/docs/index.html +4 -4
- package/docs/interfaces/AddTagConfig.html +6 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/EventMap.html +15 -15
- package/docs/interfaces/FloorplanBounding.html +8 -8
- package/docs/interfaces/FloorplanData.html +10 -10
- package/docs/interfaces/FloorplanEntrance.html +11 -11
- package/docs/interfaces/FloorplanExtraObject.html +10 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
- package/docs/interfaces/FloorplanFloorData.html +9 -9
- package/docs/interfaces/FloorplanImagePosition.html +7 -7
- package/docs/interfaces/FloorplanObserver.html +9 -9
- package/docs/interfaces/FloorplanOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanPosition.html +7 -7
- package/docs/interfaces/FloorplanRoomItem.html +13 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
- package/docs/interfaces/FloorplanServerBounding.html +8 -8
- package/docs/interfaces/FloorplanServerComputedData.html +10 -10
- package/docs/interfaces/FloorplanServerData.html +7 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
- package/docs/interfaces/FloorplanServerEntrance.html +11 -11
- package/docs/interfaces/FloorplanServerFloorData.html +9 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
- package/docs/interfaces/FloorplanServerObserver.html +9 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanServerPosition.html +7 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
- package/docs/interfaces/HelperOffset.html +8 -8
- package/docs/interfaces/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/MinMax.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
- package/docs/interfaces/ModelViewPluginExportType.html +11 -11
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/ObjectHelperControllers.html +9 -9
- package/docs/interfaces/PaintBrushAction.html +12 -12
- package/docs/interfaces/PaintBrushConfigs.html +12 -12
- package/docs/interfaces/PaintBrushState.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
- package/docs/interfaces/PanoMeasureParameterType.html +12 -12
- package/docs/interfaces/PanoMeasurePluginLineJson.html +8 -8
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPointJson.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +8 -8
- package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginState.html +8 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +6 -6
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +8 -8
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +6 -6
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +9 -9
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +6 -6
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +8 -8
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +10 -10
- package/docs/interfaces/Point.html +8 -8
- package/docs/interfaces/Room.html +9 -9
- package/docs/interfaces/RoomInfo.html +7 -7
- package/docs/interfaces/RoomLabel.html +14 -14
- package/docs/interfaces/RoomRules.html +5 -5
- package/docs/interfaces/Rooms.html +5 -5
- package/docs/interfaces/Scissor.html +9 -9
- package/docs/interfaces/State.html +8 -8
- package/docs/interfaces/TagCache.html +12 -12
- package/docs/interfaces/TagConfig.html +10 -10
- package/docs/interfaces/TagIconUrl.html +11 -11
- package/docs/interfaces/TagStyle.html +6 -6
- package/docs/interfaces/Tags.html +9 -9
- package/docs/interfaces/TemporaryState.html +6 -6
- package/docs/interfaces/Util.MagnifierParameter.html +11 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
- package/docs/modules/PanoVideoPluginType.html +5 -5
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +4 -4
- package/docs/types/ArrayPosition.html +5 -5
- package/docs/types/AudioAppearance.html +5 -5
- package/docs/types/AudioTagTypeConfigKey.html +5 -5
- package/docs/types/CSS3DRenderExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
- package/docs/types/ClassFunctionParameters.html +5 -5
- package/docs/types/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +5 -5
- package/docs/types/ContentTypeConfigKeySplit.html +5 -5
- package/docs/types/ContentTypeMap.html +5 -5
- package/docs/types/Create3DDomContainerReturnType.html +5 -5
- package/docs/types/Create3DElementReturnType.html +5 -5
- package/docs/types/CruisePluginExportType.html +5 -5
- package/docs/types/Direction-1.html +5 -5
- package/docs/types/Direction4.html +5 -5
- package/docs/types/FloorplanRuleLabels.html +5 -5
- package/docs/types/FloorplanServerRuleLabels.html +5 -5
- package/docs/types/GuideLinePluginExportType.html +5 -5
- package/docs/types/HelperEventMap.html +5 -5
- package/docs/types/LoadTagConfig.html +5 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/MediaData.html +5 -5
- package/docs/types/MediaStore.html +5 -5
- package/docs/types/ModelElement.html +5 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
- package/docs/types/MoveArgs.html +5 -5
- package/docs/types/MoveOpts.html +5 -5
- package/docs/types/Object3DHelperEventMap.html +5 -5
- package/docs/types/ObjectFit.html +5 -5
- package/docs/types/PaintBrushEventMap.html +5 -5
- package/docs/types/PanoCompassPluginData.html +5 -5
- package/docs/types/PanoCompassPluginExportType.html +5 -5
- package/docs/types/PanoCompassPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
- package/docs/types/PanoIndex.html +5 -5
- package/docs/types/PanoMeasurePluginEvent.html +5 -5
- package/docs/types/PanoMeasureReturnType.html +5 -5
- package/docs/types/PanoSpatialTagPluginId.html +5 -5
- package/docs/types/PanoTagPluginExportInterface.html +5 -5
- package/docs/types/PanoTagPluginParamsInterface.html +5 -5
- package/docs/types/PanoVideoPluginParameterType.html +5 -5
- package/docs/types/PanoVideoPluginReturnType.html +5 -5
- package/docs/types/PlaneTag.html +5 -5
- package/docs/types/PlaneTagElement.html +5 -5
- package/docs/types/Point2DElement.html +5 -5
- package/docs/types/Point2DTag.html +5 -5
- package/docs/types/Point3DElement.html +5 -5
- package/docs/types/Point3DTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/PointTagElement.html +5 -5
- package/docs/types/Position.html +5 -5
- package/docs/types/RotateArgs.html +5 -5
- package/docs/types/RotateOpts.html +5 -5
- package/docs/types/RuleLabelsKey.html +5 -5
- package/docs/types/RuleLabelsValue.html +5 -5
- package/docs/types/StickType.html +5 -5
- package/docs/types/Tag.html +5 -5
- package/docs/types/Tag2D.html +5 -5
- package/docs/types/Tag3D.html +5 -5
- package/docs/types/TagContentType.html +5 -5
- package/docs/types/TagDimensionType.html +5 -5
- package/docs/types/TagElement.html +5 -5
- package/docs/types/TagEvents.html +5 -5
- package/docs/types/TagGLTFObject.html +5 -5
- package/docs/types/TagHooks.html +5 -5
- package/docs/types/TagIconSize.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TagPointType.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/WorkCode.html +5 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
- package/docs/variables/PLUGIN.html +5 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
- package/docs/variables/ROOM_TYPE_MAP.html +5 -5
- package/docs/variables/VERSION.html +5 -5
- package/docs/variables/itemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
- package/libs/ModelRoomLabelPlugin/Controller.d.ts +2 -0
- package/libs/ModelRoomLabelPlugin/Controller.js +18 -15
- package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +74 -72
- package/libs/base/BasePlugin.js +1 -1
- package/libs/floorplan/Components/CurrentFloor.js +123 -117
- package/libs/floorplan/Components/Main.js +222 -187
- package/libs/floorplan/Components/RoomHighlight/Room.js +55 -38
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +77 -65
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.d.ts +5 -1
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +60 -50
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +5 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +31 -21
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +5 -1
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +79 -69
- package/libs/floorplan/typings/index.d.ts +12 -0
- package/package.json +15 -17
- package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.d.ts +0 -4
- package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.js +0 -6
- package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.d.ts +0 -93
- package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.js +0 -5622
- package/libs/PanoTagPlugin/mocks/v1/mock-test3-realsee-cn-4zr0A5.js +0 -1325
- package/libs/PanoTagPlugin/mocks/v1/mock1.d.ts +0 -173
- package/libs/PanoTagPlugin/mocks/v1/mock1.js +0 -121
- package/libs/PanoTagPlugin/mocks/v1/mock2.d.ts +0 -233
- package/libs/PanoTagPlugin/mocks/v1/mock2.js +0 -296
- package/libs/PanoTagPlugin/mocks/v1/mock3.d.ts +0 -22
- package/libs/PanoTagPlugin/mocks/v1/mock3.js +0 -32
- package/libs/PanoTagPlugin/mocks/v1/mock4.d.ts +0 -56
- package/libs/PanoTagPlugin/mocks/v1/mock4.js +0 -60
- package/libs/PanoTagPlugin/mocks/v1/mock5.d.ts +0 -13
- package/libs/PanoTagPlugin/mocks/v1/mock5.js +0 -17
- package/libs/PanoTagPlugin/mocks/v1/mock6.d.ts +0 -16
- package/libs/PanoTagPlugin/mocks/v1/mock6.js +0 -27
- package/libs/PanoTagPlugin/mocks/v1/mock7.d.ts +0 -22
- package/libs/PanoTagPlugin/mocks/v1/mock7.js +0 -228
|
@@ -1,116 +1,128 @@
|
|
|
1
|
-
import { SvelteComponent as
|
|
1
|
+
import { SvelteComponent as p, init as k, safe_not_equal as D, append_styles as b, element as y, svg_element as R, attr as g, insert as d, append as w, group_outros as q, update_keyed_each as I, outro_and_destroy_block as H, check_outros as B, transition_in as _, transition_out as c, detach as v, assign as C, empty as M, create_component as S, mount_component as W, get_spread_update as j, destroy_component as x } from "../../../vendor/svelte/internal/index.js";
|
|
2
2
|
import { Room as z } from "./Room.js";
|
|
3
|
-
function A(
|
|
4
|
-
|
|
3
|
+
function A(r) {
|
|
4
|
+
b(r, "svelte-1kqo6e4", ".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}");
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
return
|
|
6
|
+
function u(r, t, n) {
|
|
7
|
+
const l = r.slice();
|
|
8
|
+
return l[6] = t[n], l;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
let
|
|
10
|
+
function m(r, t) {
|
|
11
|
+
let n, l, a;
|
|
12
12
|
const s = [
|
|
13
13
|
{
|
|
14
|
-
room: t[
|
|
14
|
+
room: t[6],
|
|
15
15
|
floorplanData: t[1],
|
|
16
|
-
hoveredRoom: t[2]
|
|
16
|
+
hoveredRoom: t[2],
|
|
17
|
+
floorIndex: t[0],
|
|
18
|
+
highlightData: t[3]
|
|
17
19
|
}
|
|
18
20
|
];
|
|
19
|
-
let
|
|
20
|
-
for (let
|
|
21
|
-
|
|
22
|
-
return
|
|
23
|
-
key:
|
|
21
|
+
let h = {};
|
|
22
|
+
for (let i = 0; i < s.length; i += 1)
|
|
23
|
+
h = C(h, s[i]);
|
|
24
|
+
return l = new z({ props: h }), {
|
|
25
|
+
key: r,
|
|
24
26
|
first: null,
|
|
25
27
|
c() {
|
|
26
|
-
|
|
28
|
+
n = M(), S(l.$$.fragment), this.first = n;
|
|
27
29
|
},
|
|
28
|
-
m(
|
|
29
|
-
d(
|
|
30
|
+
m(i, o) {
|
|
31
|
+
d(i, n, o), W(l, i, o), a = !0;
|
|
30
32
|
},
|
|
31
|
-
p(
|
|
32
|
-
t =
|
|
33
|
-
const
|
|
33
|
+
p(i, o) {
|
|
34
|
+
t = i;
|
|
35
|
+
const e = o & 15 ? j(s, [
|
|
34
36
|
{
|
|
35
|
-
room: t[
|
|
37
|
+
room: t[6],
|
|
36
38
|
floorplanData: t[1],
|
|
37
|
-
hoveredRoom: t[2]
|
|
39
|
+
hoveredRoom: t[2],
|
|
40
|
+
floorIndex: t[0],
|
|
41
|
+
highlightData: t[3]
|
|
38
42
|
}
|
|
39
43
|
]) : {};
|
|
40
|
-
|
|
44
|
+
l.$set(e);
|
|
41
45
|
},
|
|
42
|
-
i(
|
|
43
|
-
a || (
|
|
46
|
+
i(i) {
|
|
47
|
+
a || (_(l.$$.fragment, i), a = !0);
|
|
44
48
|
},
|
|
45
|
-
o(
|
|
46
|
-
c(
|
|
49
|
+
o(i) {
|
|
50
|
+
c(l.$$.fragment, i), a = !1;
|
|
47
51
|
},
|
|
48
|
-
d(
|
|
49
|
-
|
|
52
|
+
d(i) {
|
|
53
|
+
i && v(n), x(l, i);
|
|
50
54
|
}
|
|
51
55
|
};
|
|
52
56
|
}
|
|
53
|
-
function E(
|
|
54
|
-
let t,
|
|
55
|
-
const
|
|
56
|
-
for (let
|
|
57
|
-
let
|
|
58
|
-
a.set(
|
|
57
|
+
function E(r) {
|
|
58
|
+
let t, n, l = [], a = /* @__PURE__ */ new Map(), s, h = r[1].floorDatas[r[0]].rooms;
|
|
59
|
+
const i = (o) => o[6].id;
|
|
60
|
+
for (let o = 0; o < h.length; o += 1) {
|
|
61
|
+
let e = u(r, h, o), f = i(e);
|
|
62
|
+
a.set(f, l[o] = m(f, e));
|
|
59
63
|
}
|
|
60
64
|
return {
|
|
61
65
|
c() {
|
|
62
|
-
t =
|
|
63
|
-
for (let
|
|
64
|
-
o
|
|
65
|
-
|
|
66
|
+
t = y("div"), n = R("svg");
|
|
67
|
+
for (let o = 0; o < l.length; o += 1)
|
|
68
|
+
l[o].c();
|
|
69
|
+
g(n, "width", "100%"), g(n, "height", "100%"), g(n, "viewBox", `0 0 ${r[4]} ${r[5]}`), g(n, "class", "svelte-1kqo6e4"), g(t, "class", "floorplan-plugin__room-highlight svelte-1kqo6e4");
|
|
66
70
|
},
|
|
67
|
-
m(
|
|
68
|
-
d(
|
|
69
|
-
for (let
|
|
70
|
-
|
|
71
|
+
m(o, e) {
|
|
72
|
+
d(o, t, e), w(t, n);
|
|
73
|
+
for (let f = 0; f < l.length; f += 1)
|
|
74
|
+
l[f].m(n, null);
|
|
71
75
|
s = !0;
|
|
72
76
|
},
|
|
73
|
-
p(
|
|
74
|
-
|
|
77
|
+
p(o, [e]) {
|
|
78
|
+
e & 15 && (h = o[1].floorDatas[o[0]].rooms, q(), l = I(l, e, i, 1, o, h, a, n, H, m, null, u), B());
|
|
75
79
|
},
|
|
76
|
-
i(
|
|
80
|
+
i(o) {
|
|
77
81
|
if (!s) {
|
|
78
|
-
for (let
|
|
79
|
-
|
|
82
|
+
for (let e = 0; e < h.length; e += 1)
|
|
83
|
+
_(l[e]);
|
|
80
84
|
s = !0;
|
|
81
85
|
}
|
|
82
86
|
},
|
|
83
|
-
o(
|
|
84
|
-
for (let
|
|
85
|
-
c(
|
|
87
|
+
o(o) {
|
|
88
|
+
for (let e = 0; e < l.length; e += 1)
|
|
89
|
+
c(l[e]);
|
|
86
90
|
s = !1;
|
|
87
91
|
},
|
|
88
|
-
d(
|
|
89
|
-
|
|
90
|
-
for (let
|
|
91
|
-
|
|
92
|
+
d(o) {
|
|
93
|
+
o && v(t);
|
|
94
|
+
for (let e = 0; e < l.length; e += 1)
|
|
95
|
+
l[e].d();
|
|
92
96
|
}
|
|
93
97
|
};
|
|
94
98
|
}
|
|
95
|
-
function F(
|
|
96
|
-
let { floorIndex:
|
|
97
|
-
const
|
|
98
|
-
return
|
|
99
|
-
"floorIndex" in e &&
|
|
100
|
-
}, [
|
|
99
|
+
function F(r, t, n) {
|
|
100
|
+
let { floorIndex: l } = t, { floorplanData: a } = t, { hoveredRoom: s } = t, { highlightData: h } = t;
|
|
101
|
+
const i = a.bounding.max.x - a.bounding.min.x, o = a.bounding.max.y - a.bounding.min.y;
|
|
102
|
+
return r.$$set = (e) => {
|
|
103
|
+
"floorIndex" in e && n(0, l = e.floorIndex), "floorplanData" in e && n(1, a = e.floorplanData), "hoveredRoom" in e && n(2, s = e.hoveredRoom), "highlightData" in e && n(3, h = e.highlightData);
|
|
104
|
+
}, [
|
|
105
|
+
l,
|
|
106
|
+
a,
|
|
107
|
+
s,
|
|
108
|
+
h,
|
|
109
|
+
i,
|
|
110
|
+
o
|
|
111
|
+
];
|
|
101
112
|
}
|
|
102
|
-
class K extends
|
|
113
|
+
class K extends p {
|
|
103
114
|
constructor(t) {
|
|
104
115
|
super(), k(
|
|
105
116
|
this,
|
|
106
117
|
t,
|
|
107
118
|
F,
|
|
108
119
|
E,
|
|
109
|
-
|
|
120
|
+
D,
|
|
110
121
|
{
|
|
111
122
|
floorIndex: 0,
|
|
112
123
|
floorplanData: 1,
|
|
113
|
-
hoveredRoom: 2
|
|
124
|
+
hoveredRoom: 2,
|
|
125
|
+
highlightData: 3
|
|
114
126
|
},
|
|
115
127
|
A
|
|
116
128
|
);
|
|
@@ -3,7 +3,7 @@ import type { BaseOptions } from '../../base/BasePlugin';
|
|
|
3
3
|
import type { Five } from '@realsee/five';
|
|
4
4
|
import type { ShowState } from '../utils/correctFiveState';
|
|
5
5
|
import type { FloorplanServerData } from '../typings/floorplanServerData';
|
|
6
|
-
import type { State, Config, EventMap, ShowOptions, HideOptions, Parameters, PluginData, PluginServerData } from './typing';
|
|
6
|
+
import type { State, Config, EventMap, ShowOptions, HideOptions, Parameters, PluginData, PluginServerData, HighlightData } from './typing';
|
|
7
7
|
import * as BasePlugin from '../../base/BasePluginWithData';
|
|
8
8
|
export declare class Controller extends BasePlugin.Controller<State, EventMap, PluginServerData, PluginData> {
|
|
9
9
|
name: string;
|
|
@@ -31,6 +31,8 @@ export declare class Controller extends BasePlugin.Controller<State, EventMap, P
|
|
|
31
31
|
private hasAddedEventListener;
|
|
32
32
|
/** 上一次隐藏是否是用户调用了 hide 导致的 */
|
|
33
33
|
private isHiddenByHideFunc;
|
|
34
|
+
/** 高亮区域 */
|
|
35
|
+
private highlightData;
|
|
34
36
|
constructor(five: Five, params?: Parameters);
|
|
35
37
|
load(serverData: PluginServerData | FloorplanServerData, state?: Partial<State>, userAction?: boolean): Promise<void>;
|
|
36
38
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
@@ -63,6 +65,8 @@ export declare class Controller extends BasePlugin.Controller<State, EventMap, P
|
|
|
63
65
|
updateSize: () => void;
|
|
64
66
|
/** 更新户型图位置 */
|
|
65
67
|
updatePosition(): void;
|
|
68
|
+
highlight: (highlightData: HighlightData) => void;
|
|
69
|
+
unhighlight: () => void;
|
|
66
70
|
protected formatData(serverData: PluginServerData): Promise<PluginData>;
|
|
67
71
|
private _disable;
|
|
68
72
|
private _enable;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
1
|
+
var A = Object.defineProperty, F = Object.defineProperties;
|
|
2
2
|
var C = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var w = Object.getOwnPropertySymbols;
|
|
4
4
|
var P = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var m = (h, n, t) => n in h ?
|
|
5
|
+
var m = (h, n, t) => n in h ? A(h, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[n] = t, l = (h, n) => {
|
|
6
6
|
for (var t in n || (n = {}))
|
|
7
7
|
P.call(n, t) && m(h, t, n[t]);
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
8
|
+
if (w)
|
|
9
|
+
for (var t of w(n))
|
|
10
10
|
y.call(n, t) && m(h, t, n[t]);
|
|
11
11
|
return h;
|
|
12
12
|
}, v = (h, n) => F(h, C(n));
|
|
@@ -14,31 +14,31 @@ var o = (h, n, t) => (m(h, typeof n != "symbol" ? n + "" : n, t), t);
|
|
|
14
14
|
var c = (h, n, t) => new Promise((e, i) => {
|
|
15
15
|
var s = (d) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
17
|
+
a(t.next(d));
|
|
18
18
|
} catch (u) {
|
|
19
19
|
i(u);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, r = (d) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
23
|
+
a(t.throw(d));
|
|
24
24
|
} catch (u) {
|
|
25
25
|
i(u);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, a = (d) => d.done ? e(d.value) : Promise.resolve(d.value).then(s, r);
|
|
28
|
+
a((t = t.apply(h, n)).next());
|
|
29
29
|
});
|
|
30
30
|
import * as x from "three";
|
|
31
31
|
import { to as I } from "../../shared-utils/to.js";
|
|
32
32
|
import { equal as M } from "../../shared-utils/equal.js";
|
|
33
|
-
import { Main as
|
|
34
|
-
import { formatData as
|
|
35
|
-
import { CAMERA_IMAGE as
|
|
36
|
-
import { omit as
|
|
33
|
+
import { Main as D } from "../Components/Main.js";
|
|
34
|
+
import { formatData as b } from "../utils/formatData.js";
|
|
35
|
+
import { CAMERA_IMAGE as L } from "../Assets/camera.js";
|
|
36
|
+
import { omit as _ } from "../../shared-utils/filter.js";
|
|
37
37
|
import { FLOOR_PLAN_ATTACHED_TO as O } from "../constant.js";
|
|
38
38
|
import { Controller as T } from "../../base/BasePluginWithData.js";
|
|
39
39
|
import { getPxmm as k, getAttachedY as B } from "../../shared-utils/getPxmm.js";
|
|
40
40
|
import { checkShowState as H, correctFiveState as R } from "../utils/correctFiveState.js";
|
|
41
|
-
import { changeModelCanvasOpacity as
|
|
41
|
+
import { changeModelCanvasOpacity as E } from "../../shared-utils/changeModelCanvasOpacity.js";
|
|
42
42
|
import { FloorplanErrorType as f, SHOW_ANIME_DURATION as G } from "../utils/constant.js";
|
|
43
43
|
import "../../shared-utils/isTruelyObject.js";
|
|
44
44
|
import "../../vendor/svelte/internal/index.js";
|
|
@@ -78,7 +78,7 @@ function N(h) {
|
|
|
78
78
|
const { latitude: n, longitude: t } = h, e = Math.abs(n - Math.PI / 2) < 10 * Math.PI / 180, i = t < 30 * (Math.PI / 180) || t > 330 * (Math.PI / 180);
|
|
79
79
|
return e && i;
|
|
80
80
|
}
|
|
81
|
-
class
|
|
81
|
+
class Lt extends T {
|
|
82
82
|
constructor(t, e) {
|
|
83
83
|
super(t);
|
|
84
84
|
o(this, "name", "modelFloorplanPlugin");
|
|
@@ -97,6 +97,7 @@ class _t extends T {
|
|
|
97
97
|
o(this, "size", { width: 0, height: 0 });
|
|
98
98
|
o(this, "hasAddedEventListener", !1);
|
|
99
99
|
o(this, "isHiddenByHideFunc", !1);
|
|
100
|
+
o(this, "highlightData", {});
|
|
100
101
|
o(this, "dispose", () => {
|
|
101
102
|
var t, e;
|
|
102
103
|
this.removeEventListener(), (t = this.app) == null || t.$destroy(), this.app = void 0, (e = this.container) == null || e.remove(), this.data = void 0, this.wrapper = void 0, this.selector = void 0, this.hooks.emit("dispose");
|
|
@@ -113,23 +114,29 @@ class _t extends T {
|
|
|
113
114
|
o(this, "updateSize", () => {
|
|
114
115
|
if (!this.data || !H(this.five, this.showState) || !this.container || !this.wrapper)
|
|
115
116
|
return;
|
|
116
|
-
const { min: t, max: e } = this.data.bounding, i = e.x - t.x, s = e.y - t.y,
|
|
117
|
+
const { min: t, max: e } = this.data.bounding, i = e.x - t.x, s = e.y - t.y, r = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, a = k(this.five, this.wrapper, this.floorIndex, r), d = Math.ceil(i * a), u = Math.ceil(s * a);
|
|
117
118
|
this.size.width === d && this.size.height === u || (this.container.style.width = d + "px", this.container.style.height = u + "px", this.size = { width: d, height: u });
|
|
118
119
|
});
|
|
120
|
+
o(this, "highlight", (t) => {
|
|
121
|
+
!this.state.config.highlightEnable || (this.highlightData = t, this.render());
|
|
122
|
+
});
|
|
123
|
+
o(this, "unhighlight", () => {
|
|
124
|
+
this.highlightData = {}, this.render();
|
|
125
|
+
});
|
|
119
126
|
o(this, "_disable", (t) => {
|
|
120
|
-
var i, s,
|
|
127
|
+
var i, s, r;
|
|
121
128
|
const { userAction: e } = t;
|
|
122
|
-
this.hooks.emit("disable", { userAction: e }), (i = this.showRejection) == null || i.call(this, f.BreakOffByDisable), this.showPromise = void 0, (s = this.app) == null || s.$destroy(), this.app = void 0, (
|
|
129
|
+
this.hooks.emit("disable", { userAction: e }), (i = this.showRejection) == null || i.call(this, f.BreakOffByDisable), this.showPromise = void 0, (s = this.app) == null || s.$destroy(), this.app = void 0, (r = this.container) == null || r.remove(), this.removeEventListener();
|
|
123
130
|
});
|
|
124
131
|
o(this, "_enable", (t) => {
|
|
125
132
|
const { userAction: e } = t;
|
|
126
133
|
this.addEventListener(), this.wrapper && (this.wrapper.append(this.container), this.hooks.emit("enable", { userAction: e }), this.state.visible && this._show({ userAction: e }));
|
|
127
134
|
});
|
|
128
135
|
o(this, "_show", (t) => c(this, null, function* () {
|
|
129
|
-
var
|
|
136
|
+
var r;
|
|
130
137
|
if (!this.state.enabled)
|
|
131
138
|
return;
|
|
132
|
-
if (!((
|
|
139
|
+
if (!((r = this.five.model) != null && r.loaded))
|
|
133
140
|
throw new Error(f.ModelNotLoaded);
|
|
134
141
|
if (!this.data)
|
|
135
142
|
throw new Error(f.DataNotLoaded);
|
|
@@ -142,27 +149,27 @@ class _t extends T {
|
|
|
142
149
|
userAction: !0
|
|
143
150
|
}, i = l(l({}, e), t), s = () => c(this, null, function* () {
|
|
144
151
|
this.hooks.emit("show", { userAction: i.userAction, auto: i.isAutoShow });
|
|
145
|
-
let
|
|
146
|
-
this.showRejection = (
|
|
147
|
-
|
|
152
|
+
let a = !1, d;
|
|
153
|
+
this.showRejection = (S) => {
|
|
154
|
+
a = !0, d = S;
|
|
148
155
|
};
|
|
149
156
|
const [u] = yield I(R(this.five, this.showState, i.userAction));
|
|
150
157
|
if (u)
|
|
151
158
|
throw u;
|
|
152
|
-
if (
|
|
159
|
+
if (a)
|
|
153
160
|
throw d ? new Error(d) : new Error(f.UnknownError);
|
|
154
161
|
this.updateSize(), this.updatePosition(), this.floorIndex = i.floorIndex, this.five.model.show(this.floorIndex);
|
|
155
|
-
const p = i.modelOpacity,
|
|
156
|
-
|
|
162
|
+
const p = i.modelOpacity, g = i.immediately ? 0 : G;
|
|
163
|
+
E(this.five, p, g), this.render(g);
|
|
157
164
|
});
|
|
158
165
|
return this.showPromise = s().then(() => {
|
|
159
166
|
this.hooks.emit("showAnimationEnded", {
|
|
160
167
|
auto: i.isAutoShow,
|
|
161
168
|
userAction: i.userAction
|
|
162
169
|
});
|
|
163
|
-
}).catch((
|
|
164
|
-
if (this.updateState({ visible: !1 }, i.userAction), !i.isAutoShow &&
|
|
165
|
-
throw
|
|
170
|
+
}).catch((a) => {
|
|
171
|
+
if (this.updateState({ visible: !1 }, i.userAction), !i.isAutoShow && a instanceof Error)
|
|
172
|
+
throw a;
|
|
166
173
|
}).finally(() => {
|
|
167
174
|
this.showPromise = void 0, this.showRejection = void 0;
|
|
168
175
|
}), this.showPromise;
|
|
@@ -174,7 +181,7 @@ class _t extends T {
|
|
|
174
181
|
userAction: !0,
|
|
175
182
|
isAutoHide: !1
|
|
176
183
|
}), t);
|
|
177
|
-
|
|
184
|
+
E(this.five, 1, 0), this.hooks.emit("hide", { auto: i.isAutoHide, userAction: i.userAction }), this.render();
|
|
178
185
|
});
|
|
179
186
|
o(this, "handleClick", () => {
|
|
180
187
|
if (!this.state.visible)
|
|
@@ -238,6 +245,8 @@ class _t extends T {
|
|
|
238
245
|
const i = {
|
|
239
246
|
northDesc: "\u5317",
|
|
240
247
|
modelOpacity: 1,
|
|
248
|
+
cameraEnable: !0,
|
|
249
|
+
highlightEnable: !1,
|
|
241
250
|
hoverEnable: !0,
|
|
242
251
|
compassEnable: !0,
|
|
243
252
|
autoShowEnable: !0,
|
|
@@ -245,17 +254,17 @@ class _t extends T {
|
|
|
245
254
|
roomLabelsEnable: !0,
|
|
246
255
|
roomAreaEnable: !0,
|
|
247
256
|
roomNameEnable: !0,
|
|
248
|
-
cameraImageUrl:
|
|
257
|
+
cameraImageUrl: L,
|
|
249
258
|
attachedTo: O.BOUNDING_CENTER,
|
|
250
259
|
getLabelElement: void 0,
|
|
251
260
|
adaptiveRoomLabelVisibleEnable: !0,
|
|
252
|
-
getRoomAreaText: (
|
|
253
|
-
getRuleDistanceText: (
|
|
254
|
-
}, s = e ?
|
|
261
|
+
getRoomAreaText: (a) => (a / 1e6).toFixed(1) + "\u33A1",
|
|
262
|
+
getRuleDistanceText: (a) => a.toString()
|
|
263
|
+
}, s = e ? _(e, ["selector", "scale"]) : {}, r = l(l({}, i), s);
|
|
255
264
|
this.state = {
|
|
256
265
|
enabled: !0,
|
|
257
266
|
visible: !1,
|
|
258
|
-
config:
|
|
267
|
+
config: r
|
|
259
268
|
}, this.initContainer(), t.model.loaded ? this.onFiveModelLoaded() : t.once("modelLoaded", this.onFiveModelLoaded), t.once("dispose", this.dispose), this.addEventListener();
|
|
260
269
|
}
|
|
261
270
|
load(t, e, i = !0) {
|
|
@@ -263,10 +272,10 @@ class _t extends T {
|
|
|
263
272
|
function s(p) {
|
|
264
273
|
return Object.prototype.hasOwnProperty.apply(p, ["version"]);
|
|
265
274
|
}
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
const
|
|
269
|
-
this.data = yield
|
|
275
|
+
const r = t;
|
|
276
|
+
r && !r.version && console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");
|
|
277
|
+
const a = JSON.parse(JSON.stringify(t)), d = s(a) ? a.data : a, u = this.data;
|
|
278
|
+
this.data = yield b(d), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, u), e && this.updateState(e, i), this.render();
|
|
270
279
|
});
|
|
271
280
|
}
|
|
272
281
|
appendTo(t) {
|
|
@@ -288,24 +297,24 @@ class _t extends T {
|
|
|
288
297
|
setState(t, e = {}) {
|
|
289
298
|
const i = this.state, s = e.userAction !== void 0 ? e.userAction : !0;
|
|
290
299
|
if (this.updateState(t, s), t.enabled !== void 0 && i.enabled !== t.enabled && (t.enabled ? this._enable({ userAction: s }) : this._disable({ userAction: s })), t.visible !== void 0 && i.visible !== t.visible) {
|
|
291
|
-
const
|
|
292
|
-
t.visible ? this._show(
|
|
300
|
+
const r = { userAction: s };
|
|
301
|
+
t.visible ? this._show(r) : this._hide(r);
|
|
293
302
|
}
|
|
294
303
|
}
|
|
295
304
|
changeConfigs(t, e = !0) {
|
|
296
305
|
this.updateState({ config: t }, e), this.render();
|
|
297
306
|
}
|
|
298
307
|
updatePosition() {
|
|
299
|
-
var
|
|
300
|
-
const t = B(this.five, this.floorIndex, this.state.config.attachedTo), e = (
|
|
308
|
+
var a;
|
|
309
|
+
const t = B(this.five, this.floorIndex, this.state.config.attachedTo), e = (a = this.five.model) == null ? void 0 : a.bounding.getCenter(new x.Vector3()).setY(t);
|
|
301
310
|
if (!e)
|
|
302
311
|
return;
|
|
303
|
-
const i = e.clone().project(this.five.camera), s = (i.x + 1) / 2,
|
|
304
|
-
this.container.style.left = s * 100 + "%", this.container.style.top =
|
|
312
|
+
const i = e.clone().project(this.five.camera), s = (i.x + 1) / 2, r = -(i.y - 1) / 2;
|
|
313
|
+
this.container.style.left = s * 100 + "%", this.container.style.top = r * 100 + "%";
|
|
305
314
|
}
|
|
306
315
|
formatData(t) {
|
|
307
316
|
return c(this, null, function* () {
|
|
308
|
-
return yield
|
|
317
|
+
return yield b(t.data);
|
|
309
318
|
});
|
|
310
319
|
}
|
|
311
320
|
updateState(t, e) {
|
|
@@ -341,13 +350,14 @@ class _t extends T {
|
|
|
341
350
|
panoIndex: this.panoIndex,
|
|
342
351
|
floorIndex: this.floorIndex,
|
|
343
352
|
floorplanData: this.data,
|
|
344
|
-
lastPanoramaLongitude: this.lastPanoramaLongitude
|
|
353
|
+
lastPanoramaLongitude: this.lastPanoramaLongitude,
|
|
354
|
+
highlightData: this.highlightData
|
|
345
355
|
});
|
|
346
356
|
if (this.app)
|
|
347
357
|
return this.app.$set(e);
|
|
348
|
-
this.app = new
|
|
358
|
+
this.app = new D({ target: this.container, intro: !0, props: e });
|
|
349
359
|
}
|
|
350
360
|
}
|
|
351
361
|
export {
|
|
352
|
-
|
|
362
|
+
Lt as Controller
|
|
353
363
|
};
|
|
@@ -3,7 +3,7 @@ import type { BaseOptions } from '../../base/BasePlugin';
|
|
|
3
3
|
import type { Five } from '@realsee/five';
|
|
4
4
|
import type { ShowState } from '../utils/correctFiveState';
|
|
5
5
|
import type { FloorplanServerData } from '../typings/floorplanServerData';
|
|
6
|
-
import type { State, Config, EventMap, ShowOptions, HideOptions, Parameters, PluginData, PluginServerData } from './typing';
|
|
6
|
+
import type { State, Config, EventMap, ShowOptions, HideOptions, Parameters, PluginData, PluginServerData, HighlightData } from './typing';
|
|
7
7
|
import * as BasePlugin from '../../base/BasePluginWithData';
|
|
8
8
|
export declare class Controller extends BasePlugin.Controller<State, EventMap, PluginServerData, PluginData> {
|
|
9
9
|
name: string;
|
|
@@ -31,6 +31,8 @@ export declare class Controller extends BasePlugin.Controller<State, EventMap, P
|
|
|
31
31
|
private hasAddedEventListener;
|
|
32
32
|
/** 上一次隐藏是否是用户调用了 hide 导致的 */
|
|
33
33
|
private isHiddenByHideFunc;
|
|
34
|
+
/** 高亮区域 */
|
|
35
|
+
private highlightData;
|
|
34
36
|
constructor(five: Five, params?: Parameters);
|
|
35
37
|
load(serverData: PluginServerData | FloorplanServerData, state?: Partial<State>, userAction?: boolean): Promise<void>;
|
|
36
38
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
@@ -61,6 +63,8 @@ export declare class Controller extends BasePlugin.Controller<State, EventMap, P
|
|
|
61
63
|
changeConfigs(config: Partial<Config>, userAction?: boolean): void;
|
|
62
64
|
/** 更新户型图大小 */
|
|
63
65
|
updateSize: () => void;
|
|
66
|
+
highlight: (highlightData: HighlightData) => void;
|
|
67
|
+
unhighlight: () => void;
|
|
64
68
|
protected formatData(serverData: PluginServerData): Promise<PluginData>;
|
|
65
69
|
private _disable;
|
|
66
70
|
private _enable;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
1
|
+
var A = Object.defineProperty, S = Object.defineProperties;
|
|
2
2
|
var C = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var w = Object.getOwnPropertySymbols;
|
|
4
4
|
var P = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var m = (h, s, t) => s in h ?
|
|
5
|
+
var m = (h, s, t) => s in h ? A(h, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[s] = t, l = (h, s) => {
|
|
6
6
|
for (var t in s || (s = {}))
|
|
7
7
|
P.call(s, t) && m(h, t, s[t]);
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
8
|
+
if (w)
|
|
9
|
+
for (var t of w(s))
|
|
10
10
|
I.call(s, t) && m(h, t, s[t]);
|
|
11
11
|
return h;
|
|
12
12
|
}, v = (h, s) => S(h, C(s));
|
|
@@ -30,10 +30,10 @@ var f = (h, s, t) => new Promise((e, i) => {
|
|
|
30
30
|
import { to as M } from "../../shared-utils/to.js";
|
|
31
31
|
import { equal as x } from "../../shared-utils/equal.js";
|
|
32
32
|
import { Main as y } from "../Components/Main.js";
|
|
33
|
-
import { formatData as
|
|
34
|
-
import { CAMERA_IMAGE as
|
|
35
|
-
import { omit as
|
|
36
|
-
import { getPxmm as
|
|
33
|
+
import { formatData as b } from "../utils/formatData.js";
|
|
34
|
+
import { CAMERA_IMAGE as D } from "../Assets/camera.js";
|
|
35
|
+
import { omit as _ } from "../../shared-utils/filter.js";
|
|
36
|
+
import { getPxmm as L } from "../../shared-utils/getPxmm.js";
|
|
37
37
|
import { FLOOR_PLAN_ATTACHED_TO as O } from "../constant.js";
|
|
38
38
|
import { Controller as k } from "../../base/BasePluginWithData.js";
|
|
39
39
|
import { checkShowState as T, correctFiveState as B } from "../utils/correctFiveState.js";
|
|
@@ -78,7 +78,7 @@ function R(h) {
|
|
|
78
78
|
const { latitude: s, longitude: t } = h, e = Math.abs(s - Math.PI / 2) < 10 * Math.PI / 180, i = t < 30 * (Math.PI / 180) || t > 330 * (Math.PI / 180);
|
|
79
79
|
return e && i;
|
|
80
80
|
}
|
|
81
|
-
class
|
|
81
|
+
class _t extends k {
|
|
82
82
|
constructor(t, e) {
|
|
83
83
|
var a;
|
|
84
84
|
super(t);
|
|
@@ -98,6 +98,7 @@ class Lt extends k {
|
|
|
98
98
|
o(this, "size", { width: 0, height: 0 });
|
|
99
99
|
o(this, "hasAddedEventListener", !1);
|
|
100
100
|
o(this, "isHiddenByHideFunc", !1);
|
|
101
|
+
o(this, "highlightData", {});
|
|
101
102
|
o(this, "dispose", () => {
|
|
102
103
|
var t, e;
|
|
103
104
|
this.removeEventListener(), (t = this.app) == null || t.$destroy(), this.app = void 0, (e = this.container) == null || e.remove(), this.data = void 0, this.wrapper = void 0, this.selector = void 0, this.hooks.emit("dispose");
|
|
@@ -114,9 +115,15 @@ class Lt extends k {
|
|
|
114
115
|
o(this, "updateSize", () => {
|
|
115
116
|
if (!this.data || !T(this.five, this.showState) || !this.container || !this.wrapper)
|
|
116
117
|
return;
|
|
117
|
-
const { min: t, max: e } = this.data.bounding, i = e.x - t.x, n = e.y - t.y, d = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, a =
|
|
118
|
+
const { min: t, max: e } = this.data.bounding, i = e.x - t.x, n = e.y - t.y, d = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, a = L(this.five, this.wrapper, this.floorIndex, d), r = Math.ceil(i * a), u = Math.ceil(n * a);
|
|
118
119
|
this.size.width === r && this.size.height === u || (this.container.style.width = r + "px", this.container.style.height = u + "px", this.size = { width: r, height: u });
|
|
119
120
|
});
|
|
121
|
+
o(this, "highlight", (t) => {
|
|
122
|
+
!this.state.config.highlightEnable || (this.highlightData = t, this.render());
|
|
123
|
+
});
|
|
124
|
+
o(this, "unhighlight", () => {
|
|
125
|
+
this.highlightData = {}, this.render();
|
|
126
|
+
});
|
|
120
127
|
o(this, "_disable", (t) => {
|
|
121
128
|
var i, n, d;
|
|
122
129
|
const { userAction: e } = t;
|
|
@@ -144,8 +151,8 @@ class Lt extends k {
|
|
|
144
151
|
}, i = l(l({}, e), t), n = () => f(this, null, function* () {
|
|
145
152
|
this.hooks.emit("show", { userAction: i.userAction, auto: i.isAutoShow });
|
|
146
153
|
let a = !1, r;
|
|
147
|
-
this.showRejection = (
|
|
148
|
-
a = !0, r =
|
|
154
|
+
this.showRejection = (E) => {
|
|
155
|
+
a = !0, r = E;
|
|
149
156
|
};
|
|
150
157
|
const [u] = yield M(B(this.five, this.showState, i.userAction));
|
|
151
158
|
if (u)
|
|
@@ -153,8 +160,8 @@ class Lt extends k {
|
|
|
153
160
|
if (a)
|
|
154
161
|
throw r ? new Error(r) : new Error(c.UnknownError);
|
|
155
162
|
this.updateSize(), this.floorIndex = i.floorIndex, this.five.model.show(this.floorIndex);
|
|
156
|
-
const p = i.modelOpacity,
|
|
157
|
-
F(this.five, p,
|
|
163
|
+
const p = i.modelOpacity, g = i.immediately ? 0 : H;
|
|
164
|
+
F(this.five, p, g), this.render(g);
|
|
158
165
|
});
|
|
159
166
|
return this.showPromise = n().then(() => {
|
|
160
167
|
this.hooks.emit("showAnimationEnded", {
|
|
@@ -241,6 +248,8 @@ class Lt extends k {
|
|
|
241
248
|
const i = {
|
|
242
249
|
northDesc: "\u5317",
|
|
243
250
|
modelOpacity: 1,
|
|
251
|
+
cameraEnable: !0,
|
|
252
|
+
highlightEnable: !1,
|
|
244
253
|
hoverEnable: !0,
|
|
245
254
|
compassEnable: !0,
|
|
246
255
|
autoShowEnable: !0,
|
|
@@ -249,12 +258,12 @@ class Lt extends k {
|
|
|
249
258
|
roomAreaEnable: !0,
|
|
250
259
|
roomNameEnable: !0,
|
|
251
260
|
adaptiveRoomLabelVisibleEnable: !0,
|
|
252
|
-
cameraImageUrl:
|
|
261
|
+
cameraImageUrl: D,
|
|
253
262
|
attachedTo: O.BOUNDING_CENTER,
|
|
254
263
|
getLabelElement: void 0,
|
|
255
264
|
getRoomAreaText: (r) => (r / 1e6).toFixed(1) + "\u33A1",
|
|
256
265
|
getRuleDistanceText: (r) => r.toString()
|
|
257
|
-
}, n = e ?
|
|
266
|
+
}, n = e ? _(e, ["selector", "scale"]) : {}, d = l(l({}, i), n);
|
|
258
267
|
this.state = {
|
|
259
268
|
enabled: !0,
|
|
260
269
|
visible: !1,
|
|
@@ -269,7 +278,7 @@ class Lt extends k {
|
|
|
269
278
|
const d = t;
|
|
270
279
|
d && !d.version && console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");
|
|
271
280
|
const a = JSON.parse(JSON.stringify(t)), r = n(a) ? a.data : a, u = this.data;
|
|
272
|
-
this.data = yield
|
|
281
|
+
this.data = yield b(r), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, u), e && this.updateState(e, i), this.render();
|
|
273
282
|
});
|
|
274
283
|
}
|
|
275
284
|
appendTo(t) {
|
|
@@ -301,7 +310,7 @@ class Lt extends k {
|
|
|
301
310
|
}
|
|
302
311
|
formatData(t) {
|
|
303
312
|
return f(this, null, function* () {
|
|
304
|
-
return yield
|
|
313
|
+
return yield b(t.data);
|
|
305
314
|
});
|
|
306
315
|
}
|
|
307
316
|
updateState(t, e) {
|
|
@@ -337,7 +346,8 @@ class Lt extends k {
|
|
|
337
346
|
panoIndex: this.panoIndex,
|
|
338
347
|
floorIndex: this.floorIndex,
|
|
339
348
|
floorplanData: this.data,
|
|
340
|
-
lastPanoramaLongitude: this.lastPanoramaLongitude
|
|
349
|
+
lastPanoramaLongitude: this.lastPanoramaLongitude,
|
|
350
|
+
highlightData: this.highlightData
|
|
341
351
|
});
|
|
342
352
|
if (this.app)
|
|
343
353
|
return this.app.$set(e);
|
|
@@ -345,5 +355,5 @@ class Lt extends k {
|
|
|
345
355
|
}
|
|
346
356
|
}
|
|
347
357
|
export {
|
|
348
|
-
|
|
358
|
+
_t as Controller
|
|
349
359
|
};
|