@realsee/dnalogel 2.3.2 → 2.3.3
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 +4 -2
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +5 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +5 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +5 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.d.ts +5 -2
- package/dist/index.cjs.js +36 -36
- package/dist/index.js +259 -193
- package/dist/index.umd.js +21 -21
- package/docs/classes/CSS3DRender.html +31 -31
- package/docs/classes/CruisePluginController.html +24 -24
- package/docs/classes/Magnifier.html +16 -16
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoTagPluginController.html +39 -39
- 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 +12 -12
- 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/LinkType.html +7 -7
- 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/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/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/ContentTypeMap.html +12 -12
- 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/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/LineJson.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 +8 -8
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/OpenParameter.html +7 -7
- 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 +13 -13
- 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/Point.html +8 -8
- package/docs/interfaces/PointJson.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/TagConfig.html +10 -10
- package/docs/interfaces/Tags.html +9 -9
- package/docs/interfaces/Util.MagnifierParameter.html +11 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +4 -4
- package/docs/types/ArrayPosition.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/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +5 -5
- package/docs/types/ContentTypeConfigKeyArray.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/MapviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/MediaData.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/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/PlaneTag.html +5 -5
- package/docs/types/PointTag.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/Tag.html +5 -5
- package/docs/types/Tag2D.html +5 -5
- package/docs/types/Tag3D.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.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/PanoMeasurePlugin/Controller/index.d.ts +4 -2
- package/libs/PanoMeasurePlugin/Controller/index.js +63 -44
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +5 -0
- package/libs/PanoMeasurePlugin/Modules/GuideController.js +15 -10
- package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +3 -3
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +5 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +38 -15
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +5 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +20 -15
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.d.ts +5 -2
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.js +36 -22
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>modelRoomLabelPluginServerParams | 如视看房插件合集 - v2.3.
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>modelRoomLabelPluginServerParams | 如视看房插件合集 - v2.3.3</title><meta name="description" content="Documentation for 如视看房插件合集 - v2.3.3"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
2
2
|
<div class="tsd-toolbar-contents container">
|
|
3
3
|
<div class="table-cell" id="tsd-search" data-base="..">
|
|
4
4
|
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<div id="tsd-toolbar-links"></div></div>
|
|
7
7
|
<ul class="results">
|
|
8
8
|
<li class="state loading">Preparing search index...</li>
|
|
9
|
-
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视看房插件合集 - v2.3.
|
|
9
|
+
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视看房插件合集 - v2.3.3</a></div>
|
|
10
10
|
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
11
11
|
<div class="container container-main">
|
|
12
12
|
<div class="col-8 col-content">
|
|
13
13
|
<div class="tsd-page-title">
|
|
14
14
|
<ul class="tsd-breadcrumb">
|
|
15
|
-
<li><a href="../modules.html">如视看房插件合集 - v2.3.
|
|
15
|
+
<li><a href="../modules.html">如视看房插件合集 - v2.3.3</a></li>
|
|
16
16
|
<li><a href="modelRoomLabelPluginServerParams.html">modelRoomLabelPluginServerParams</a></li></ul>
|
|
17
17
|
<h1>Variable modelRoomLabelPluginServerParams<code class="tsd-tag ts-flagConst">Const</code> </h1></div>
|
|
18
18
|
<div class="tsd-signature">model<wbr/>Room<wbr/>Label<wbr/>Plugin<wbr/>Server<wbr/>Params<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span>version<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<li class="tsd-parameter">
|
|
25
25
|
<h5>version<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5></li></ul></div><aside class="tsd-sources">
|
|
26
26
|
<ul>
|
|
27
|
-
<li>Defined in <a href="https://github.com/realsee-developer/dnalogel/blob/
|
|
27
|
+
<li>Defined in <a href="https://github.com/realsee-developer/dnalogel/blob/55042c1/plugins/src/ModelRoomLabelPlugin/index.ts#L12">plugins/src/ModelRoomLabelPlugin/index.ts:12</a></li></ul></aside></div>
|
|
28
28
|
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
29
29
|
<div class="tsd-navigation settings">
|
|
30
30
|
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
42
42
|
<div class="tsd-accordion-details">
|
|
43
43
|
<ul>
|
|
44
|
-
<li><a href="../modules.html">如视看房插件合集 -<wbr/> v2.3.
|
|
44
|
+
<li><a href="../modules.html">如视看房插件合集 -<wbr/> v2.3.3</a>
|
|
45
45
|
<ul>
|
|
46
46
|
<li class="tsd-kind-namespace"><a href="../modules/Util.html">Util</a></li></ul></li></ul></div></details></nav>
|
|
47
47
|
<nav class="tsd-navigation secondary menu-sticky">
|
|
@@ -4,12 +4,14 @@ import type { PanoMeasurePluginEvent } from '../typings/event.type';
|
|
|
4
4
|
import type { UserDistanceItem } from '../utils/distanceDom';
|
|
5
5
|
import Magnifier, { MagnifierParameter } from '../Modules/Magnifier';
|
|
6
6
|
import { Five, Subscribe } from '@realsee/five';
|
|
7
|
+
import { UIControllerParams } from '../Modules/UIController';
|
|
8
|
+
import { GuideControllerParams } from '../Modules/GuideController';
|
|
7
9
|
export declare type Mode = 'Watch' | 'Edit' | 'Mixed' | 'View';
|
|
8
10
|
export interface PanoMeasureParameterType extends Partial<Config> {
|
|
9
11
|
openParams?: OpenParameter;
|
|
10
12
|
magnifierParams?: MagnifierParameter;
|
|
11
|
-
useUIController?: boolean;
|
|
12
|
-
useGuideController?: boolean;
|
|
13
|
+
useUIController?: boolean | UIControllerParams;
|
|
14
|
+
useGuideController?: boolean | GuideControllerParams;
|
|
13
15
|
userDistanceItemCreator?: () => UserDistanceItem;
|
|
14
16
|
}
|
|
15
17
|
export default class MeasureController {
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
var g = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var p = Object.getOwnPropertySymbols;
|
|
3
3
|
var C = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var
|
|
4
|
+
var c = (i, e, t) => e in i ? g(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, n = (i, e) => {
|
|
5
5
|
for (var t in e || (e = {}))
|
|
6
|
-
C.call(e, t) &&
|
|
7
|
-
if (
|
|
8
|
-
for (var t of
|
|
9
|
-
P.call(e, t) &&
|
|
10
|
-
return
|
|
6
|
+
C.call(e, t) && c(i, t, e[t]);
|
|
7
|
+
if (p)
|
|
8
|
+
for (var t of p(e))
|
|
9
|
+
P.call(e, t) && c(i, t, e[t]);
|
|
10
|
+
return i;
|
|
11
11
|
};
|
|
12
|
-
var r = (
|
|
12
|
+
var r = (i, e, t) => (c(i, typeof e != "symbol" ? e + "" : e, t), t);
|
|
13
13
|
import { Magnifier as v } from "../Modules/Magnifier.js";
|
|
14
|
-
import { FiveHelper as
|
|
15
|
-
import { EditController as
|
|
16
|
-
import { ViewController as
|
|
17
|
-
import { WatchController as
|
|
14
|
+
import { FiveHelper as y } from "../Modules/FiveHelper.js";
|
|
15
|
+
import { EditController as h } from "./EditController.js";
|
|
16
|
+
import { ViewController as w } from "./ViewController.js";
|
|
17
|
+
import { WatchController as u } from "./WatchController.js";
|
|
18
18
|
import { MixedController as f } from "./MixedController.js";
|
|
19
|
-
import { omit as
|
|
20
|
-
import { Group as
|
|
19
|
+
import { omit as I } from "../../shared-utils/filter.js";
|
|
20
|
+
import { Group as M } from "three";
|
|
21
21
|
import { Model as b } from "../Model/index.js";
|
|
22
22
|
import { Subscribe as D } from "@realsee/five";
|
|
23
|
-
import { getMouseGroup as
|
|
24
|
-
import { UIController as
|
|
25
|
-
import { GuideController as
|
|
26
|
-
import { ShortcutKeyController as
|
|
27
|
-
import { RangePieceController as
|
|
23
|
+
import { getMouseGroup as U } from "../utils/mouseGroup.js";
|
|
24
|
+
import { UIController as d } from "../Modules/UIController/index.js";
|
|
25
|
+
import { GuideController as x } from "../Modules/GuideController.js";
|
|
26
|
+
import { ShortcutKeyController as G } from "./ShortcutKeyController.js";
|
|
27
|
+
import { RangePieceController as k } from "../Modules/rangePiece/index.js";
|
|
28
28
|
class A {
|
|
29
29
|
constructor(e, t) {
|
|
30
30
|
r(this, "hasOpen", !1);
|
|
@@ -43,34 +43,34 @@ class A {
|
|
|
43
43
|
r(this, "shortcutKeyController");
|
|
44
44
|
r(this, "controller", null);
|
|
45
45
|
r(this, "controllerParams");
|
|
46
|
-
r(this, "getCurrentMode", () => this.controller instanceof
|
|
46
|
+
r(this, "getCurrentMode", () => this.controller instanceof h ? "Edit" : this.controller instanceof u ? "Watch" : this.controller instanceof f ? "Mixed" : null);
|
|
47
47
|
r(this, "changeMode", (e) => {
|
|
48
|
-
var
|
|
48
|
+
var o;
|
|
49
49
|
if (!this.hasOpen || this.getCurrentMode() === e)
|
|
50
50
|
return;
|
|
51
51
|
if (this.getCurrentMode() === "Mixed" || e === "Mixed")
|
|
52
52
|
return new Error("\u4E0D\u652F\u6301\u5207\u6362\u7684Mode");
|
|
53
|
-
(
|
|
53
|
+
(o = this.controller) == null || o.dispose();
|
|
54
54
|
const t = {
|
|
55
|
-
View:
|
|
56
|
-
Watch:
|
|
57
|
-
Edit:
|
|
55
|
+
View: w,
|
|
56
|
+
Watch: u,
|
|
57
|
+
Edit: h
|
|
58
58
|
};
|
|
59
59
|
if (!t[e])
|
|
60
60
|
throw new Error("\u4E0D\u5B58\u5728\u7684 Mode");
|
|
61
61
|
this.controller = new t[e](this.controllerParams), this.hook.emit("modeChange", e);
|
|
62
62
|
});
|
|
63
|
-
var
|
|
63
|
+
var l, m;
|
|
64
64
|
this.five = e, this.params = t;
|
|
65
|
-
const
|
|
65
|
+
const o = {
|
|
66
66
|
userDistanceItemCreator: void 0,
|
|
67
|
-
getDistanceText(
|
|
68
|
-
return
|
|
67
|
+
getDistanceText(a) {
|
|
68
|
+
return a.toFixed(2) + "m";
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
-
this.config =
|
|
72
|
-
const s = (
|
|
73
|
-
this.controllerParams = {
|
|
71
|
+
this.config = n(n({}, o), I(t, ["openParams", "magnifierParams"])), this.model = new b(this.config), this.fiveHelper = new y(e), this.magnifier = new v(e, (l = t.magnifierParams) != null ? l : { width: 190, height: 190, scale: 2 }), this.group = new M(), this.group.name = "plugin-measure-group", this.container.classList.add("five-plugin-measure-container"), this.container.style.position = "absolute", this.container.style.left = "0", this.container.style.top = "0", this.container.style.pointerEvents = "none", this.container.style.width = "100%", this.container.style.height = "100%", this.container.style.opacity = "0", this.container.style.background = "rgba(0, 0, 0, 0.15)";
|
|
72
|
+
const s = (m = this.params.openParams) != null ? m : {};
|
|
73
|
+
if (this.controllerParams = {
|
|
74
74
|
five: this.five,
|
|
75
75
|
hook: this.hook,
|
|
76
76
|
group: this.group,
|
|
@@ -80,9 +80,21 @@ class A {
|
|
|
80
80
|
container: this.container,
|
|
81
81
|
fiveHelper: this.fiveHelper,
|
|
82
82
|
openParams: s,
|
|
83
|
-
mouseGroup:
|
|
83
|
+
mouseGroup: U(n({}, s.crossHairParameter)),
|
|
84
84
|
userDistanceItemCreator: this.params.userDistanceItemCreator
|
|
85
|
-
}, this.params.useUIController !== !1
|
|
85
|
+
}, this.params.useUIController !== !1) {
|
|
86
|
+
const a = n({
|
|
87
|
+
container: this.container,
|
|
88
|
+
openParams: s
|
|
89
|
+
}, typeof this.params.useUIController == "object" ? this.params.useUIController : {});
|
|
90
|
+
this.useUIController = new d(this, a);
|
|
91
|
+
}
|
|
92
|
+
if (this.params.useGuideController !== !1) {
|
|
93
|
+
const a = n({
|
|
94
|
+
container: this.container
|
|
95
|
+
}, typeof this.params.useGuideController == "object" ? this.params.useGuideController : {});
|
|
96
|
+
this.useGuideController = new x(this, a);
|
|
97
|
+
}
|
|
86
98
|
}
|
|
87
99
|
appendTo(e) {
|
|
88
100
|
e.append(this.container);
|
|
@@ -95,15 +107,15 @@ class A {
|
|
|
95
107
|
this.model.parse(e), this.save();
|
|
96
108
|
}
|
|
97
109
|
enable() {
|
|
98
|
-
var e, t,
|
|
99
|
-
this.hasOpen || (this.hasOpen = !0, this.five.scene.add(this.group), this.container.style.opacity = "1", (e = this.params.openParams) != null && e.isMobile ? (this.controller = new f(this.controllerParams), this.rangePieceController = new
|
|
110
|
+
var e, t, o;
|
|
111
|
+
this.hasOpen || (this.hasOpen = !0, this.five.scene.add(this.group), this.container.style.opacity = "1", (e = this.params.openParams) != null && e.isMobile ? (this.controller = new f(this.controllerParams), this.rangePieceController = new k(this.controllerParams)) : (this.five.helperVisible = !1, this.controller = new u(this.controllerParams)), (t = this.useUIController) == null || t.show(), (o = this.useGuideController) == null || o.show(), this.shortcutKeyController = new G(this, this.five), this.hook.emit("enable", !0));
|
|
100
112
|
}
|
|
101
113
|
disable() {
|
|
102
|
-
var e, t,
|
|
103
|
-
this.hasOpen = !1, this.container.style.opacity = "0", (e = this.controller) == null || e.dispose(), (t = this.rangePieceController) == null || t.dispose(), (
|
|
114
|
+
var e, t, o, s, l;
|
|
115
|
+
this.hasOpen = !1, this.container.style.opacity = "0", (e = this.controller) == null || e.dispose(), (t = this.rangePieceController) == null || t.dispose(), (o = this.useUIController) == null || o.hide(), (s = this.useGuideController) == null || s.hide(), (l = this.shortcutKeyController) == null || l.dispose(), this.controller = null, this.five.helperVisible = !0, this.five.scene.remove(this.group), this.five.needsRender = !0, this.hook.emit("disable", !0);
|
|
104
116
|
}
|
|
105
117
|
revoke() {
|
|
106
|
-
this.controller instanceof
|
|
118
|
+
this.controller instanceof h && this.controller.revoke();
|
|
107
119
|
}
|
|
108
120
|
removeLineByID(e) {
|
|
109
121
|
this.model.removeLineByID(e);
|
|
@@ -118,20 +130,27 @@ class A {
|
|
|
118
130
|
return this.getCurrentMode() !== "Watch" ? !1 : (this.controller.clearHighlightLines(), !0);
|
|
119
131
|
}
|
|
120
132
|
save() {
|
|
121
|
-
return this.controller instanceof
|
|
133
|
+
return this.controller instanceof h ? (this.model.mergeModel(this.controller.model), this) : this;
|
|
122
134
|
}
|
|
123
135
|
toJson() {
|
|
124
136
|
return this.model.toJson();
|
|
125
137
|
}
|
|
126
138
|
changeIsMobile(e) {
|
|
127
|
-
var t,
|
|
128
|
-
((t = this.controllerParams.openParams) == null ? void 0 : t.isMobile) === void 0 && (this.controllerParams.openParams.isMobile = e), this.controllerParams.openParams.isMobile !== e && (this.controllerParams.openParams.isMobile = e, this.params.useUIController !== !1
|
|
139
|
+
var t, o;
|
|
140
|
+
if (((t = this.controllerParams.openParams) == null ? void 0 : t.isMobile) === void 0 && (this.controllerParams.openParams.isMobile = e), this.controllerParams.openParams.isMobile !== e && (this.controllerParams.openParams.isMobile = e, this.params.useUIController !== !1)) {
|
|
141
|
+
(o = this.useUIController) == null || o.dispose();
|
|
142
|
+
const s = n({
|
|
143
|
+
container: this.container,
|
|
144
|
+
openParams: this.controllerParams.openParams
|
|
145
|
+
}, typeof this.params.useUIController == "object" ? this.params.useUIController : {});
|
|
146
|
+
this.useUIController = new d(this, s);
|
|
147
|
+
}
|
|
129
148
|
}
|
|
130
149
|
changeConfigs(e) {
|
|
131
150
|
var t;
|
|
132
151
|
if (e.getDistanceText && e.getDistanceText !== this.config.getDistanceText) {
|
|
133
|
-
const
|
|
134
|
-
this.config.getDistanceText =
|
|
152
|
+
const o = e.getDistanceText;
|
|
153
|
+
this.config.getDistanceText = o, (t = this.controller) == null || t.updateDistanceUI();
|
|
135
154
|
}
|
|
136
155
|
}
|
|
137
156
|
}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import type MeasureController from '../Controller';
|
|
2
2
|
export interface GuideControllerParams {
|
|
3
3
|
container: Element;
|
|
4
|
+
startTip?: string;
|
|
5
|
+
endTip?: string;
|
|
6
|
+
firstPointTip?: string;
|
|
7
|
+
nextPointTip?: string;
|
|
4
8
|
}
|
|
5
9
|
export declare class GuideController {
|
|
6
10
|
private measureController;
|
|
7
11
|
private textDom;
|
|
8
12
|
private container;
|
|
9
13
|
private hasAnchor;
|
|
14
|
+
private _params;
|
|
10
15
|
constructor(measureController: MeasureController, params: GuideControllerParams);
|
|
11
16
|
dispose(): void;
|
|
12
17
|
show(): this;
|
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var u = (n, t, e) => (
|
|
4
|
-
class
|
|
1
|
+
var s = Object.defineProperty;
|
|
2
|
+
var o = (n, t, e) => t in n ? s(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var u = (n, t, e) => (o(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
class h {
|
|
5
5
|
constructor(t, e) {
|
|
6
6
|
u(this, "measureController");
|
|
7
7
|
u(this, "textDom", document.createElement("span"));
|
|
8
8
|
u(this, "container", document.createElement("div"));
|
|
9
9
|
u(this, "hasAnchor", !1);
|
|
10
|
+
u(this, "_params");
|
|
10
11
|
u(this, "onModelChange", (t) => {
|
|
12
|
+
var e;
|
|
11
13
|
if (t === "Watch") {
|
|
12
14
|
this.textDom.innerText = "";
|
|
13
15
|
return;
|
|
14
16
|
}
|
|
15
|
-
this.textDom.innerText = "\u8BF7\u9009\u62E9\u7B2C\u4E00\u4E2A\u6D4B\u91CF\u70B9\uFF0CEsc\u6216\u5355\u51FB\u9F20\u6807\u53F3\u952E\u53EF\u53D6\u6D88\u9009\u62E9";
|
|
17
|
+
this.textDom.innerText = (e = this._params.firstPointTip) != null ? e : "\u8BF7\u9009\u62E9\u7B2C\u4E00\u4E2A\u6D4B\u91CF\u70B9\uFF0CEsc\u6216\u5355\u51FB\u9F20\u6807\u53F3\u952E\u53EF\u53D6\u6D88\u9009\u62E9";
|
|
16
18
|
});
|
|
17
19
|
u(this, "anchorChange", (t) => {
|
|
18
|
-
|
|
20
|
+
var e, i;
|
|
21
|
+
!this.hasAnchor && !!t ? (this.hasAnchor = !0, this.textDom.innerText = (e = this._params.nextPointTip) != null ? e : "\u9009\u62E9\u4E0B\u4E00\u4E2A\u6D4B\u91CF\u70B9\uFF0CEsc\u6216\u5355\u51FB\u9F20\u6807\u53F3\u952E\u53D6\u6D88\u9009\u62E9") : t || (this.hasAnchor = !1, this.textDom.innerText = (i = this._params.firstPointTip) != null ? i : "\u8BF7\u9009\u62E9\u7B2C\u4E00\u4E2A\u6D4B\u91CF\u70B9\uFF0CEsc\u6216\u5355\u51FB\u9F20\u6807\u53F3\u952E\u53EF\u53D6\u6D88\u9009\u62E9");
|
|
19
22
|
});
|
|
20
23
|
u(this, "onEditedLineChange", (t) => {
|
|
21
|
-
|
|
24
|
+
var e;
|
|
25
|
+
t.length === 1 && (this.textDom.innerText = (e = this._params.endTip) != null ? e : "\u53EF\u4EE5\u8FDE\u7EED\u9009\u62E9\u6D4B\u91CF\u70B9\uFF0C\u6216\u70B9\u51FB\u4E0B\u65B9\u201C\u7ED3\u675F\u201D\u6309\u94AE\u5B8C\u6210\u6D4B\u91CF\uFF08Esc\u53D6\u6D88\uFF0CCommand+S\u4FDD\u5B58\uFF09");
|
|
22
26
|
});
|
|
23
|
-
this.initDom(), e.container.append(this.container), this.measureController = t, t.hook.on("modeChange", this.onModelChange), t.hook.on("anchorChange", this.anchorChange), t.hook.on("editedLineChange", this.onEditedLineChange);
|
|
27
|
+
this._params = e, this.initDom(), e.container.append(this.container), this.measureController = t, t.hook.on("modeChange", this.onModelChange), t.hook.on("anchorChange", this.anchorChange), t.hook.on("editedLineChange", this.onEditedLineChange);
|
|
24
28
|
}
|
|
25
29
|
dispose() {
|
|
26
30
|
this.hide(), this.container.remove();
|
|
@@ -32,10 +36,11 @@ class a {
|
|
|
32
36
|
return this.container.style.opacity = "0", this.container.style.transform = "translate(0, -10px)", this.measureController.hook.off("modeChange", this.onModelChange), this.measureController.hook.off("anchorChange", this.anchorChange), this.measureController.hook.off("editedLineChange", this.onEditedLineChange), this;
|
|
33
37
|
}
|
|
34
38
|
initDom() {
|
|
39
|
+
var i;
|
|
35
40
|
const t = this.container, e = this.textDom;
|
|
36
|
-
t.classList.add("fpm__guide-container"), t.style.position = "absolute", t.style.top = "0px", t.style.left = "0px", t.style.width = "100%", t.style.height = "110px", t.style.display = "flex", t.style.alignItems = "center", t.style.justifyContent = "center", t.style.transform = "translate(0, -10px)", t.style.background = "linear-gradient(180deg, rgba(0,0,0,0.40) 0%, rgba(0,0,0,0.00) 100%)", t.style.transition = "opacity 500ms ease-in-out, transform 500ms ease-in-out", t.style.opacity = "0", e.classList.add("fpm__guide-text"), e.style.color = "#fff", e.style.fontSize = "20px", e.innerText = "\u70B9\u51FB\u4E0B\u65B9\u201C\u5F00\u59CB\u201D\u6309\u94AE\u5F00\u59CB\u6D4B\u8DDD", t.appendChild(e);
|
|
41
|
+
t.classList.add("fpm__guide-container"), t.style.position = "absolute", t.style.top = "0px", t.style.left = "0px", t.style.width = "100%", t.style.height = "110px", t.style.display = "flex", t.style.alignItems = "center", t.style.justifyContent = "center", t.style.transform = "translate(0, -10px)", t.style.background = "linear-gradient(180deg, rgba(0,0,0,0.40) 0%, rgba(0,0,0,0.00) 100%)", t.style.transition = "opacity 500ms ease-in-out, transform 500ms ease-in-out", t.style.opacity = "0", e.classList.add("fpm__guide-text"), e.style.color = "#fff", e.style.fontSize = "20px", e.innerText = (i = this._params.startTip) != null ? i : "\u70B9\u51FB\u4E0B\u65B9\u201C\u5F00\u59CB\u201D\u6309\u94AE\u5F00\u59CB\u6D4B\u8DDD", t.appendChild(e);
|
|
37
42
|
}
|
|
38
43
|
}
|
|
39
44
|
export {
|
|
40
|
-
|
|
45
|
+
h as GuideController
|
|
41
46
|
};
|
|
@@ -109,17 +109,17 @@ const o = `
|
|
|
109
109
|
<div class="fpm__other-btn">
|
|
110
110
|
<div class="fpm__other-content fpm__revoke">
|
|
111
111
|
${o}
|
|
112
|
-
<span class="fpm__text fpm__revoke-text"
|
|
112
|
+
<span class="fpm__text fpm__revoke-text"></span>
|
|
113
113
|
</div>
|
|
114
114
|
</div>
|
|
115
115
|
<div class="fpm__main fpm__main-btn">
|
|
116
116
|
<div class="fpm__main-icon fpm__main__start"></div>
|
|
117
|
-
<div class="fpm__main-text fpm__main-btn-text"
|
|
117
|
+
<div class="fpm__main-text fpm__main-btn-text"></div>
|
|
118
118
|
</div>
|
|
119
119
|
<div class="fpm__other-btn">
|
|
120
120
|
<div class="fpm__other-content fpm__exit">
|
|
121
121
|
${i}
|
|
122
|
-
<span class="fpm__text fpm__exit-text"
|
|
122
|
+
<span class="fpm__text fpm__exit-text"></span>
|
|
123
123
|
</div>
|
|
124
124
|
</div>
|
|
125
125
|
</div>
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import { UIControllerParams } from '.';
|
|
1
2
|
import type MeasureController from '../../Controller';
|
|
2
3
|
export declare class MainBtnController {
|
|
3
4
|
private container;
|
|
4
5
|
private measureController;
|
|
5
6
|
private mainElement;
|
|
6
|
-
|
|
7
|
+
private _params;
|
|
8
|
+
private _btnTexts;
|
|
9
|
+
constructor(measureController: MeasureController, container: Element, params: UIControllerParams);
|
|
7
10
|
dispose(): void;
|
|
8
11
|
private getMainElement;
|
|
12
|
+
private _getTextElement;
|
|
9
13
|
private change2Add;
|
|
10
14
|
private change2Done;
|
|
11
15
|
private onMouseEnter;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var n = (
|
|
4
|
-
import { mainIconStyle as
|
|
5
|
-
class
|
|
6
|
-
constructor(e, t) {
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var h = (s, e, t) => e in s ? c(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var n = (s, e, t) => (h(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import { mainIconStyle as d, mainItemStyle as x } from "./style.js";
|
|
5
|
+
class p {
|
|
6
|
+
constructor(e, t, i) {
|
|
7
7
|
n(this, "container");
|
|
8
8
|
n(this, "measureController");
|
|
9
9
|
n(this, "mainElement");
|
|
10
|
+
n(this, "_params");
|
|
11
|
+
n(this, "_btnTexts", {
|
|
12
|
+
start: "\u5F00\u59CB",
|
|
13
|
+
end: "\u7ED3\u675F",
|
|
14
|
+
revoke: "\u64A4\u9500",
|
|
15
|
+
exit: "\u9000\u51FA"
|
|
16
|
+
});
|
|
10
17
|
n(this, "onMouseEnter", () => {
|
|
11
18
|
const { mainItem: e } = this.mainElement;
|
|
12
19
|
e.style.opacity = "1";
|
|
@@ -21,30 +28,46 @@ class c {
|
|
|
21
28
|
n(this, "modeChangeHandler", (e) => {
|
|
22
29
|
e === "Watch" ? this.change2Add() : this.change2Done();
|
|
23
30
|
});
|
|
24
|
-
|
|
31
|
+
var o, r, _, l;
|
|
32
|
+
this._params = i, this._btnTexts = {
|
|
33
|
+
start: (o = this._params.startButtonText) != null ? o : this._btnTexts.start,
|
|
34
|
+
end: (r = this._params.endButtonText) != null ? r : this._btnTexts.end,
|
|
35
|
+
revoke: (_ = this._params.revokeButtonText) != null ? _ : this._btnTexts.revoke,
|
|
36
|
+
exit: (l = this._params.exitButtonText) != null ? l : this._btnTexts.exit
|
|
37
|
+
}, this.measureController = e, this.container = t, this.mainElement = this.getMainElement(), Object.assign(this.mainElement.mainIcon.style, d), Object.assign(this.mainElement.mainItem.style, x);
|
|
38
|
+
const { revokeTextDom: a, exitTextDom: m } = this._getTextElement();
|
|
39
|
+
a && (a.innerText = this._btnTexts.revoke), m && (m.innerText = this._btnTexts.exit), this.change2Add(), this.measureController.hook.on("modeChange", this.modeChangeHandler), this.mainElement.mainItem.addEventListener("click", this.onClick), this.mainElement.mainItem.addEventListener("mouseenter", this.onMouseEnter), this.mainElement.mainItem.addEventListener("mouseleave", this.onMouseLeave);
|
|
25
40
|
}
|
|
26
41
|
dispose() {
|
|
27
42
|
this.measureController.hook.off("modeChange", this.modeChangeHandler), this.mainElement.mainItem.removeEventListener("click", this.onClick), this.mainElement.mainItem.removeEventListener("mouseenter", this.onMouseEnter), this.mainElement.mainItem.removeEventListener("mouseleave", this.onMouseLeave);
|
|
28
43
|
}
|
|
29
44
|
getMainElement() {
|
|
30
|
-
const e = this.container.querySelector(".fpm__main-text"), t = this.container.querySelector(".fpm__main"),
|
|
31
|
-
if (!t || !e || !
|
|
45
|
+
const e = this.container.querySelector(".fpm__main-text"), t = this.container.querySelector(".fpm__main"), i = this.container.querySelector(".fpm__main-icon");
|
|
46
|
+
if (!t || !e || !i)
|
|
32
47
|
throw new Error("cannot find dom");
|
|
33
|
-
return { mainTextDom: e, mainItem: t, mainIcon:
|
|
48
|
+
return { mainTextDom: e, mainItem: t, mainIcon: i };
|
|
49
|
+
}
|
|
50
|
+
_getTextElement() {
|
|
51
|
+
const e = this.container.querySelector(".fpm__revoke-text"), t = this.container.querySelector(".fpm__exit-text");
|
|
52
|
+
return { revokeTextDom: e, exitTextDom: t };
|
|
34
53
|
}
|
|
35
54
|
change2Add() {
|
|
36
55
|
const { mainIcon: e, mainTextDom: t } = this.mainElement;
|
|
37
|
-
|
|
38
|
-
|
|
56
|
+
if (e.className.includes("fpm__main__start")) {
|
|
57
|
+
t.innerText = this._btnTexts.start;
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
e.className.includes("fpm__main__end") && (e.style.transform = "scale(0.8)", t.className.includes("fpm__main-text__show") ? t.classList.replace("fpm__main-text__show", "fpm__main-text__hide") : t.classList.add("fpm__main-text__hide"), setTimeout(() => {
|
|
61
|
+
e.classList.replace("fpm__main__end", "fpm__main__start"), e.style.transform = "scale(1)", t.innerText = this._btnTexts.start, t.classList.replace("fpm__main-text__hide", "fpm__main-text__show");
|
|
39
62
|
}, 200));
|
|
40
63
|
}
|
|
41
64
|
change2Done() {
|
|
42
65
|
const { mainTextDom: e, mainIcon: t } = this.getMainElement();
|
|
43
|
-
e.innerText !==
|
|
44
|
-
t.classList.replace("fpm__main__start", "fpm__main__end"), t.style.transform = "scale(1)", e.innerText =
|
|
66
|
+
e.innerText !== this._btnTexts.end && (t.className.includes("fpm__main__end") || t.className.includes("fpm__main__start") && (t.style.transform = "scale(0.8)", e.className.includes("fpm__main-text__show") ? e.classList.replace("fpm__main-text__show", "fpm__main-text__hide") : e.classList.add("fpm__main-text__hide"), setTimeout(() => {
|
|
67
|
+
t.classList.replace("fpm__main__start", "fpm__main__end"), t.style.transform = "scale(1)", e.innerText = this._btnTexts.end, e.classList.replace("fpm__main-text__hide", "fpm__main-text__show");
|
|
45
68
|
}, 200)));
|
|
46
69
|
}
|
|
47
70
|
}
|
|
48
71
|
export {
|
|
49
|
-
|
|
72
|
+
p as MainBtnController
|
|
50
73
|
};
|
|
@@ -3,6 +3,10 @@ import type { OpenParameter } from '../../typings/data';
|
|
|
3
3
|
export interface UIControllerParams {
|
|
4
4
|
container: Element;
|
|
5
5
|
openParams?: OpenParameter;
|
|
6
|
+
startButtonText?: string;
|
|
7
|
+
endButtonText?: string;
|
|
8
|
+
revokeButtonText?: string;
|
|
9
|
+
exitButtonText?: string;
|
|
6
10
|
}
|
|
7
11
|
export declare type UIMode = 'pc' | 'mobile';
|
|
8
12
|
export declare class UIController {
|
|
@@ -12,6 +16,7 @@ export declare class UIController {
|
|
|
12
16
|
private disposers;
|
|
13
17
|
private measureController;
|
|
14
18
|
private mode;
|
|
19
|
+
private _params;
|
|
15
20
|
constructor(measureController: MeasureController, params: UIControllerParams);
|
|
16
21
|
dispose(): void;
|
|
17
22
|
show(): this;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var h = Object.defineProperty;
|
|
2
|
-
var m = (
|
|
3
|
-
var i = (
|
|
2
|
+
var m = (s, t, e) => t in s ? h(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
+
var i = (s, t, e) => (m(s, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
4
|
import { htmlString as p } from "./HTML.js";
|
|
5
5
|
import { mobileHTMLString as d } from "./mobileHTML.js";
|
|
6
|
-
import { controllerBackgroundStyle as y, operatingSpaceStyle as u, uiWrapperStyle as f, textStyle as v, exitItemStyle as C, exitIconStyle as
|
|
7
|
-
import { MainBtnController as
|
|
8
|
-
import {
|
|
9
|
-
import { Revoke as
|
|
6
|
+
import { controllerBackgroundStyle as y, operatingSpaceStyle as u, uiWrapperStyle as f, textStyle as v, exitItemStyle as C, exitIconStyle as _ } from "./style.js";
|
|
7
|
+
import { MainBtnController as b } from "./MainBtnController.js";
|
|
8
|
+
import { MobileMainBtnController as E } from "./mobileMainBtnController.js";
|
|
9
|
+
import { Revoke as S } from "./Revoke/index.js";
|
|
10
10
|
class O {
|
|
11
11
|
constructor(t, e) {
|
|
12
12
|
i(this, "revoke");
|
|
@@ -15,32 +15,37 @@ class O {
|
|
|
15
15
|
i(this, "disposers", []);
|
|
16
16
|
i(this, "measureController");
|
|
17
17
|
i(this, "mode");
|
|
18
|
+
i(this, "_params");
|
|
18
19
|
i(this, "handleExit", () => {
|
|
19
20
|
const t = this.container.querySelector(".fpm__exit-icon"), e = this.container.querySelector(".fpm__exit");
|
|
20
21
|
if (!e || !t)
|
|
21
22
|
throw new Error("cannot find dom");
|
|
22
|
-
this.mode === "pc" && (Object.assign(e.style, C), Object.assign(t == null ? void 0 : t.style,
|
|
23
|
-
const
|
|
23
|
+
this.mode === "pc" && (Object.assign(e.style, C), Object.assign(t == null ? void 0 : t.style, _));
|
|
24
|
+
const o = () => {
|
|
25
|
+
e.style.opacity = "1";
|
|
26
|
+
}, r = () => {
|
|
27
|
+
e.style.opacity = "0.85";
|
|
28
|
+
}, n = () => {
|
|
24
29
|
this.measureController.disable();
|
|
25
30
|
};
|
|
26
|
-
return e.addEventListener("click",
|
|
27
|
-
e.removeEventListener("click",
|
|
31
|
+
return e.addEventListener("click", n), e.addEventListener("mouseenter", o), e.addEventListener("mouseleave", r), () => {
|
|
32
|
+
e.removeEventListener("click", n), e.removeEventListener("mouseenter", o), e.removeEventListener("mouseleave", r);
|
|
28
33
|
};
|
|
29
34
|
});
|
|
30
35
|
var l, a;
|
|
31
|
-
this.measureController = t, this.mode = (l = e.openParams) != null && l.isMobile ? "mobile" : "pc", this.container = document.createElement("div"), this.container.innerHTML = (a = e.openParams) != null && a.isMobile ? d : p, this.container.classList.add("fpm__ui-controller", this.mode), e.container.appendChild(this.container);
|
|
32
|
-
const
|
|
33
|
-
Object.assign(
|
|
36
|
+
this._params = e, this.measureController = t, this.mode = (l = e.openParams) != null && l.isMobile ? "mobile" : "pc", this.container = document.createElement("div"), this.container.innerHTML = (a = e.openParams) != null && a.isMobile ? d : p, this.container.classList.add("fpm__ui-controller", this.mode), e.container.appendChild(this.container);
|
|
37
|
+
const o = this.container.querySelectorAll(".fpm__text"), r = this.container.querySelector(".fpm_ui-bg"), n = this.container.querySelector(".fpm_operating-space");
|
|
38
|
+
Object.assign(r == null ? void 0 : r.style, y), Object.assign(n == null ? void 0 : n.style, u), Object.assign(this.container.style, f), o.forEach((c) => Object.assign(c.style, v));
|
|
34
39
|
}
|
|
35
40
|
dispose() {
|
|
36
41
|
this.hide(), this.container.remove();
|
|
37
42
|
}
|
|
38
43
|
show() {
|
|
39
|
-
return this.container.style.display = "block", this.container.style.opacity = "1", this.container.style.transform = "translate(0, 0)", this.mode === "pc" ? (this.revoke = new
|
|
44
|
+
return this.container.style.display = "block", this.container.style.opacity = "1", this.container.style.transform = "translate(0, 0)", this.mode === "pc" ? (this.revoke = new S(this.measureController, this.container), this.mainController = new b(this.measureController, this.container, this._params)) : this.mainController = new E(this.measureController, this.container, this._params), this.disposers.push(this.handleExit()), this;
|
|
40
45
|
}
|
|
41
46
|
hide() {
|
|
42
47
|
var t, e;
|
|
43
|
-
return this.container.style.display = "none", this.container.style.opacity = "0", this.container.style.transform = "translate(0, 10px)", this.mode === "pc" && ((t = this.revoke) == null || t.dispose()), (e = this.mainController) == null || e.dispose(), this.disposers.forEach((
|
|
48
|
+
return this.container.style.display = "none", this.container.style.opacity = "0", this.container.style.transform = "translate(0, 10px)", this.mode === "pc" && ((t = this.revoke) == null || t.dispose()), (e = this.mainController) == null || e.dispose(), this.disposers.forEach((o) => o()), this.disposers = [], this;
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
51
|
export {
|
|
@@ -71,7 +71,7 @@ const I = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzIiIGhlaWdodD0iNzIiIHhtbG5
|
|
|
71
71
|
<div class="fpm_operating-space fpm_operating--mobile">
|
|
72
72
|
<div class="fpm__main fpm__main-btn">
|
|
73
73
|
<div class="fpm__main-icon fpm__main__start"></div>
|
|
74
|
-
<div class="fpm__main-text fpm__main-btn-text"
|
|
74
|
+
<div class="fpm__main-text fpm__main-btn-text"></div>
|
|
75
75
|
</div>
|
|
76
76
|
</div>
|
|
77
77
|
`;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { UIControllerParams } from '.';
|
|
1
2
|
import type MeasureController from '../../Controller';
|
|
2
|
-
export declare class
|
|
3
|
+
export declare class MobileMainBtnController {
|
|
3
4
|
private container;
|
|
4
5
|
private measureController;
|
|
5
6
|
private mainElement;
|
|
6
|
-
|
|
7
|
+
private _params;
|
|
8
|
+
private _btnTexts;
|
|
9
|
+
constructor(measureController: MeasureController, container: Element, params: UIControllerParams);
|
|
7
10
|
dispose(): void;
|
|
8
11
|
private getMainElement;
|
|
9
12
|
private change2Add;
|