@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.
Files changed (317) hide show
  1. package/dist/PanoMeasurePlugin/Controller/index.d.ts +1 -0
  2. package/dist/index.cjs.js +27 -27
  3. package/dist/index.js +613 -608
  4. package/dist/index.umd.js +31 -31
  5. package/docs/classes/CSS3DRender.html +30 -30
  6. package/docs/classes/CruisePluginController.html +25 -25
  7. package/docs/classes/GuideLineItem.GuideLineItem.html +19 -19
  8. package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +34 -34
  9. package/docs/classes/Magnifier.html +19 -19
  10. package/docs/classes/ModelRoomLabelController.html +10 -10
  11. package/docs/classes/Object3DHelperController.html +24 -24
  12. package/docs/classes/PaintBrush.html +14 -14
  13. package/docs/classes/PanoMeasurePluginLine.html +26 -26
  14. package/docs/classes/PanoMeasurePluginModel.html +26 -26
  15. package/docs/classes/PanoMeasurePluginPoint.html +13 -13
  16. package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
  17. package/docs/classes/PanoTagPluginController.html +46 -46
  18. package/docs/classes/Util.BetterTween.html +8 -8
  19. package/docs/classes/Util.Interval.html +11 -11
  20. package/docs/classes/Util.Magnifier.html +19 -19
  21. package/docs/classes/Util.PointDomHelper.html +10 -10
  22. package/docs/classes/Util.PointHelper.html +10 -10
  23. package/docs/classes/Util.PointSelectorHelper.html +15 -15
  24. package/docs/classes/Util.Rectangle.html +12 -12
  25. package/docs/enums/CameraMovementEffect.html +6 -6
  26. package/docs/enums/ContentType.html +19 -19
  27. package/docs/enums/DIRECTION.html +8 -8
  28. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +8 -8
  29. package/docs/enums/DimensionType.html +6 -6
  30. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +7 -7
  31. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +8 -8
  32. package/docs/enums/PaintBrushTypeEnum.html +7 -7
  33. package/docs/enums/PointType.html +6 -6
  34. package/docs/enums/Rotation.html +7 -7
  35. package/docs/functions/CSS3DRenderPlugin.html +3 -3
  36. package/docs/functions/CameraMovementPlugin.html +3 -3
  37. package/docs/functions/CruisePlugin.html +3 -3
  38. package/docs/functions/GuideLinePlugin.html +4 -4
  39. package/docs/functions/ItemLabelPlugin.html +3 -3
  40. package/docs/functions/MapviewFloorplanPlugin.html +3 -3
  41. package/docs/functions/ModelChassisCompassPlugin.html +3 -3
  42. package/docs/functions/ModelEntryDoorGuidePlugin.html +3 -3
  43. package/docs/functions/ModelFloorplanPlugin.html +3 -3
  44. package/docs/functions/ModelItemLabelPlugin.html +3 -3
  45. package/docs/functions/ModelRoomLabelPlugin.html +3 -3
  46. package/docs/functions/ModelTVVideoPlugin.html +3 -3
  47. package/docs/functions/ModelViewPlugin.html +3 -3
  48. package/docs/functions/Object3DHelperPlugin.html +3 -3
  49. package/docs/functions/PanoCompassPlugin.html +3 -3
  50. package/docs/functions/PanoCursorRaycasterPlugin.html +3 -3
  51. package/docs/functions/PanoDoorLabelPlugin.html +3 -3
  52. package/docs/functions/PanoFloorplanRadarPlugin.html +3 -3
  53. package/docs/functions/PanoMeasurePlugin.html +3 -3
  54. package/docs/functions/PanoRulerPlugin.html +3 -3
  55. package/docs/functions/PanoRulerProPlugin.html +3 -3
  56. package/docs/functions/PanoSpatialTagPlugin.html +3 -3
  57. package/docs/functions/PanoTagPlugin.html +3 -3
  58. package/docs/functions/PanoVideoPlugin.html +3 -3
  59. package/docs/functions/TopviewFloorplanPlugin.html +3 -3
  60. package/docs/functions/Util.absoluteUrl.html +4 -4
  61. package/docs/functions/Util.getCoordsFromClient.html +4 -4
  62. package/docs/functions/Util.getCoordsFromElement.html +4 -4
  63. package/docs/functions/Util.getFrameTime.html +4 -4
  64. package/docs/functions/Util.getIntersectFromRelativePosition.html +4 -4
  65. package/docs/functions/Util.getRaycasterFromFivePointer.html +4 -4
  66. package/docs/functions/Util.isAbsoluteURL.html +4 -4
  67. package/docs/functions/Util.isModelLike.html +4 -4
  68. package/docs/functions/Util.isNil.html +4 -4
  69. package/docs/functions/Util.isPanoramaLike.html +4 -4
  70. package/docs/functions/Util.nextFrame.html +4 -4
  71. package/docs/functions/Util.notNil.html +4 -4
  72. package/docs/functions/Util.requestAnimationFrameInterval.html +4 -4
  73. package/docs/functions/Util.tweenProgress.html +4 -4
  74. package/docs/functions/Util.uuid.html +4 -4
  75. package/docs/functions/pluginFlag.html +4 -4
  76. package/docs/index.html +4 -4
  77. package/docs/interfaces/AddTagConfig.html +5 -5
  78. package/docs/interfaces/CSS3DRenderPluginEventMap.html +10 -10
  79. package/docs/interfaces/CSS3DRenderPluginState.html +7 -7
  80. package/docs/interfaces/CameraMovementPluginExportType.html +6 -6
  81. package/docs/interfaces/CruisePluginTypes.Config.html +7 -7
  82. package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +11 -11
  83. package/docs/interfaces/CruisePluginTypes.EventMap.html +19 -19
  84. package/docs/interfaces/CruisePluginTypes.MoveAction.html +11 -11
  85. package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +13 -13
  86. package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +13 -13
  87. package/docs/interfaces/CruisePluginTypes.PluginData.html +8 -8
  88. package/docs/interfaces/CruisePluginTypes.PluginServerData.html +6 -6
  89. package/docs/interfaces/CruisePluginTypes.PluginState.html +10 -10
  90. package/docs/interfaces/EventMap.html +14 -14
  91. package/docs/interfaces/FloorplanBounding.html +7 -7
  92. package/docs/interfaces/FloorplanData.html +9 -9
  93. package/docs/interfaces/FloorplanEntrance.html +10 -10
  94. package/docs/interfaces/FloorplanExtraObject.html +9 -9
  95. package/docs/interfaces/FloorplanExtraObject3D.html +7 -7
  96. package/docs/interfaces/FloorplanFloorData.html +8 -8
  97. package/docs/interfaces/FloorplanImagePosition.html +6 -6
  98. package/docs/interfaces/FloorplanObserver.html +8 -8
  99. package/docs/interfaces/FloorplanOutlineItem.html +8 -8
  100. package/docs/interfaces/FloorplanPosition.html +6 -6
  101. package/docs/interfaces/FloorplanRoomItem.html +12 -12
  102. package/docs/interfaces/FloorplanRoomLabelItem.html +6 -6
  103. package/docs/interfaces/FloorplanServerBounding.html +7 -7
  104. package/docs/interfaces/FloorplanServerComputedData.html +9 -9
  105. package/docs/interfaces/FloorplanServerData.html +6 -6
  106. package/docs/interfaces/FloorplanServerDoorItem.html +9 -9
  107. package/docs/interfaces/FloorplanServerDoorPosition.html +7 -7
  108. package/docs/interfaces/FloorplanServerEntrance.html +10 -10
  109. package/docs/interfaces/FloorplanServerFloorData.html +8 -8
  110. package/docs/interfaces/FloorplanServerImagePosition.html +6 -6
  111. package/docs/interfaces/FloorplanServerObserver.html +8 -8
  112. package/docs/interfaces/FloorplanServerOutlineItem.html +8 -8
  113. package/docs/interfaces/FloorplanServerPosition.html +6 -6
  114. package/docs/interfaces/FloorplanServerRoomItem.html +13 -13
  115. package/docs/interfaces/FloorplanServerRoomLabelItem.html +6 -6
  116. package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +7 -7
  117. package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +9 -9
  118. package/docs/interfaces/GuideLinePluginType.EventMap.html +12 -12
  119. package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +7 -7
  120. package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +5 -5
  121. package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +12 -12
  122. package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +7 -7
  123. package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +17 -17
  124. package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +6 -6
  125. package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +17 -17
  126. package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +4 -4
  127. package/docs/interfaces/GuideLinePluginType.PluginServerData.html +6 -6
  128. package/docs/interfaces/GuideLinePluginType.PluginState.html +7 -7
  129. package/docs/interfaces/GuideLinePluginType.Route.html +10 -10
  130. package/docs/interfaces/GuideLinePluginType.RouteConfig.html +8 -8
  131. package/docs/interfaces/HelperOffset.html +7 -7
  132. package/docs/interfaces/ImagePlaneGroup.html +5 -5
  133. package/docs/interfaces/ItemLabelPluginData.html +5 -5
  134. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +10 -10
  135. package/docs/interfaces/ItemLabelPluginParametersType.html +8 -8
  136. package/docs/interfaces/MinMax.html +6 -6
  137. package/docs/interfaces/ModelChassisCompassPluginData.html +6 -6
  138. package/docs/interfaces/ModelChassisCompassPluginExportType.html +7 -7
  139. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +6 -6
  140. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +7 -7
  141. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +7 -7
  142. package/docs/interfaces/ModelItemLabelPluginData.html +5 -5
  143. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +10 -10
  144. package/docs/interfaces/ModelItemLabelPluginParametersType.html +6 -6
  145. package/docs/interfaces/ModelRoomLabelPluginData.html +5 -5
  146. package/docs/interfaces/ModelTVVideoPluginData.html +8 -8
  147. package/docs/interfaces/ModelTVVideoPluginExportType.html +7 -7
  148. package/docs/interfaces/ModelTVVideoPluginParameterType.html +5 -5
  149. package/docs/interfaces/ModelViewPluginExportType.html +10 -10
  150. package/docs/interfaces/Object3DHelperState.html +7 -7
  151. package/docs/interfaces/ObjectHelperControllers.html +8 -8
  152. package/docs/interfaces/PaintBrushAction.html +11 -11
  153. package/docs/interfaces/PaintBrushConfigs.html +11 -11
  154. package/docs/interfaces/PaintBrushState.html +9 -9
  155. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +9 -9
  156. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +4 -4
  157. package/docs/interfaces/PanoMeasureParameterType.html +14 -14
  158. package/docs/interfaces/PanoMeasurePluginLineJson.html +7 -7
  159. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +6 -6
  160. package/docs/interfaces/PanoMeasurePluginPointJson.html +6 -6
  161. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +7 -7
  162. package/docs/interfaces/PanoRulerPluginExportType.html +9 -9
  163. package/docs/interfaces/PanoRulerPluginOptions.html +6 -6
  164. package/docs/interfaces/PanoRulerPluginParameterType.html +7 -7
  165. package/docs/interfaces/PanoRulerProPluginExportType.html +8 -8
  166. package/docs/interfaces/PanoRulerProPluginOptions.html +6 -6
  167. package/docs/interfaces/PanoRulerProPluginParameterType.html +6 -6
  168. package/docs/interfaces/PanoRulerProPluginState.html +7 -7
  169. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +4 -4
  170. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +4 -4
  171. package/docs/interfaces/PanoSpatialTagPluginData.html +10 -10
  172. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +9 -9
  173. package/docs/interfaces/PanoSpatialTagPluginExportType.html +12 -12
  174. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +9 -9
  175. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +12 -12
  176. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +10 -10
  177. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +9 -9
  178. package/docs/interfaces/PanoVideoPluginType.LoadParams.html +5 -5
  179. package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +7 -7
  180. package/docs/interfaces/PanoVideoPluginType.PluginData.html +5 -5
  181. package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +8 -8
  182. package/docs/interfaces/PanoVideoPluginType.PluginState.html +5 -5
  183. package/docs/interfaces/PanoVideoPluginType.VideoItem.html +7 -7
  184. package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +9 -9
  185. package/docs/interfaces/Point.html +7 -7
  186. package/docs/interfaces/Room.html +8 -8
  187. package/docs/interfaces/RoomInfo.html +6 -6
  188. package/docs/interfaces/RoomLabel.html +13 -13
  189. package/docs/interfaces/RoomRules.html +4 -4
  190. package/docs/interfaces/Rooms.html +4 -4
  191. package/docs/interfaces/Scissor.html +8 -8
  192. package/docs/interfaces/State.html +7 -7
  193. package/docs/interfaces/TagCacheInterface.html +11 -11
  194. package/docs/interfaces/TagConfig.html +12 -12
  195. package/docs/interfaces/TagGLTFObjectGroup.html +5 -5
  196. package/docs/interfaces/TagIconUrl.html +11 -11
  197. package/docs/interfaces/TagObjectGroup.html +5 -5
  198. package/docs/interfaces/TagStyle.html +5 -5
  199. package/docs/interfaces/Tags.html +8 -8
  200. package/docs/interfaces/TemporaryState.html +5 -5
  201. package/docs/interfaces/Util.MagnifierParameter.html +10 -10
  202. package/docs/interfaces/Util.MouseGroupParameter.html +7 -7
  203. package/docs/interfaces/Util.PointIntersection.html +7 -7
  204. package/docs/modules/CruisePluginTypes.html +4 -4
  205. package/docs/modules/GuideLineItem.html +4 -4
  206. package/docs/modules/GuideLineModeItem.html +4 -4
  207. package/docs/modules/GuideLinePluginType.html +4 -4
  208. package/docs/modules/PanoVideoPluginType.html +4 -4
  209. package/docs/modules/Util.html +4 -4
  210. package/docs/modules.html +4 -4
  211. package/docs/types/ArrayPosition.html +4 -4
  212. package/docs/types/AudioAppearance.html +4 -4
  213. package/docs/types/AudioTagTypeConfigKey.html +4 -4
  214. package/docs/types/CSS3DRenderExportType.html +4 -4
  215. package/docs/types/CSS3DRenderPluginExportType.html +4 -4
  216. package/docs/types/CSS3DRenderPluginParameterType.html +4 -4
  217. package/docs/types/ClassFunctionParameters.html +4 -4
  218. package/docs/types/Color.html +4 -4
  219. package/docs/types/ContentTypeConfigKey.html +4 -4
  220. package/docs/types/ContentTypeConfigKeySplit.html +4 -4
  221. package/docs/types/ContentTypeMap.html +4 -4
  222. package/docs/types/Create3DDomContainerReturnType.html +4 -4
  223. package/docs/types/Create3DElementReturnType.html +4 -4
  224. package/docs/types/CruisePluginExportType.html +4 -4
  225. package/docs/types/CruisePluginTypes.CruiseData.html +4 -4
  226. package/docs/types/CruisePluginTypes.MoveEffect.html +4 -4
  227. package/docs/types/DeprecatedMediaPlaneProperty.html +4 -4
  228. package/docs/types/DeprecatedTagProperty.html +4 -4
  229. package/docs/types/Direction-1.html +4 -4
  230. package/docs/types/Direction4.html +4 -4
  231. package/docs/types/ElementRenderer.html +4 -4
  232. package/docs/types/FloorplanRuleLabels.html +4 -4
  233. package/docs/types/FloorplanServerRuleLabels.html +4 -4
  234. package/docs/types/GuideLinePluginExportType.html +4 -4
  235. package/docs/types/GuideLinePluginType.GuideLineItem.html +4 -4
  236. package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +4 -4
  237. package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +4 -4
  238. package/docs/types/GuideLinePluginType.GuideLineStyle.html +4 -4
  239. package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +4 -4
  240. package/docs/types/GuideLinePluginType.PathItem.html +4 -4
  241. package/docs/types/GuideLinePluginType.PluginData.html +4 -4
  242. package/docs/types/HelperEventMap.html +4 -4
  243. package/docs/types/LoadTagConfig.html +4 -4
  244. package/docs/types/MapviewFloorplanPluginParameterType.html +4 -4
  245. package/docs/types/MapviewFloorplanPluginReturnType.html +4 -4
  246. package/docs/types/MediaData.html +4 -4
  247. package/docs/types/MediaStore.html +4 -4
  248. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +4 -4
  249. package/docs/types/ModelFloorplanPluginParameterType.html +4 -4
  250. package/docs/types/ModelFloorplanPluginReturnType.html +4 -4
  251. package/docs/types/ModelRoomLabelPluginParameters.html +4 -4
  252. package/docs/types/ModelRoomLabelPluginReturnType.html +4 -4
  253. package/docs/types/MoveArgs.html +4 -4
  254. package/docs/types/MoveOpts.html +4 -4
  255. package/docs/types/Object3DHelperEventMap.html +4 -4
  256. package/docs/types/ObjectFit.html +4 -4
  257. package/docs/types/PaintBrushEventMap.html +4 -4
  258. package/docs/types/PanoCompassPluginData.html +4 -4
  259. package/docs/types/PanoCompassPluginExportType.html +4 -4
  260. package/docs/types/PanoCompassPluginParameterType.html +4 -4
  261. package/docs/types/PanoFloorplanRadarPluginParameterType.html +4 -4
  262. package/docs/types/PanoFloorplanRadarPluginReturnType.html +4 -4
  263. package/docs/types/PanoIndex.html +4 -4
  264. package/docs/types/PanoMeasurePluginEvent.html +4 -4
  265. package/docs/types/PanoMeasureReturnType.html +4 -4
  266. package/docs/types/PanoSpatialTagPluginId.html +4 -4
  267. package/docs/types/PanoTagPluginExportInterface.html +4 -4
  268. package/docs/types/PanoTagPluginParamsInterface.html +4 -4
  269. package/docs/types/PanoVideoPluginParameterType.html +4 -4
  270. package/docs/types/PanoVideoPluginReturnType.html +4 -4
  271. package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +4 -4
  272. package/docs/types/PlaneTag.html +4 -4
  273. package/docs/types/Point2DTag.html +4 -4
  274. package/docs/types/Point3DTag.html +4 -4
  275. package/docs/types/PointTag.html +4 -4
  276. package/docs/types/PointTagInstance.html +4 -4
  277. package/docs/types/Position.html +4 -4
  278. package/docs/types/RotateArgs.html +4 -4
  279. package/docs/types/RotateOpts.html +4 -4
  280. package/docs/types/RuleLabelsKey.html +4 -4
  281. package/docs/types/RuleLabelsValue.html +4 -4
  282. package/docs/types/StickType.html +4 -4
  283. package/docs/types/Tag.html +4 -4
  284. package/docs/types/Tag2D.html +4 -4
  285. package/docs/types/Tag3D.html +4 -4
  286. package/docs/types/TagContentType.html +4 -4
  287. package/docs/types/TagDimensionType.html +4 -4
  288. package/docs/types/TagElement.html +4 -4
  289. package/docs/types/TagEvents.html +4 -4
  290. package/docs/types/TagGLTFObject.html +4 -4
  291. package/docs/types/TagHooks.html +4 -4
  292. package/docs/types/TagId.html +4 -4
  293. package/docs/types/TagInstance.html +4 -4
  294. package/docs/types/TagPointType.html +4 -4
  295. package/docs/types/TagRendererMap.html +4 -4
  296. package/docs/types/TopviewFloorplanPluginParameterType.html +4 -4
  297. package/docs/types/TopviewFloorplanPluginReturnType.html +4 -4
  298. package/docs/types/WorkCode.html +4 -4
  299. package/docs/variables/FLOOR_TYPE_MAP.html +4 -4
  300. package/docs/variables/PLUGIN.html +4 -4
  301. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +4 -4
  302. package/docs/variables/ROOM_TYPE_MAP.html +4 -4
  303. package/docs/variables/itemLabelPluginServerParams.html +4 -4
  304. package/docs/variables/modelItemLabelPluginServerParams.html +4 -4
  305. package/docs/variables/modelRoomLabelPluginServerParams.html +4 -4
  306. package/libs/PanoMeasurePlugin/Components/Common/Switcher0.js +105 -105
  307. package/libs/PanoMeasurePlugin/Components/Controller0.js +83 -83
  308. package/libs/PanoMeasurePlugin/Components/Controller1.js +103 -103
  309. package/libs/PanoMeasurePlugin/Components/Tip.js +58 -58
  310. package/libs/PanoMeasurePlugin/Controller/EditController.js +74 -72
  311. package/libs/PanoMeasurePlugin/Controller/WatchController.js +7 -7
  312. package/libs/PanoMeasurePlugin/Controller/index.d.ts +1 -0
  313. package/libs/PanoMeasurePlugin/Controller/index.js +14 -11
  314. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +2 -2
  315. package/libs/base/BasePlugin.js +1 -1
  316. package/libs/shared-utils/logger.js +1 -1
  317. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  var R = Object.defineProperty;
