@realsee/dnalogel 2.21.0-dev.14 → 2.21.0-dev.16
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/PanoMeasurePlugin/Controller/index.d.ts +1 -0
- package/dist/index.cjs.js +27 -27
- package/dist/index.js +613 -608
- package/dist/index.umd.js +31 -31
- package/docs/classes/CSS3DRender.html +30 -30
- package/docs/classes/CruisePluginController.html +25 -25
- package/docs/classes/GuideLineItem.GuideLineItem.html +19 -19
- package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +34 -34
- package/docs/classes/Magnifier.html +19 -19
- package/docs/classes/ModelRoomLabelController.html +10 -10
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +14 -14
- package/docs/classes/PanoMeasurePluginLine.html +26 -26
- package/docs/classes/PanoMeasurePluginModel.html +26 -26
- package/docs/classes/PanoMeasurePluginPoint.html +13 -13
- package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
- package/docs/classes/PanoTagPluginController.html +46 -46
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.Interval.html +11 -11
- package/docs/classes/Util.Magnifier.html +19 -19
- package/docs/classes/Util.PointDomHelper.html +10 -10
- package/docs/classes/Util.PointHelper.html +10 -10
- package/docs/classes/Util.PointSelectorHelper.html +15 -15
- package/docs/classes/Util.Rectangle.html +12 -12
- package/docs/enums/CameraMovementEffect.html +6 -6
- package/docs/enums/ContentType.html +19 -19
- package/docs/enums/DIRECTION.html +8 -8
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +8 -8
- package/docs/enums/DimensionType.html +6 -6
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +7 -7
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +8 -8
- package/docs/enums/PaintBrushTypeEnum.html +7 -7
- package/docs/enums/PointType.html +6 -6
- package/docs/enums/Rotation.html +7 -7
- package/docs/functions/CSS3DRenderPlugin.html +3 -3
- package/docs/functions/CameraMovementPlugin.html +3 -3
- package/docs/functions/CruisePlugin.html +3 -3
- package/docs/functions/GuideLinePlugin.html +4 -4
- package/docs/functions/ItemLabelPlugin.html +3 -3
- package/docs/functions/MapviewFloorplanPlugin.html +3 -3
- package/docs/functions/ModelChassisCompassPlugin.html +3 -3
- package/docs/functions/ModelEntryDoorGuidePlugin.html +3 -3
- package/docs/functions/ModelFloorplanPlugin.html +3 -3
- package/docs/functions/ModelItemLabelPlugin.html +3 -3
- package/docs/functions/ModelRoomLabelPlugin.html +3 -3
- package/docs/functions/ModelTVVideoPlugin.html +3 -3
- package/docs/functions/ModelViewPlugin.html +3 -3
- package/docs/functions/Object3DHelperPlugin.html +3 -3
- package/docs/functions/PanoCompassPlugin.html +3 -3
- package/docs/functions/PanoCursorRaycasterPlugin.html +3 -3
- package/docs/functions/PanoDoorLabelPlugin.html +3 -3
- package/docs/functions/PanoFloorplanRadarPlugin.html +3 -3
- package/docs/functions/PanoMeasurePlugin.html +3 -3
- package/docs/functions/PanoRulerPlugin.html +3 -3
- package/docs/functions/PanoRulerProPlugin.html +3 -3
- package/docs/functions/PanoSpatialTagPlugin.html +3 -3
- package/docs/functions/PanoTagPlugin.html +3 -3
- package/docs/functions/PanoVideoPlugin.html +3 -3
- package/docs/functions/TopviewFloorplanPlugin.html +3 -3
- package/docs/functions/Util.absoluteUrl.html +4 -4
- package/docs/functions/Util.getCoordsFromClient.html +4 -4
- package/docs/functions/Util.getCoordsFromElement.html +4 -4
- package/docs/functions/Util.getFrameTime.html +4 -4
- package/docs/functions/Util.getIntersectFromRelativePosition.html +4 -4
- package/docs/functions/Util.getRaycasterFromFivePointer.html +4 -4
- package/docs/functions/Util.isAbsoluteURL.html +4 -4
- package/docs/functions/Util.isModelLike.html +4 -4
- package/docs/functions/Util.isNil.html +4 -4
- package/docs/functions/Util.isPanoramaLike.html +4 -4
- package/docs/functions/Util.nextFrame.html +4 -4
- package/docs/functions/Util.notNil.html +4 -4
- package/docs/functions/Util.requestAnimationFrameInterval.html +4 -4
- package/docs/functions/Util.tweenProgress.html +4 -4
- package/docs/functions/Util.uuid.html +4 -4
- package/docs/functions/pluginFlag.html +4 -4
- package/docs/index.html +4 -4
- package/docs/interfaces/AddTagConfig.html +5 -5
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +10 -10
- package/docs/interfaces/CSS3DRenderPluginState.html +7 -7
- package/docs/interfaces/CameraMovementPluginExportType.html +6 -6
- package/docs/interfaces/CruisePluginTypes.Config.html +7 -7
- package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +11 -11
- package/docs/interfaces/CruisePluginTypes.EventMap.html +19 -19
- package/docs/interfaces/CruisePluginTypes.MoveAction.html +11 -11
- package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +13 -13
- package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +13 -13
- package/docs/interfaces/CruisePluginTypes.PluginData.html +8 -8
- package/docs/interfaces/CruisePluginTypes.PluginServerData.html +6 -6
- package/docs/interfaces/CruisePluginTypes.PluginState.html +10 -10
- package/docs/interfaces/EventMap.html +14 -14
- package/docs/interfaces/FloorplanBounding.html +7 -7
- package/docs/interfaces/FloorplanData.html +9 -9
- package/docs/interfaces/FloorplanEntrance.html +10 -10
- package/docs/interfaces/FloorplanExtraObject.html +9 -9
- package/docs/interfaces/FloorplanExtraObject3D.html +7 -7
- package/docs/interfaces/FloorplanFloorData.html +8 -8
- package/docs/interfaces/FloorplanImagePosition.html +6 -6
- package/docs/interfaces/FloorplanObserver.html +8 -8
- package/docs/interfaces/FloorplanOutlineItem.html +8 -8
- package/docs/interfaces/FloorplanPosition.html +6 -6
- package/docs/interfaces/FloorplanRoomItem.html +12 -12
- package/docs/interfaces/FloorplanRoomLabelItem.html +6 -6
- package/docs/interfaces/FloorplanServerBounding.html +7 -7
- package/docs/interfaces/FloorplanServerComputedData.html +9 -9
- package/docs/interfaces/FloorplanServerData.html +6 -6
- package/docs/interfaces/FloorplanServerDoorItem.html +9 -9
- package/docs/interfaces/FloorplanServerDoorPosition.html +7 -7
- package/docs/interfaces/FloorplanServerEntrance.html +10 -10
- package/docs/interfaces/FloorplanServerFloorData.html +8 -8
- package/docs/interfaces/FloorplanServerImagePosition.html +6 -6
- package/docs/interfaces/FloorplanServerObserver.html +8 -8
- package/docs/interfaces/FloorplanServerOutlineItem.html +8 -8
- package/docs/interfaces/FloorplanServerPosition.html +6 -6
- package/docs/interfaces/FloorplanServerRoomItem.html +13 -13
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +6 -6
- package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +7 -7
- package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +9 -9
- package/docs/interfaces/GuideLinePluginType.EventMap.html +12 -12
- package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +7 -7
- package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +5 -5
- package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +12 -12
- package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +7 -7
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +17 -17
- package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +6 -6
- package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +17 -17
- package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +4 -4
- package/docs/interfaces/GuideLinePluginType.PluginServerData.html +6 -6
- package/docs/interfaces/GuideLinePluginType.PluginState.html +7 -7
- package/docs/interfaces/GuideLinePluginType.Route.html +10 -10
- package/docs/interfaces/GuideLinePluginType.RouteConfig.html +8 -8
- package/docs/interfaces/HelperOffset.html +7 -7
- package/docs/interfaces/ImagePlaneGroup.html +5 -5
- package/docs/interfaces/ItemLabelPluginData.html +5 -5
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +10 -10
- package/docs/interfaces/ItemLabelPluginParametersType.html +8 -8
- package/docs/interfaces/MinMax.html +6 -6
- package/docs/interfaces/ModelChassisCompassPluginData.html +6 -6
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +6 -6
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +7 -7
- package/docs/interfaces/ModelItemLabelPluginData.html +5 -5
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +10 -10
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +6 -6
- package/docs/interfaces/ModelRoomLabelPluginData.html +5 -5
- package/docs/interfaces/ModelTVVideoPluginData.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginExportType.html +7 -7
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +5 -5
- package/docs/interfaces/ModelViewPluginExportType.html +10 -10
- package/docs/interfaces/Object3DHelperState.html +7 -7
- package/docs/interfaces/ObjectHelperControllers.html +8 -8
- package/docs/interfaces/PaintBrushAction.html +11 -11
- package/docs/interfaces/PaintBrushConfigs.html +11 -11
- package/docs/interfaces/PaintBrushState.html +9 -9
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +9 -9
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +4 -4
- package/docs/interfaces/PanoMeasureParameterType.html +14 -14
- package/docs/interfaces/PanoMeasurePluginLineJson.html +7 -7
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +6 -6
- package/docs/interfaces/PanoMeasurePluginPointJson.html +6 -6
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +7 -7
- package/docs/interfaces/PanoRulerPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerPluginOptions.html +6 -6
- package/docs/interfaces/PanoRulerPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginExportType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginOptions.html +6 -6
- package/docs/interfaces/PanoRulerProPluginParameterType.html +6 -6
- package/docs/interfaces/PanoRulerProPluginState.html +7 -7
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginData.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +9 -9
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +12 -12
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +9 -9
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +12 -12
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +9 -9
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +5 -5
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +7 -7
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +5 -5
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +8 -8
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +5 -5
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +7 -7
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +9 -9
- package/docs/interfaces/Point.html +7 -7
- package/docs/interfaces/Room.html +8 -8
- package/docs/interfaces/RoomInfo.html +6 -6
- package/docs/interfaces/RoomLabel.html +13 -13
- package/docs/interfaces/RoomRules.html +4 -4
- package/docs/interfaces/Rooms.html +4 -4
- package/docs/interfaces/Scissor.html +8 -8
- package/docs/interfaces/State.html +7 -7
- package/docs/interfaces/TagCacheInterface.html +11 -11
- package/docs/interfaces/TagConfig.html +12 -12
- package/docs/interfaces/TagGLTFObjectGroup.html +5 -5
- package/docs/interfaces/TagIconUrl.html +11 -11
- package/docs/interfaces/TagObjectGroup.html +5 -5
- package/docs/interfaces/TagStyle.html +5 -5
- package/docs/interfaces/Tags.html +8 -8
- package/docs/interfaces/TemporaryState.html +5 -5
- package/docs/interfaces/Util.MagnifierParameter.html +10 -10
- package/docs/interfaces/Util.MouseGroupParameter.html +7 -7
- package/docs/interfaces/Util.PointIntersection.html +7 -7
- package/docs/modules/CruisePluginTypes.html +4 -4
- package/docs/modules/GuideLineItem.html +4 -4
- package/docs/modules/GuideLineModeItem.html +4 -4
- package/docs/modules/GuideLinePluginType.html +4 -4
- package/docs/modules/PanoVideoPluginType.html +4 -4
- package/docs/modules/Util.html +4 -4
- package/docs/modules.html +4 -4
- package/docs/types/ArrayPosition.html +4 -4
- package/docs/types/AudioAppearance.html +4 -4
- package/docs/types/AudioTagTypeConfigKey.html +4 -4
- package/docs/types/CSS3DRenderExportType.html +4 -4
- package/docs/types/CSS3DRenderPluginExportType.html +4 -4
- package/docs/types/CSS3DRenderPluginParameterType.html +4 -4
- package/docs/types/ClassFunctionParameters.html +4 -4
- package/docs/types/Color.html +4 -4
- package/docs/types/ContentTypeConfigKey.html +4 -4
- package/docs/types/ContentTypeConfigKeySplit.html +4 -4
- package/docs/types/ContentTypeMap.html +4 -4
- package/docs/types/Create3DDomContainerReturnType.html +4 -4
- package/docs/types/Create3DElementReturnType.html +4 -4
- package/docs/types/CruisePluginExportType.html +4 -4
- package/docs/types/CruisePluginTypes.CruiseData.html +4 -4
- package/docs/types/CruisePluginTypes.MoveEffect.html +4 -4
- package/docs/types/DeprecatedMediaPlaneProperty.html +4 -4
- package/docs/types/DeprecatedTagProperty.html +4 -4
- package/docs/types/Direction-1.html +4 -4
- package/docs/types/Direction4.html +4 -4
- package/docs/types/ElementRenderer.html +4 -4
- package/docs/types/FloorplanRuleLabels.html +4 -4
- package/docs/types/FloorplanServerRuleLabels.html +4 -4
- package/docs/types/GuideLinePluginExportType.html +4 -4
- package/docs/types/GuideLinePluginType.GuideLineItem.html +4 -4
- package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +4 -4
- package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +4 -4
- package/docs/types/GuideLinePluginType.GuideLineStyle.html +4 -4
- package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +4 -4
- package/docs/types/GuideLinePluginType.PathItem.html +4 -4
- package/docs/types/GuideLinePluginType.PluginData.html +4 -4
- package/docs/types/HelperEventMap.html +4 -4
- package/docs/types/LoadTagConfig.html +4 -4
- package/docs/types/MapviewFloorplanPluginParameterType.html +4 -4
- package/docs/types/MapviewFloorplanPluginReturnType.html +4 -4
- package/docs/types/MediaData.html +4 -4
- package/docs/types/MediaStore.html +4 -4
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +4 -4
- package/docs/types/ModelFloorplanPluginParameterType.html +4 -4
- package/docs/types/ModelFloorplanPluginReturnType.html +4 -4
- package/docs/types/ModelRoomLabelPluginParameters.html +4 -4
- package/docs/types/ModelRoomLabelPluginReturnType.html +4 -4
- package/docs/types/MoveArgs.html +4 -4
- package/docs/types/MoveOpts.html +4 -4
- package/docs/types/Object3DHelperEventMap.html +4 -4
- package/docs/types/ObjectFit.html +4 -4
- package/docs/types/PaintBrushEventMap.html +4 -4
- package/docs/types/PanoCompassPluginData.html +4 -4
- package/docs/types/PanoCompassPluginExportType.html +4 -4
- package/docs/types/PanoCompassPluginParameterType.html +4 -4
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +4 -4
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +4 -4
- package/docs/types/PanoIndex.html +4 -4
- package/docs/types/PanoMeasurePluginEvent.html +4 -4
- package/docs/types/PanoMeasureReturnType.html +4 -4
- package/docs/types/PanoSpatialTagPluginId.html +4 -4
- package/docs/types/PanoTagPluginExportInterface.html +4 -4
- package/docs/types/PanoTagPluginParamsInterface.html +4 -4
- package/docs/types/PanoVideoPluginParameterType.html +4 -4
- package/docs/types/PanoVideoPluginReturnType.html +4 -4
- package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +4 -4
- package/docs/types/PlaneTag.html +4 -4
- package/docs/types/Point2DTag.html +4 -4
- package/docs/types/Point3DTag.html +4 -4
- package/docs/types/PointTag.html +4 -4
- package/docs/types/PointTagInstance.html +4 -4
- package/docs/types/Position.html +4 -4
- package/docs/types/RotateArgs.html +4 -4
- package/docs/types/RotateOpts.html +4 -4
- package/docs/types/RuleLabelsKey.html +4 -4
- package/docs/types/RuleLabelsValue.html +4 -4
- package/docs/types/StickType.html +4 -4
- package/docs/types/Tag.html +4 -4
- package/docs/types/Tag2D.html +4 -4
- package/docs/types/Tag3D.html +4 -4
- package/docs/types/TagContentType.html +4 -4
- package/docs/types/TagDimensionType.html +4 -4
- package/docs/types/TagElement.html +4 -4
- package/docs/types/TagEvents.html +4 -4
- package/docs/types/TagGLTFObject.html +4 -4
- package/docs/types/TagHooks.html +4 -4
- package/docs/types/TagId.html +4 -4
- package/docs/types/TagInstance.html +4 -4
- package/docs/types/TagPointType.html +4 -4
- package/docs/types/TagRendererMap.html +4 -4
- package/docs/types/TopviewFloorplanPluginParameterType.html +4 -4
- package/docs/types/TopviewFloorplanPluginReturnType.html +4 -4
- package/docs/types/WorkCode.html +4 -4
- package/docs/variables/FLOOR_TYPE_MAP.html +4 -4
- package/docs/variables/PLUGIN.html +4 -4
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +4 -4
- package/docs/variables/ROOM_TYPE_MAP.html +4 -4
- package/docs/variables/itemLabelPluginServerParams.html +4 -4
- package/docs/variables/modelItemLabelPluginServerParams.html +4 -4
- package/docs/variables/modelRoomLabelPluginServerParams.html +4 -4
- package/libs/PanoMeasurePlugin/Components/Common/Switcher0.js +105 -105
- package/libs/PanoMeasurePlugin/Components/Controller0.js +83 -83
- package/libs/PanoMeasurePlugin/Components/Controller1.js +103 -103
- package/libs/PanoMeasurePlugin/Components/Tip.js +58 -58
- package/libs/PanoMeasurePlugin/Controller/EditController.js +74 -72
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +7 -7
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Controller/index.js +14 -11
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +2 -2
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var R = Object.defineProperty;
|
|
2
|
-
var b = (m, c,
|
|
3
|
-
var o = (m, c,
|
|
2
|
+
var b = (m, c, t) => c in m ? R(m, c, { enumerable: !0, configurable: !0, writable: !0, value: t }) : m[c] = t;
|
|
3
|
+
var o = (m, c, t) => (b(m, typeof c != "symbol" ? c + "" : c, t), t);
|
|
4
4
|
import U from "../Model/line.js";
|
|
5
|
-
import
|
|
5
|
+
import S from "../Model/point.js";
|
|
6
6
|
import { throttle as H } from "../../shared-utils/throttle.js";
|
|
7
7
|
import j from "./BaseController.js";
|
|
8
8
|
import { Polyline as k } from "../Model/polyline.js";
|
|
@@ -66,9 +66,9 @@ import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
|
|
|
66
66
|
import "../Modules/DeleteDom/_Assets/delete_hover_bg.png.js";
|
|
67
67
|
const E = () => !1;
|
|
68
68
|
class Xe extends j {
|
|
69
|
-
constructor(
|
|
70
|
-
var
|
|
71
|
-
super(
|
|
69
|
+
constructor(t) {
|
|
70
|
+
var e;
|
|
71
|
+
super(t);
|
|
72
72
|
o(this, "type", "edit");
|
|
73
73
|
o(this, "polyline");
|
|
74
74
|
o(this, "area");
|
|
@@ -80,8 +80,8 @@ class Xe extends j {
|
|
|
80
80
|
o(this, "pointSelector");
|
|
81
81
|
o(this, "deleteDom");
|
|
82
82
|
/** 根据 intersection 更新放大镜和吸附点 */
|
|
83
|
-
o(this, "onIntersectionUpdate", H((
|
|
84
|
-
this.currentMeasureType === "area" && typeof
|
|
83
|
+
o(this, "onIntersectionUpdate", H((t, e) => {
|
|
84
|
+
this.currentMeasureType === "area" && typeof e == "boolean" && (e ? this.hook.emit("readyComplete") : this.hook.emit("notReadyComplete")), this.updateDashed();
|
|
85
85
|
}, 20));
|
|
86
86
|
/** 撤销编辑 */
|
|
87
87
|
o(this, "revoke", () => {
|
|
@@ -96,23 +96,23 @@ class Xe extends j {
|
|
|
96
96
|
this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.remove(), this.five.needsRender = !0, this.hook.emit("revoke", { isEmpty: !0 });
|
|
97
97
|
return;
|
|
98
98
|
} else
|
|
99
|
-
this.lastPoint = new
|
|
99
|
+
this.lastPoint = new S(this.area.points[this.area.points.length - 1]), this.updateDashed();
|
|
100
100
|
this.five.needsRender = !0;
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
/**
|
|
104
104
|
* @description: 测距的撤销功能
|
|
105
105
|
*/
|
|
106
|
-
o(this, "revokeLine", (
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
106
|
+
o(this, "revokeLine", (t) => {
|
|
107
|
+
const e = t || this.polyline;
|
|
108
|
+
if (e.lines.length === 0 && this.lastPoint) {
|
|
109
109
|
this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.remove(), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.needsRender = !0;
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
|
-
if (
|
|
112
|
+
if (e.lines.length === 0 && !this.lastPoint || !this.lastPoint)
|
|
113
113
|
return;
|
|
114
|
-
const i =
|
|
115
|
-
s && (this.lastPoint = s, this.hook.emit("anchorChange", s.position), this.group.remove(i.mesh),
|
|
114
|
+
const i = e.lines[e.lines.length - 1], s = i.findAnotherPoint(this.lastPoint);
|
|
115
|
+
s && (this.lastPoint = s, this.hook.emit("anchorChange", s.position), this.group.remove(i.mesh), e.removeLine(i), i.distanceItem.remove(), this.updateDashed(), this.hook.emit("pointsChange", e.lines), this.five.needsRender = !0);
|
|
116
116
|
});
|
|
117
117
|
o(this, "onMouseLeave", () => {
|
|
118
118
|
this.dashed.hide(), this.perpendicularDashed.hide(), this.area.hideArea();
|
|
@@ -123,8 +123,8 @@ class Xe extends j {
|
|
|
123
123
|
});
|
|
124
124
|
o(this, "onWantsSelect", () => {
|
|
125
125
|
if (this.currentMeasureType === "area") {
|
|
126
|
-
const
|
|
127
|
-
if (this.area.points.length >= 3 &&
|
|
126
|
+
const t = this.area.polygon.isBlank || this.area.polygon.visible === !1;
|
|
127
|
+
if (this.area.points.length >= 3 && t)
|
|
128
128
|
return !1;
|
|
129
129
|
}
|
|
130
130
|
});
|
|
@@ -136,33 +136,35 @@ class Xe extends j {
|
|
|
136
136
|
o(this, "onSelect", () => {
|
|
137
137
|
var s, r, l, d;
|
|
138
138
|
this.hasAppendDashed || (this.dashed.distanceItem.appendTo(this.container), this.group.add(this.dashed.mesh), this.currentMeasureType === "area" && this.group.add(this.perpendicularDashed.mesh)), this.hasAppendDashed = !0;
|
|
139
|
-
const
|
|
139
|
+
const t = (() => {
|
|
140
140
|
var a, n;
|
|
141
141
|
if (this.currentMeasureType === "area")
|
|
142
142
|
return this.area.projectPoint((a = this.pointSelector.position) == null ? void 0 : a.point);
|
|
143
143
|
if (this.currentMeasureType === "line")
|
|
144
144
|
return (n = this.pointSelector.position) == null ? void 0 : n.point;
|
|
145
145
|
})();
|
|
146
|
-
if (!
|
|
146
|
+
if (!t)
|
|
147
147
|
return;
|
|
148
|
-
const
|
|
149
|
-
if (
|
|
150
|
-
if (
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
if (this.
|
|
158
|
-
this.
|
|
159
|
-
|
|
148
|
+
const e = new S(t), i = this.lastPoint;
|
|
149
|
+
if (!(i != null && i.position && e.position.equals(i == null ? void 0 : i.position))) {
|
|
150
|
+
if (this.lastPoint = e, this.currentMeasureType === "line") {
|
|
151
|
+
if (e && i) {
|
|
152
|
+
const n = new U(i, e, this.model);
|
|
153
|
+
n.distanceItem.setCanSelect(!1), n.distanceItem.appendTo(this.container), this.polyline.addLine(n), this.group.add(n.mesh), n.distanceItem.update(this.five);
|
|
154
|
+
}
|
|
155
|
+
const a = (r = (s = this.editParams) == null ? void 0 : s.autoEndConfig) == null ? void 0 : r.line;
|
|
156
|
+
typeof a == "number" && (this.polyline.getPointLength() >= a ? this.complete() : this.polyline.getPointLength() === a - 1 && this.hook.emit("readyComplete")), this.hook.emit("pointsChange", this.polyline.points);
|
|
157
|
+
} else if (this.currentMeasureType === "area") {
|
|
158
|
+
if (this.area.addPoints(e.position), this.area.isClosed) {
|
|
159
|
+
this.complete();
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
this.area.points.length >= 3 ? this.pointSelector.setAdherePoints(this.area.points[0]) : this.pointSelector.setAdherePoints(null);
|
|
163
|
+
const a = (d = (l = this.editParams) == null ? void 0 : l.autoEndConfig) == null ? void 0 : d.area;
|
|
164
|
+
typeof a == "number" && (this.area.points.length >= a ? this.complete() : this.area.points.length === a - 1 && this.hook.emit("readyComplete")), this.hook.emit("pointsChange", this.area.points);
|
|
160
165
|
}
|
|
161
|
-
this.
|
|
162
|
-
const a = (d = (l = this.editParams) == null ? void 0 : l.autoEndConfig) == null ? void 0 : d.area;
|
|
163
|
-
typeof a == "number" && (this.area.points.length >= a ? this.complete() : this.area.points.length === a - 1 && this.hook.emit("readyComplete")), this.hook.emit("pointsChange", this.area.points);
|
|
166
|
+
this.updateDashed(), this.five.needsRender = !0, this.hook.emit("anchorChange", e.position);
|
|
164
167
|
}
|
|
165
|
-
this.updateDashed(), this.five.needsRender = !0, this.hook.emit("anchorChange", t.position);
|
|
166
168
|
});
|
|
167
169
|
/** 移动全景时更新 distanceItem 在屏幕上的位置 */
|
|
168
170
|
o(this, "onCameraUpdate", () => {
|
|
@@ -173,31 +175,31 @@ class Xe extends j {
|
|
|
173
175
|
var i;
|
|
174
176
|
if (!this.lastPoint)
|
|
175
177
|
return;
|
|
176
|
-
const
|
|
178
|
+
const t = this.lastPoint.position, e = (() => {
|
|
177
179
|
var s, r;
|
|
178
180
|
if (this.currentMeasureType === "area")
|
|
179
181
|
return this.area.projectPoint((s = this.pointSelector.position) == null ? void 0 : s.point);
|
|
180
182
|
if (this.currentMeasureType === "line")
|
|
181
183
|
return (r = this.pointSelector.position) == null ? void 0 : r.point;
|
|
182
184
|
})();
|
|
183
|
-
if (!
|
|
185
|
+
if (!e) {
|
|
184
186
|
this.dashed.hide();
|
|
185
187
|
return;
|
|
186
188
|
}
|
|
187
|
-
if (this.dashed.show(), this.dashed.setPoints(
|
|
189
|
+
if (this.dashed.show(), this.dashed.setPoints(t, e), this.dashed.distanceItem.update(this.five), this.hook.emit("editedDashedLineChange", this.dashed), this.currentMeasureType === "area")
|
|
188
190
|
if (this.area.areaItem.setCanSelect(!1), this.area.points.length >= 2) {
|
|
189
191
|
const s = (i = this.pointSelector.position) == null ? void 0 : i.point;
|
|
190
192
|
if (s) {
|
|
191
|
-
const n = s, g =
|
|
193
|
+
const n = s, g = e;
|
|
192
194
|
this.perpendicularDashed.setPoints(n, g), this.perpendicularDashed.show();
|
|
193
195
|
} else
|
|
194
196
|
this.perpendicularDashed.hide();
|
|
195
|
-
const r = this.area.polyline.lines.map((n) => ({ start: n.points[0].position, end: n.points[1].position })), l = T({ start:
|
|
197
|
+
const r = this.area.polyline.lines.map((n) => ({ start: n.points[0].position, end: n.points[1].position })), l = T({ start: t, end: e }, r), d = T({ start: e, end: this.area.points[0] }, r);
|
|
196
198
|
if (l || d)
|
|
197
199
|
this.area.hideArea(), this.hook.emit("allowAddPointStateChange", "forbid");
|
|
198
200
|
else {
|
|
199
201
|
this.area.showArea();
|
|
200
|
-
const n = [...this.area.points,
|
|
202
|
+
const n = [...this.area.points, e];
|
|
201
203
|
this.area.polygon.updatePoints(n), this.area.areaItem.updateArea(this.five), this.hook.emit("allowAddPointStateChange", "allow");
|
|
202
204
|
}
|
|
203
205
|
} else
|
|
@@ -206,19 +208,19 @@ class Xe extends j {
|
|
|
206
208
|
});
|
|
207
209
|
// ====================================================================================================================================
|
|
208
210
|
// 下面一堆高亮相关
|
|
209
|
-
o(this, "wantsTapGesture", (
|
|
210
|
-
var A,
|
|
211
|
+
o(this, "wantsTapGesture", (t) => {
|
|
212
|
+
var A, C;
|
|
211
213
|
if (this.editParams.pointSelectorMode === "cursor" || this.lastPoint)
|
|
212
214
|
return !1;
|
|
213
|
-
const
|
|
215
|
+
const e = this.model.areas.map((h) => t.intersectObject(h.polygon, !0)[0]).sort((h, p) => h.distance - p.distance), i = (C = (A = e[0]) == null ? void 0 : A.object) == null ? void 0 : C.parent;
|
|
214
216
|
if (i != null && i.isPolygonMesh) {
|
|
215
217
|
const h = this.model.areas.find((p) => p.polygon === i);
|
|
216
218
|
if (h) {
|
|
217
|
-
const { x: p, y: v } =
|
|
219
|
+
const { x: p, y: v } = e[0].point.clone().project(this.five.camera), f = `${(p + 1) / 2 * 100}%`, u = `${(-v + 1) / 2 * 100}%`;
|
|
218
220
|
return this.chooseArea(h, { left: f, top: u }), !1;
|
|
219
221
|
}
|
|
220
222
|
}
|
|
221
|
-
const [s] = this.five.model.intersectRaycaster(
|
|
223
|
+
const [s] = this.five.model.intersectRaycaster(t);
|
|
222
224
|
if (!s)
|
|
223
225
|
return;
|
|
224
226
|
const r = this.five.camera, l = s.point.clone().project(r), d = this.container.clientWidth, a = this.container.clientHeight, n = new y(l.x * d, l.y * a), g = this.model.getAllLines().map((h) => {
|
|
@@ -240,18 +242,18 @@ class Xe extends j {
|
|
|
240
242
|
if (L)
|
|
241
243
|
return this.chooseLine(L), !1;
|
|
242
244
|
});
|
|
243
|
-
o(this, "chooseLine", (
|
|
244
|
-
const
|
|
245
|
-
this.deleteDom.setTarget(
|
|
245
|
+
o(this, "chooseLine", (t) => {
|
|
246
|
+
const e = B(t);
|
|
247
|
+
this.deleteDom.setTarget(e).setLines(e).updatePosition().show(), this.highlightLines(e), this.hook.emit("selectedChange", e);
|
|
246
248
|
});
|
|
247
|
-
o(this, "chooseArea", (
|
|
248
|
-
console.log("choose area"), this.deleteDom.setTarget(
|
|
249
|
+
o(this, "chooseArea", (t, e) => {
|
|
250
|
+
console.log("choose area"), this.deleteDom.setTarget(t).updatePosition(e.left, `calc(${e.top} - 1.5rem)`).show(), this.highlightArea(t);
|
|
249
251
|
});
|
|
250
|
-
o(this, "deleteArea", (
|
|
251
|
-
this.unHighlightArea(
|
|
252
|
+
o(this, "deleteArea", (t) => {
|
|
253
|
+
this.unHighlightArea(t), t.dispose(), this.deleteDom.hide();
|
|
252
254
|
});
|
|
253
|
-
o(this, "deleteLine", (
|
|
254
|
-
const
|
|
255
|
+
o(this, "deleteLine", (t) => {
|
|
256
|
+
const e = t[0], i = this.model.getPolylineByLine(e);
|
|
255
257
|
i && (this.model.removePolyline(i), i.lines.forEach((s) => this.removeLine(s)), this.deleteDom.setLines([]).hide());
|
|
256
258
|
});
|
|
257
259
|
this.fiveElement = this.five.getElement(), this.deleteDom = new G(this.five, {
|
|
@@ -259,7 +261,7 @@ class Xe extends j {
|
|
|
259
261
|
onClick: (i, s) => {
|
|
260
262
|
var d;
|
|
261
263
|
const r = s.type === "area", l = Array.isArray(s) && ((d = s[0]) == null ? void 0 : d.type) === "line";
|
|
262
|
-
|
|
264
|
+
r && this.deleteArea(s), l && this.deleteLine(s);
|
|
263
265
|
},
|
|
264
266
|
cancel: (i) => {
|
|
265
267
|
var l;
|
|
@@ -281,13 +283,13 @@ class Xe extends j {
|
|
|
281
283
|
i.areaItem.appendTo(this.container), i.areaItem.updateDomPosition(this.five), i.areaItem.setCanSelect(!0), this.group.add(i.polygon), i.polyline.lines.forEach((s) => {
|
|
282
284
|
s.distanceItem.appendTo(this.container), s.distanceItem.update(this.five), this.group.add(s.mesh);
|
|
283
285
|
});
|
|
284
|
-
}), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", this.wantsTapGesture), this.five.on("wantsToMoveToPano", E), this.pointSelector.hook.on("intersectionUpdate", this.onIntersectionUpdate), this.pointSelector.hook.on("select", this.onSelect), this.pointSelector.hook.on("wantsSelect", this.onWantsSelect), this.polyline.hook.on("lineAdded", this.onLineChanged), this.polyline.hook.on("lineRemoved", this.onLineChanged), this.five.helperVisible = !1, (
|
|
286
|
+
}), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", this.wantsTapGesture), this.five.on("wantsToMoveToPano", E), this.pointSelector.hook.on("intersectionUpdate", this.onIntersectionUpdate), this.pointSelector.hook.on("select", this.onSelect), this.pointSelector.hook.on("wantsSelect", this.onWantsSelect), this.polyline.hook.on("lineAdded", this.onLineChanged), this.polyline.hook.on("lineRemoved", this.onLineChanged), this.five.helperVisible = !1, (e = this.fiveElement) == null || e.addEventListener("mouseleave", this.onMouseLeave), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.refresh();
|
|
285
287
|
}
|
|
286
288
|
dispose() {
|
|
287
|
-
var
|
|
288
|
-
super.dispose(), this.model.areas.forEach((
|
|
289
|
-
(
|
|
290
|
-
}), this.five.helperVisible = !0, this.pointSelector.disable(), this.dashed.remove(), this.perpendicularDashed.remove(), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsTapGesture", this.wantsTapGesture), this.five.off("wantsToMoveToPano", E), this.pointSelector.hook.off("intersectionUpdate", this.onIntersectionUpdate), this.pointSelector.hook.off("select", this.onSelect), this.polyline.hook.off("lineAdded", this.onLineChanged), this.polyline.hook.off("lineRemoved", this.onLineChanged), (
|
|
289
|
+
var t;
|
|
290
|
+
super.dispose(), this.model.areas.forEach((e) => {
|
|
291
|
+
(e.points.length < 2 || e.polygon.isBlank) && this.model.removeArea(e);
|
|
292
|
+
}), this.five.helperVisible = !0, this.pointSelector.disable(), this.dashed.remove(), this.perpendicularDashed.remove(), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsTapGesture", this.wantsTapGesture), this.five.off("wantsToMoveToPano", E), this.pointSelector.hook.off("intersectionUpdate", this.onIntersectionUpdate), this.pointSelector.hook.off("select", this.onSelect), this.polyline.hook.off("lineAdded", this.onLineChanged), this.polyline.hook.off("lineRemoved", this.onLineChanged), (t = this.fiveElement) == null || t.removeEventListener("mouseleave", this.onMouseLeave), this.magnifier.dispose(), this.dashed.distanceItem.remove(), this.five.needsRender = !0;
|
|
291
293
|
}
|
|
292
294
|
getEditingLines() {
|
|
293
295
|
return this.polyline.lines;
|
|
@@ -298,22 +300,22 @@ class Xe extends j {
|
|
|
298
300
|
complete() {
|
|
299
301
|
this.hook.emit("complete"), this.currentMeasureType === "area" ? (this.area.points.length < 3 ? this.deleteArea(this.area) : (this.area.showArea(), this.area.complete()), this.area = new D(void 0, { five: this.five, model: this.model, meshContainer: this.group, domContainer: this.container }), this.model.addArea(this.area)) : this.currentMeasureType === "line" && (this.polyline = new k({ model: this.model }), this.model.addPolyline(this.polyline)), this.pointSelector.setAdherePoints(null), this.dashed.hide(), this.perpendicularDashed.hide(), this.lastPoint = void 0;
|
|
300
302
|
}
|
|
301
|
-
highlightArea(
|
|
302
|
-
this.highlightLines(
|
|
303
|
+
highlightArea(t) {
|
|
304
|
+
this.highlightLines(t.polyline.lines), this.five.needsRender = !0;
|
|
303
305
|
}
|
|
304
|
-
unHighlightArea(
|
|
305
|
-
this.unHighlightLines(
|
|
306
|
+
unHighlightArea(t) {
|
|
307
|
+
this.unHighlightLines(t.polyline.lines), this.five.needsRender = !0;
|
|
306
308
|
}
|
|
307
|
-
highlightLines(
|
|
308
|
-
|
|
309
|
+
highlightLines(t) {
|
|
310
|
+
t.forEach((e) => this.highlightLine(e));
|
|
309
311
|
}
|
|
310
|
-
unHighlightLines(
|
|
311
|
-
|
|
312
|
-
|
|
312
|
+
unHighlightLines(t) {
|
|
313
|
+
t.forEach((e) => {
|
|
314
|
+
e.selected = !1, e.distanceItem.unHighlight(), this.group.remove(e.lightMesh), this.five.needsRender = !0;
|
|
313
315
|
});
|
|
314
316
|
}
|
|
315
|
-
highlightLine(
|
|
316
|
-
|
|
317
|
+
highlightLine(t) {
|
|
318
|
+
t.selected || (t.selected = !0, this.group.add(t.lightMesh), t.distanceItem.highlight(), this.five.needsRender = !0);
|
|
317
319
|
}
|
|
318
320
|
}
|
|
319
321
|
export {
|
|
@@ -8,8 +8,8 @@ import G from "./BaseController.js";
|
|
|
8
8
|
import { Raycaster as T, Vector2 as u } from "three";
|
|
9
9
|
import { closestPointOnLine as U } from "../utils/math.js";
|
|
10
10
|
import { findClosestPoint as b } from "../utils/findClosestPoint.js";
|
|
11
|
-
import { findAssociatedLines as
|
|
12
|
-
import { getPointFromHammerEvent as
|
|
11
|
+
import { findAssociatedLines as D } from "../utils/findAssociatedLines.js";
|
|
12
|
+
import { getPointFromHammerEvent as w } from "../../shared-utils/getPointFromHammerEvent.js";
|
|
13
13
|
import j from "../Model/area.js";
|
|
14
14
|
import x from "../Model/polygon.js";
|
|
15
15
|
import "../Modules/DeleteDom/_Assets/delete.svg.js";
|
|
@@ -50,14 +50,14 @@ class Pe extends G {
|
|
|
50
50
|
var a;
|
|
51
51
|
if (this.model.getAllLines().length === 0 || !this.fiveElement)
|
|
52
52
|
return;
|
|
53
|
-
const i =
|
|
53
|
+
const i = w(e).point, t = (a = b(this.five, this.model.getAllPoints(), i, 20)) == null ? void 0 : a.point;
|
|
54
54
|
if (!t) {
|
|
55
55
|
this.editPointState = void 0;
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
58
|
const n = {
|
|
59
59
|
point: t,
|
|
60
|
-
associatedLines:
|
|
60
|
+
associatedLines: D(t.lines[0])
|
|
61
61
|
};
|
|
62
62
|
this.hook.emit("wantsDragLine", {
|
|
63
63
|
point: t.id,
|
|
@@ -70,7 +70,7 @@ class Pe extends G {
|
|
|
70
70
|
s(this, "onPan", (e) => {
|
|
71
71
|
if (!this.editPointState || !this.fiveElement)
|
|
72
72
|
return;
|
|
73
|
-
const i =
|
|
73
|
+
const i = w(e).ndcPoint, t = new T();
|
|
74
74
|
t.setFromCamera(i, this.five.camera);
|
|
75
75
|
const [n] = this.five.model.intersectRaycaster(t);
|
|
76
76
|
n && this.onIntersectionUpdate(n);
|
|
@@ -129,8 +129,8 @@ class Pe extends G {
|
|
|
129
129
|
});
|
|
130
130
|
s(this, "chooseLine", (e) => {
|
|
131
131
|
this.choose = "line";
|
|
132
|
-
const i =
|
|
133
|
-
this.deleteDom.setLines(i).updatePosition().show(), this.highlightLines(i), this.five.needsRender = !0, this.hook.emit(
|
|
132
|
+
const i = D(e);
|
|
133
|
+
this.deleteDom.setLines(i).updatePosition().show(), console.log(this.deleteDom), this.highlightLines(i), this.five.needsRender = !0, this.hook.emit(
|
|
134
134
|
"selectedChange",
|
|
135
135
|
i.map((t) => t)
|
|
136
136
|
);
|
|
@@ -44,6 +44,7 @@ export default class MeasureController {
|
|
|
44
44
|
private shortcutKeyController?;
|
|
45
45
|
constructor(five: Five, params: PanoMeasureParameterType);
|
|
46
46
|
appendTo(parent: HTMLElement): void;
|
|
47
|
+
clear(): void;
|
|
47
48
|
dispose(): void;
|
|
48
49
|
/** 加载数据
|
|
49
50
|
* @description 数据加载时会覆盖当前已保存的数据
|
|
@@ -11,10 +11,10 @@ var c = (s, e, t) => e in s ? I(s, e, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
};
|
|
12
12
|
var i = (s, e, t) => (c(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
13
13
|
import k from "../Modules/FiveHelper.js";
|
|
14
|
-
import
|
|
14
|
+
import a from "./EditController.js";
|
|
15
15
|
import w from "./ViewController.js";
|
|
16
16
|
import v from "./WatchController.js";
|
|
17
|
-
import
|
|
17
|
+
import h from "./MixedController.js";
|
|
18
18
|
import { omit as D } from "../../shared-utils/filter.js";
|
|
19
19
|
import { Group as U } from "three";
|
|
20
20
|
import { Model as x } from "../Model/index.js";
|
|
@@ -138,7 +138,7 @@ class xt {
|
|
|
138
138
|
var e, t, r, o;
|
|
139
139
|
this.hasOpen = !1, this.container.style.opacity = "0", (e = this.controller) == null || e.dispose(), (t = this.useUIController) == null || t.hide(), (r = this.useGuideController) == null || r.hide(), (o = this.shortcutKeyController) == null || o.dispose(), this.controller = null, this.five.helperVisible = !0, this.five.scene.remove(this.group), this.five.needsRender = !0, this.hook.emit("disable", !0);
|
|
140
140
|
});
|
|
141
|
-
i(this, "getCurrentMode", () => this.controller instanceof
|
|
141
|
+
i(this, "getCurrentMode", () => this.controller instanceof a ? "Edit" : this.controller instanceof v ? "Watch" : this.controller instanceof h ? "Mixed" : this.controller instanceof w ? "View" : null);
|
|
142
142
|
/** 变更场景
|
|
143
143
|
* @description 如果从编辑场景改变到观看场景,不会自动保存,默认丢弃所有改动
|
|
144
144
|
*/
|
|
@@ -150,8 +150,8 @@ class xt {
|
|
|
150
150
|
const t = {
|
|
151
151
|
View: w,
|
|
152
152
|
Watch: v,
|
|
153
|
-
Edit:
|
|
154
|
-
Mixed:
|
|
153
|
+
Edit: a,
|
|
154
|
+
Mixed: h
|
|
155
155
|
};
|
|
156
156
|
if (!t[e])
|
|
157
157
|
throw new Error("不存在的 Mode");
|
|
@@ -179,9 +179,12 @@ class xt {
|
|
|
179
179
|
appendTo(e) {
|
|
180
180
|
e.append(this.container);
|
|
181
181
|
}
|
|
182
|
+
clear() {
|
|
183
|
+
this.model.clear();
|
|
184
|
+
}
|
|
182
185
|
dispose() {
|
|
183
186
|
var e, t;
|
|
184
|
-
this.disable(), (e = this.useUIController) == null || e.dispose(), (t = this.magnifier) == null || t.dispose(), this.five.needsRender = !0;
|
|
187
|
+
this.disable(), this.clear(), (e = this.useUIController) == null || e.dispose(), (t = this.magnifier) == null || t.dispose(), this.five.needsRender = !0;
|
|
185
188
|
}
|
|
186
189
|
/** 加载数据
|
|
187
190
|
* @description 数据加载时会覆盖当前已保存的数据
|
|
@@ -206,7 +209,7 @@ class xt {
|
|
|
206
209
|
}
|
|
207
210
|
/** 撤销编辑 */
|
|
208
211
|
revoke() {
|
|
209
|
-
this.controller instanceof
|
|
212
|
+
this.controller instanceof a && this.controller.revoke();
|
|
210
213
|
}
|
|
211
214
|
removePolyline(e) {
|
|
212
215
|
this.model.removePolyline(e);
|
|
@@ -240,22 +243,22 @@ class xt {
|
|
|
240
243
|
*/
|
|
241
244
|
save(e) {
|
|
242
245
|
var l;
|
|
243
|
-
if (!(this.controller instanceof
|
|
246
|
+
if (!(this.controller instanceof a) && !(this.controller instanceof h))
|
|
244
247
|
return this;
|
|
245
248
|
const t = (l = e == null ? void 0 : e.mode) != null ? l : "View", r = this.controller.model.polylines, o = this.controller.model.areas;
|
|
246
249
|
return r.forEach((n) => {
|
|
247
250
|
this.model.addPolyline(n);
|
|
248
|
-
}), this.controller instanceof
|
|
251
|
+
}), this.controller instanceof a ? this.controller.complete() : o.forEach((n) => {
|
|
249
252
|
n.showArea(), this.model.addArea(n);
|
|
250
253
|
}), this.changeMode(t), this;
|
|
251
254
|
}
|
|
252
255
|
/** Mixed 模式才有用,添加起点 */
|
|
253
256
|
addStartPoint() {
|
|
254
|
-
this.controller instanceof
|
|
257
|
+
this.controller instanceof h && this.hook.emit("willChangeState", "watching", "editing");
|
|
255
258
|
}
|
|
256
259
|
/** Mixed 模式才有用,添加终点 */
|
|
257
260
|
addEndPoint() {
|
|
258
|
-
this.controller instanceof
|
|
261
|
+
this.controller instanceof h && this.hook.emit("willChangeState", "editing", "watching");
|
|
259
262
|
}
|
|
260
263
|
/** 导出数据 */
|
|
261
264
|
toJson() {
|
|
@@ -52,7 +52,7 @@ class $ {
|
|
|
52
52
|
}
|
|
53
53
|
updatePosition(t, e) {
|
|
54
54
|
if (t && e)
|
|
55
|
-
return this.container.style.left = t, this.container.style.top = e, this.show();
|
|
55
|
+
return this.container.style.left = t, this.container.style.top = e, this.container.style.transform = "", this.show();
|
|
56
56
|
if (this.lines.length === 0)
|
|
57
57
|
return this;
|
|
58
58
|
const s = this.points.map((i) => i.position), c = s.map((i) => i.clone().project(this.five.camera));
|
|
@@ -67,7 +67,7 @@ class $ {
|
|
|
67
67
|
const i = (a[1] - a[0]) / (o[1] - o[0]), g = -((a[1] + a[0]) / 2 - 1) / 2 * h.clientHeight;
|
|
68
68
|
Math.abs(i) > 0.4 && (m = l + 57, d = g);
|
|
69
69
|
}
|
|
70
|
-
return this.container.style.top = "0", this.container.style.transform = `translate3d(${m}px, ${d}px, 0)`, this.show();
|
|
70
|
+
return this.container.style.top = "0", this.container.style.left = "0", this.container.style.transform = `translate3d(${m}px, ${d}px, 0)`, this.show();
|
|
71
71
|
}
|
|
72
72
|
hide() {
|
|
73
73
|
return this.visible = !1, this.masking.style.pointerEvents = "none", this.container.style.opacity = "0", this.container.style.pointerEvents = "none", this;
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv2.21.0-dev.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv2.21.0-dev.16",
|
|
4
4
|
[
|
|
5
5
|
"background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
|
|
6
6
|
"background-repeat: no-repeat",
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"repository": "https://github.com/realsee-developer/dnalogel.git",
|
|
8
8
|
"description": "如视 VR 看房插件合集",
|
|
9
9
|
"private": false,
|
|
10
|
-
"version": "2.21.0-dev.
|
|
10
|
+
"version": "2.21.0-dev.16",
|
|
11
11
|
"license": "SEE LICENSE IN TERMS.txt",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"clean": "rm -rf components dist docs libs types ./vite.config.js.timestamp*",
|