2
- var b = (m, c, e) => c in m ? R(m, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[c] = e;
3
- var o = (m, c, e) => (b(m, typeof c != "symbol" ? c + "" : c, e), e);
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 C from "../Model/point.js";
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(e) {
70
- var t;
71
- super(e);
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((e, t) => {
84
- this.currentMeasureType === "area" && typeof t == "boolean" && (t ? this.hook.emit("readyComplete") : this.hook.emit("notReadyComplete")), this.updateDashed();
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 C(this.area.points[this.area.points.length - 1]), this.updateDashed();
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", (e) => {
107
- const t = e || this.polyline;
108
- if (t.lines.length === 0 && this.lastPoint) {
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 (t.lines.length === 0 && !this.lastPoint || !this.lastPoint)
112
+ if (e.lines.length === 0 && !this.lastPoint || !this.lastPoint)
113
113
  return;
114
- const i = t.lines[t.lines.length - 1], s = i.findAnotherPoint(this.lastPoint);
115
- s && (this.lastPoint = s, this.hook.emit("anchorChange", s.position), this.group.remove(i.mesh), t.removeLine(i), i.distanceItem.remove(), this.updateDashed(), this.five.needsRender = !0);
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 e = this.area.polygon.isBlank || this.area.polygon.visible === !1;
127
- if (this.area.points.length >= 3 && e)
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 e = (() => {
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 (!e)
146
+ if (!t)
147
147
  return;
148
- const t = new C(e), i = this.lastPoint;
149
- if (this.lastPoint = t, this.currentMeasureType === "line") {
150
- if (t && i) {
151
- const n = new U(i, t, this.model);
152
- n.distanceItem.setCanSelect(!1), n.distanceItem.appendTo(this.container), this.polyline.addLine(n), this.group.add(n.mesh), n.distanceItem.update(this.five);
153
- }
154
- const a = (r = (s = this.editParams) == null ? void 0 : s.autoEndConfig) == null ? void 0 : r.line;
155
- 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);
156
- } else if (this.currentMeasureType === "area") {
157
- if (this.area.addPoints(t.position), this.area.isClosed) {
158
- this.complete();
159
- return;
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.area.points.length >= 3 ? this.pointSelector.setAdherePoints(this.area.points[0]) : this.pointSelector.setAdherePoints(null);
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 e = this.lastPoint.position, t = (() => {
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 (!t) {
185
+ if (!e) {
184
186
  this.dashed.hide();
185
187
  return;
186
188
  }
187
- if (this.dashed.show(), this.dashed.setPoints(e, t), this.dashed.distanceItem.update(this.five), this.hook.emit("editedDashedLineChange", this.dashed), this.currentMeasureType === "area")
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 = t;
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: e, end: t }, r), d = T({ start: t, end: this.area.points[0] }, r);
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, t];
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", (e) => {
210
- var A, S;
211
+ o(this, "wantsTapGesture", (t) => {
212
+ var A, C;
211
213
  if (this.editParams.pointSelectorMode === "cursor" || this.lastPoint)
212
214
  return !1;
213
- const t = this.model.areas.map((h) => e.intersectObject(h.polygon, !0)[0]).sort((h, p) => h.distance - p.distance), i = (S = (A = t[0]) == null ? void 0 : A.object) == null ? void 0 : S.parent;
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 } = t[0].point.clone().project(this.five.camera), f = `${(p + 1) / 2 * 100}%`, u = `${(-v + 1) / 2 * 100}%`;
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(e);
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", (e) => {
244
- const t = B(e);
245
- this.deleteDom.setTarget(t).setLines(t).updatePosition().show(), this.highlightLines(t), this.hook.emit("selectedChange", t);
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", (e, t) => {
248
- console.log("choose area"), this.deleteDom.setTarget(e).updatePosition(t.left, `calc(${t.top} - 1.5rem)`).show(), this.highlightArea(e);
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", (e) => {
251
- this.unHighlightArea(e), e.dispose(), this.deleteDom.hide();
252
+ o(this, "deleteArea", (t) => {
253
+ this.unHighlightArea(t), t.dispose(), this.deleteDom.hide();
252
254
  });
253
- o(this, "deleteLine", (e) => {
254
- const t = e[0], i = this.model.getPolylineByLine(t);
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
- console.log("target", s), r && this.deleteArea(s), l && this.deleteLine(s);
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, (t = this.fiveElement) == null || t.addEventListener("mouseleave", this.onMouseLeave), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.refresh();
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 e;
288
- super.dispose(), this.model.areas.forEach((t) => {
289
- (t.points.length < 2 || t.polygon.isBlank) && this.model.removeArea(t);
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), (e = this.fiveElement) == null || e.removeEventListener("mouseleave", this.onMouseLeave), this.magnifier.dispose(), this.dashed.distanceItem.remove(), this.five.needsRender = !0;
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(e) {
302
- this.highlightLines(e.polyline.lines), this.five.needsRender = !0;
303
+ highlightArea(t) {
304
+ this.highlightLines(t.polyline.lines), this.five.needsRender = !0;
303
305
  }
304
- unHighlightArea(e) {
305
- this.unHighlightLines(e.polyline.lines), this.five.needsRender = !0;
306
+ unHighlightArea(t) {
307
+ this.unHighlightLines(t.polyline.lines), this.five.needsRender = !0;
306
308
  }
307
- highlightLines(e) {
308
- e.forEach((t) => this.highlightLine(t));
309
+ highlightLines(t) {
310
+ t.forEach((e) => this.highlightLine(e));
309
311
  }
310
- unHighlightLines(e) {
311
- e.forEach((t) => {
312
- t.selected = !1, t.distanceItem.unHighlight(), this.group.remove(t.lightMesh), this.five.needsRender = !0;
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(e) {
316
- e.selected || (e.selected = !0, this.group.add(e.lightMesh), e.distanceItem.highlight(), this.five.needsRender = !0);
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 w } from "../utils/findAssociatedLines.js";
12
- import { getPointFromHammerEvent as D } from "../../shared-utils/getPointFromHammerEvent.js";
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 = D(e).point, t = (a = b(this.five, this.model.getAllPoints(), i, 20)) == null ? void 0 : a.point;
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: w(t.lines[0])
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 = D(e).ndcPoint, t = new T();
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 = w(e);
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 h from "./EditController.js";
14
+ import a from "./EditController.js";
15
15
  import w from "./ViewController.js";
16
16
  import v from "./WatchController.js";
17
- import a from "./MixedController.js";
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 h ? "Edit" : this.controller instanceof v ? "Watch" : this.controller instanceof a ? "Mixed" : this.controller instanceof w ? "View" : null);
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: h,
154
- Mixed: a
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 h && this.controller.revoke();
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 h) && !(this.controller instanceof a))
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 h ? this.controller.complete() : o.forEach((n) => {
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 a && this.hook.emit("willChangeState", "watching", "editing");
257
+ this.controller instanceof h && this.hook.emit("willChangeState", "watching", "editing");
255
258
  }
256
259
  /** Mixed 模式才有用,添加终点 */
257
260
  addEndPoint() {
258
- this.controller instanceof a && this.hook.emit("willChangeState", "editing", "watching");
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;
@@ -14,7 +14,7 @@ let b = class {
14
14
  /**
15
15
  * @realsee/dnalogel 版本号
16
16
  */
17
- i(this, "VERSION", "2.21.0-dev.14");
17
+ i(this, "VERSION", "2.21.0-dev.16");
18
18
  i(this, "five");
19
19
  /**
20
20
  * 插件事件钩子
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.debug(
3
- "%c %c@realsee/dnalogel %cv2.21.0-dev.14",
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.14",
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*",