@realsee/dnalogel 2.21.0-dev.7 → 2.21.0-dev.8

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 (333) hide show
  1. package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +11 -0
  2. package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
  3. package/dist/PanoMeasurePlugin/Model/area.d.ts +8 -1
  4. package/dist/PanoMeasurePlugin/Model/polygon.d.ts +1 -0
  5. package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +7 -3
  6. package/dist/index.cjs.js +34 -34
  7. package/dist/index.js +2536 -2483
  8. package/dist/index.umd.js +28 -28
  9. package/docs/classes/CSS3DRender.html +30 -30
  10. package/docs/classes/CruisePluginController.html +25 -25
  11. package/docs/classes/GuideLineItem.GuideLineItem.html +19 -19
  12. package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +34 -34
  13. package/docs/classes/Magnifier.html +19 -19
  14. package/docs/classes/ModelRoomLabelController.html +10 -10
  15. package/docs/classes/Object3DHelperController.html +24 -24
  16. package/docs/classes/PaintBrush.html +14 -14
  17. package/docs/classes/PanoMeasurePluginLine.html +26 -26
  18. package/docs/classes/PanoMeasurePluginModel.html +26 -26
  19. package/docs/classes/PanoMeasurePluginPoint.html +13 -13
  20. package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
  21. package/docs/classes/PanoTagPluginController.html +46 -46
  22. package/docs/classes/Util.BetterTween.html +8 -8
  23. package/docs/classes/Util.Interval.html +11 -11
  24. package/docs/classes/Util.Magnifier.html +17 -17
  25. package/docs/classes/Util.PointDomHelper.html +10 -10
  26. package/docs/classes/Util.PointHelper.html +10 -10
  27. package/docs/classes/Util.PointSelectorHelper.html +16 -16
  28. package/docs/classes/Util.Rectangle.html +12 -12
  29. package/docs/enums/CameraMovementEffect.html +6 -6
  30. package/docs/enums/ContentType.html +19 -19
  31. package/docs/enums/DIRECTION.html +8 -8
  32. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +8 -8
  33. package/docs/enums/DimensionType.html +6 -6
  34. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +7 -7
  35. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +8 -8
  36. package/docs/enums/PaintBrushTypeEnum.html +7 -7
  37. package/docs/enums/PointType.html +6 -6
  38. package/docs/enums/Rotation.html +7 -7
  39. package/docs/functions/CSS3DRenderPlugin.html +3 -3
  40. package/docs/functions/CameraMovementPlugin.html +3 -3
  41. package/docs/functions/CruisePlugin.html +3 -3
  42. package/docs/functions/GuideLinePlugin.html +4 -4
  43. package/docs/functions/ItemLabelPlugin.html +3 -3
  44. package/docs/functions/MapviewFloorplanPlugin.html +3 -3
  45. package/docs/functions/ModelChassisCompassPlugin.html +3 -3
  46. package/docs/functions/ModelEntryDoorGuidePlugin.html +3 -3
  47. package/docs/functions/ModelFloorplanPlugin.html +3 -3
  48. package/docs/functions/ModelItemLabelPlugin.html +3 -3
  49. package/docs/functions/ModelRoomLabelPlugin.html +3 -3
  50. package/docs/functions/ModelTVVideoPlugin.html +3 -3
  51. package/docs/functions/ModelViewPlugin.html +3 -3
  52. package/docs/functions/Object3DHelperPlugin.html +3 -3
  53. package/docs/functions/PanoCompassPlugin.html +3 -3
  54. package/docs/functions/PanoCursorRaycasterPlugin.html +3 -3
  55. package/docs/functions/PanoDoorLabelPlugin.html +3 -3
  56. package/docs/functions/PanoFloorplanRadarPlugin.html +3 -3
  57. package/docs/functions/PanoMeasurePlugin.html +3 -3
  58. package/docs/functions/PanoRulerPlugin.html +3 -3
  59. package/docs/functions/PanoRulerProPlugin.html +3 -3
  60. package/docs/functions/PanoSpatialTagPlugin.html +3 -3
  61. package/docs/functions/PanoTagPlugin.html +3 -3
  62. package/docs/functions/PanoVideoPlugin.html +3 -3
  63. package/docs/functions/TopviewFloorplanPlugin.html +3 -3
  64. package/docs/functions/Util.absoluteUrl.html +4 -4
  65. package/docs/functions/Util.getCoordsFromClient.html +4 -4
  66. package/docs/functions/Util.getCoordsFromElement.html +4 -4
  67. package/docs/functions/Util.getFrameTime.html +4 -4
  68. package/docs/functions/Util.getIntersectFromRelativePosition.html +4 -4
  69. package/docs/functions/Util.getRaycasterFromFivePointer.html +4 -4
  70. package/docs/functions/Util.isAbsoluteURL.html +4 -4
  71. package/docs/functions/Util.isModelLike.html +4 -4
  72. package/docs/functions/Util.isNil.html +4 -4
  73. package/docs/functions/Util.isPanoramaLike.html +4 -4
  74. package/docs/functions/Util.nextFrame.html +4 -4
  75. package/docs/functions/Util.notNil.html +4 -4
  76. package/docs/functions/Util.requestAnimationFrameInterval.html +4 -4
  77. package/docs/functions/Util.tweenProgress.html +4 -4
  78. package/docs/functions/Util.uuid.html +4 -4
  79. package/docs/functions/pluginFlag.html +4 -4
  80. package/docs/index.html +4 -4
  81. package/docs/interfaces/AddTagConfig.html +5 -5
  82. package/docs/interfaces/CSS3DRenderPluginEventMap.html +10 -10
  83. package/docs/interfaces/CSS3DRenderPluginState.html +7 -7
  84. package/docs/interfaces/CameraMovementPluginExportType.html +6 -6
  85. package/docs/interfaces/CruisePluginTypes.Config.html +7 -7
  86. package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +11 -11
  87. package/docs/interfaces/CruisePluginTypes.EventMap.html +19 -19
  88. package/docs/interfaces/CruisePluginTypes.MoveAction.html +11 -11
  89. package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +13 -13
  90. package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +13 -13
  91. package/docs/interfaces/CruisePluginTypes.PluginData.html +8 -8
  92. package/docs/interfaces/CruisePluginTypes.PluginServerData.html +6 -6
  93. package/docs/interfaces/CruisePluginTypes.PluginState.html +10 -10
  94. package/docs/interfaces/EventMap.html +14 -14
  95. package/docs/interfaces/FloorplanBounding.html +7 -7
  96. package/docs/interfaces/FloorplanData.html +9 -9
  97. package/docs/interfaces/FloorplanEntrance.html +10 -10
  98. package/docs/interfaces/FloorplanExtraObject.html +9 -9
  99. package/docs/interfaces/FloorplanExtraObject3D.html +7 -7
  100. package/docs/interfaces/FloorplanFloorData.html +8 -8
  101. package/docs/interfaces/FloorplanImagePosition.html +6 -6
  102. package/docs/interfaces/FloorplanObserver.html +8 -8
  103. package/docs/interfaces/FloorplanOutlineItem.html +8 -8
  104. package/docs/interfaces/FloorplanPosition.html +6 -6
  105. package/docs/interfaces/FloorplanRoomItem.html +12 -12
  106. package/docs/interfaces/FloorplanRoomLabelItem.html +6 -6
  107. package/docs/interfaces/FloorplanServerBounding.html +7 -7
  108. package/docs/interfaces/FloorplanServerComputedData.html +9 -9
  109. package/docs/interfaces/FloorplanServerData.html +6 -6
  110. package/docs/interfaces/FloorplanServerDoorItem.html +9 -9
  111. package/docs/interfaces/FloorplanServerDoorPosition.html +7 -7
  112. package/docs/interfaces/FloorplanServerEntrance.html +10 -10
  113. package/docs/interfaces/FloorplanServerFloorData.html +8 -8
  114. package/docs/interfaces/FloorplanServerImagePosition.html +6 -6
  115. package/docs/interfaces/FloorplanServerObserver.html +8 -8
  116. package/docs/interfaces/FloorplanServerOutlineItem.html +8 -8
  117. package/docs/interfaces/FloorplanServerPosition.html +6 -6
  118. package/docs/interfaces/FloorplanServerRoomItem.html +13 -13
  119. package/docs/interfaces/FloorplanServerRoomLabelItem.html +6 -6
  120. package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +7 -7
  121. package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +9 -9
  122. package/docs/interfaces/GuideLinePluginType.EventMap.html +12 -12
  123. package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +7 -7
  124. package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +5 -5
  125. package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +12 -12
  126. package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +7 -7
  127. package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +17 -17
  128. package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +6 -6
  129. package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +17 -17
  130. package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +4 -4
  131. package/docs/interfaces/GuideLinePluginType.PluginServerData.html +6 -6
  132. package/docs/interfaces/GuideLinePluginType.PluginState.html +7 -7
  133. package/docs/interfaces/GuideLinePluginType.Route.html +10 -10
  134. package/docs/interfaces/GuideLinePluginType.RouteConfig.html +8 -8
  135. package/docs/interfaces/HelperOffset.html +7 -7
  136. package/docs/interfaces/ImagePlaneGroup.html +5 -5
  137. package/docs/interfaces/ItemLabelPluginData.html +5 -5
  138. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +10 -10
  139. package/docs/interfaces/ItemLabelPluginParametersType.html +8 -8
  140. package/docs/interfaces/MinMax.html +6 -6
  141. package/docs/interfaces/ModelChassisCompassPluginData.html +6 -6
  142. package/docs/interfaces/ModelChassisCompassPluginExportType.html +7 -7
  143. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +6 -6
  144. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +7 -7
  145. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +7 -7
  146. package/docs/interfaces/ModelItemLabelPluginData.html +5 -5
  147. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +10 -10
  148. package/docs/interfaces/ModelItemLabelPluginParametersType.html +6 -6
  149. package/docs/interfaces/ModelRoomLabelPluginData.html +5 -5
  150. package/docs/interfaces/ModelTVVideoPluginData.html +8 -8
  151. package/docs/interfaces/ModelTVVideoPluginExportType.html +7 -7
  152. package/docs/interfaces/ModelTVVideoPluginParameterType.html +5 -5
  153. package/docs/interfaces/ModelViewPluginExportType.html +10 -10
  154. package/docs/interfaces/Object3DHelperState.html +7 -7
  155. package/docs/interfaces/ObjectHelperControllers.html +8 -8
  156. package/docs/interfaces/PaintBrushAction.html +11 -11
  157. package/docs/interfaces/PaintBrushConfigs.html +11 -11
  158. package/docs/interfaces/PaintBrushState.html +9 -9
  159. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +9 -9
  160. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +4 -4
  161. package/docs/interfaces/PanoMeasureParameterType.html +14 -14
  162. package/docs/interfaces/PanoMeasurePluginLineJson.html +7 -7
  163. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +6 -6
  164. package/docs/interfaces/PanoMeasurePluginPointJson.html +6 -6
  165. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +7 -7
  166. package/docs/interfaces/PanoRulerPluginExportType.html +9 -9
  167. package/docs/interfaces/PanoRulerPluginOptions.html +6 -6
  168. package/docs/interfaces/PanoRulerPluginParameterType.html +7 -7
  169. package/docs/interfaces/PanoRulerProPluginExportType.html +8 -8
  170. package/docs/interfaces/PanoRulerProPluginOptions.html +6 -6
  171. package/docs/interfaces/PanoRulerProPluginParameterType.html +6 -6
  172. package/docs/interfaces/PanoRulerProPluginState.html +7 -7
  173. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +4 -4
  174. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +4 -4
  175. package/docs/interfaces/PanoSpatialTagPluginData.html +10 -10
  176. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +9 -9
  177. package/docs/interfaces/PanoSpatialTagPluginExportType.html +12 -12
  178. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +9 -9
  179. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +12 -12
  180. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +10 -10
  181. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +9 -9
  182. package/docs/interfaces/PanoVideoPluginType.LoadParams.html +5 -5
  183. package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +7 -7
  184. package/docs/interfaces/PanoVideoPluginType.PluginData.html +5 -5
  185. package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +8 -8
  186. package/docs/interfaces/PanoVideoPluginType.PluginState.html +5 -5
  187. package/docs/interfaces/PanoVideoPluginType.VideoItem.html +7 -7
  188. package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +9 -9
  189. package/docs/interfaces/Point.html +7 -7
  190. package/docs/interfaces/Room.html +8 -8
  191. package/docs/interfaces/RoomInfo.html +6 -6
  192. package/docs/interfaces/RoomLabel.html +13 -13
  193. package/docs/interfaces/RoomRules.html +4 -4
  194. package/docs/interfaces/Rooms.html +4 -4
  195. package/docs/interfaces/Scissor.html +8 -8
  196. package/docs/interfaces/State.html +7 -7
  197. package/docs/interfaces/TagCacheInterface.html +11 -11
  198. package/docs/interfaces/TagConfig.html +12 -12
  199. package/docs/interfaces/TagGLTFObjectGroup.html +5 -5
  200. package/docs/interfaces/TagIconUrl.html +11 -11
  201. package/docs/interfaces/TagObjectGroup.html +5 -5
  202. package/docs/interfaces/TagStyle.html +5 -5
  203. package/docs/interfaces/Tags.html +8 -8
  204. package/docs/interfaces/TemporaryState.html +5 -5
  205. package/docs/interfaces/Util.MagnifierParameter.html +10 -10
  206. package/docs/interfaces/Util.MouseGroupParameter.html +7 -7
  207. package/docs/interfaces/Util.PointIntersection.html +7 -7
  208. package/docs/modules/CruisePluginTypes.html +4 -4
  209. package/docs/modules/GuideLineItem.html +4 -4
  210. package/docs/modules/GuideLineModeItem.html +4 -4
  211. package/docs/modules/GuideLinePluginType.html +4 -4
  212. package/docs/modules/PanoVideoPluginType.html +4 -4
  213. package/docs/modules/Util.html +4 -4
  214. package/docs/modules.html +4 -4
  215. package/docs/types/ArrayPosition.html +4 -4
  216. package/docs/types/AudioAppearance.html +4 -4
  217. package/docs/types/AudioTagTypeConfigKey.html +4 -4
  218. package/docs/types/CSS3DRenderExportType.html +4 -4
  219. package/docs/types/CSS3DRenderPluginExportType.html +4 -4
  220. package/docs/types/CSS3DRenderPluginParameterType.html +4 -4
  221. package/docs/types/ClassFunctionParameters.html +4 -4
  222. package/docs/types/Color.html +4 -4
  223. package/docs/types/ContentTypeConfigKey.html +4 -4
  224. package/docs/types/ContentTypeConfigKeySplit.html +4 -4
  225. package/docs/types/ContentTypeMap.html +4 -4
  226. package/docs/types/Create3DDomContainerReturnType.html +4 -4
  227. package/docs/types/Create3DElementReturnType.html +4 -4
  228. package/docs/types/CruisePluginExportType.html +4 -4
  229. package/docs/types/CruisePluginTypes.CruiseData.html +4 -4
  230. package/docs/types/CruisePluginTypes.MoveEffect.html +4 -4
  231. package/docs/types/DeprecatedMediaPlaneProperty.html +4 -4
  232. package/docs/types/DeprecatedTagProperty.html +4 -4
  233. package/docs/types/Direction-1.html +4 -4
  234. package/docs/types/Direction4.html +4 -4
  235. package/docs/types/ElementRenderer.html +4 -4
  236. package/docs/types/FloorplanRuleLabels.html +4 -4
  237. package/docs/types/FloorplanServerRuleLabels.html +4 -4
  238. package/docs/types/GuideLinePluginExportType.html +4 -4
  239. package/docs/types/GuideLinePluginType.GuideLineItem.html +4 -4
  240. package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +4 -4
  241. package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +4 -4
  242. package/docs/types/GuideLinePluginType.GuideLineStyle.html +4 -4
  243. package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +4 -4
  244. package/docs/types/GuideLinePluginType.PathItem.html +4 -4
  245. package/docs/types/GuideLinePluginType.PluginData.html +4 -4
  246. package/docs/types/HelperEventMap.html +4 -4
  247. package/docs/types/LoadTagConfig.html +4 -4
  248. package/docs/types/MapviewFloorplanPluginParameterType.html +4 -4
  249. package/docs/types/MapviewFloorplanPluginReturnType.html +4 -4
  250. package/docs/types/MediaData.html +4 -4
  251. package/docs/types/MediaStore.html +4 -4
  252. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +4 -4
  253. package/docs/types/ModelFloorplanPluginParameterType.html +4 -4
  254. package/docs/types/ModelFloorplanPluginReturnType.html +4 -4
  255. package/docs/types/ModelRoomLabelPluginParameters.html +4 -4
  256. package/docs/types/ModelRoomLabelPluginReturnType.html +4 -4
  257. package/docs/types/MoveArgs.html +4 -4
  258. package/docs/types/MoveOpts.html +4 -4
  259. package/docs/types/Object3DHelperEventMap.html +4 -4
  260. package/docs/types/ObjectFit.html +4 -4
  261. package/docs/types/PaintBrushEventMap.html +4 -4
  262. package/docs/types/PanoCompassPluginData.html +4 -4
  263. package/docs/types/PanoCompassPluginExportType.html +4 -4
  264. package/docs/types/PanoCompassPluginParameterType.html +4 -4
  265. package/docs/types/PanoFloorplanRadarPluginParameterType.html +4 -4
  266. package/docs/types/PanoFloorplanRadarPluginReturnType.html +4 -4
  267. package/docs/types/PanoIndex.html +4 -4
  268. package/docs/types/PanoMeasurePluginEvent.html +4 -4
  269. package/docs/types/PanoMeasureReturnType.html +4 -4
  270. package/docs/types/PanoSpatialTagPluginId.html +4 -4
  271. package/docs/types/PanoTagPluginExportInterface.html +4 -4
  272. package/docs/types/PanoTagPluginParamsInterface.html +4 -4
  273. package/docs/types/PanoVideoPluginParameterType.html +4 -4
  274. package/docs/types/PanoVideoPluginReturnType.html +4 -4
  275. package/docs/types/PartialObjectDeep.html +4 -4
  276. package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +4 -4
  277. package/docs/types/PlaneTag.html +4 -4
  278. package/docs/types/Point2DTag.html +4 -4
  279. package/docs/types/Point3DTag.html +4 -4
  280. package/docs/types/PointTag.html +4 -4
  281. package/docs/types/PointTagInstance.html +4 -4
  282. package/docs/types/Position.html +4 -4
  283. package/docs/types/RotateArgs.html +4 -4
  284. package/docs/types/RotateOpts.html +4 -4
  285. package/docs/types/RuleLabelsKey.html +4 -4
  286. package/docs/types/RuleLabelsValue.html +4 -4
  287. package/docs/types/StickType.html +4 -4
  288. package/docs/types/Tag.html +4 -4
  289. package/docs/types/Tag2D.html +4 -4
  290. package/docs/types/Tag3D.html +4 -4
  291. package/docs/types/TagContentType.html +4 -4
  292. package/docs/types/TagDimensionType.html +4 -4
  293. package/docs/types/TagElement.html +4 -4
  294. package/docs/types/TagEvents.html +4 -4
  295. package/docs/types/TagGLTFObject.html +4 -4
  296. package/docs/types/TagHooks.html +4 -4
  297. package/docs/types/TagId.html +4 -4
  298. package/docs/types/TagInstance.html +4 -4
  299. package/docs/types/TagPointType.html +4 -4
  300. package/docs/types/TagRendererMap.html +4 -4
  301. package/docs/types/TopviewFloorplanPluginParameterType.html +4 -4
  302. package/docs/types/TopviewFloorplanPluginReturnType.html +4 -4
  303. package/docs/types/WorkCode.html +4 -4
  304. package/docs/variables/FLOOR_TYPE_MAP.html +4 -4
  305. package/docs/variables/PLUGIN.html +4 -4
  306. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +4 -4
  307. package/docs/variables/ROOM_TYPE_MAP.html +4 -4
  308. package/docs/variables/itemLabelPluginServerParams.html +4 -4
  309. package/docs/variables/modelItemLabelPluginServerParams.html +4 -4
  310. package/docs/variables/modelRoomLabelPluginServerParams.html +4 -4
  311. package/libs/PanoMeasurePlugin/Components/Controller0.js +131 -64
  312. package/libs/PanoMeasurePlugin/Components/Controller1.js +120 -115
  313. package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +11 -0
  314. package/libs/PanoMeasurePlugin/Controller/EditController.js +166 -129
  315. package/libs/PanoMeasurePlugin/Controller/MixedController.js +5 -5
  316. package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
  317. package/libs/PanoMeasurePlugin/Controller/WatchController.js +13 -12
  318. package/libs/PanoMeasurePlugin/Controller/index.js +2 -2
  319. package/libs/PanoMeasurePlugin/Model/area.d.ts +8 -1
  320. package/libs/PanoMeasurePlugin/Model/area.js +21 -14
  321. package/libs/PanoMeasurePlugin/Model/polygon.d.ts +1 -0
  322. package/libs/PanoMeasurePlugin/Model/polygon.js +16 -14
  323. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +7 -3
  324. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +34 -24
  325. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +14 -8
  326. package/libs/PanoMeasurePlugin/index.js +3 -3
  327. package/libs/PanoMeasurePlugin/utils/generatePolygonGeometry.js +3 -3
  328. package/libs/base/BasePlugin.js +1 -1
  329. package/libs/index.js +3 -3
  330. package/libs/shared-utils/logger.js +1 -1
  331. package/libs/shared-utils/three/PointSelector.js +7 -7
  332. package/libs/shared-utils/three/PointSelectorHelper.js +7 -7
  333. package/package.json +1 -1
@@ -1,23 +1,26 @@
1
- var y = Object.defineProperty;
2
- var C = (p, a, t) => a in p ? y(p, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[a] = t;
3
- var s = (p, a, t) => (C(p, typeof a != "symbol" ? a + "" : a, t), t);
4
- import k from "../Model/line.js";
5
- import c from "../Model/point.js";
6
- import { throttle as S } from "../../shared-utils/throttle.js";
7
- import L from "./BaseController.js";
8
- import { Polyline as f } from "../Model/polyline.js";
9
- import u from "../Model/area.js";
10
- import v from "../utils/isIntersecting.js";
11
- import { PointSelector as A } from "../../shared-utils/three/PointSelector.js";
1
+ var U = Object.defineProperty;
2
+ var H = (m, c, e) => c in m ? U(m, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[c] = e;
3
+ var o = (m, c, e) => (H(m, typeof c != "symbol" ? c + "" : c, e), e);
4
+ import b from "../Model/line.js";
5
+ import S from "../Model/point.js";
6
+ import { throttle as j } from "../../shared-utils/throttle.js";
7
+ import x from "./BaseController.js";
8
+ import { Polyline as k } from "../Model/polyline.js";
9
+ import T from "../Model/area.js";
10
+ import w from "../utils/isIntersecting.js";
11
+ import { PointSelector as G } from "../../shared-utils/three/PointSelector.js";
12
+ import B from "../Modules/DeleteDom/index.js";
13
+ import { findAssociatedLines as V } from "../utils/findAssociatedLines.js";
14
+ import { Vector2 as y } from "three";
15
+ import I from "../utils/isNDCPointInScreen.js";
16
+ import { closestPointOnLine as $ } from "../utils/math.js";
12
17
  import "../../shared-utils/uuid.js";
13
18
  import "../utils/line.js";
14
19
  import "@realsee/five/line";
15
20
  import "../utils/constants.js";
16
- import "three";
17
21
  import "@realsee/five";
18
22
  import "../utils/dom/distanceItem.js";
19
23
  import "../utils/dom/base.js";
20
- import "../utils/isNDCPointInScreen.js";
21
24
  import "../../shared-utils/removeArrayItem.js";
22
25
  import "../utils/ironbox.js";
23
26
  import "../Model/polygon.js";
@@ -58,111 +61,62 @@ import "../../shared-utils/animationFrame/index.js";
58
61
  import "../../shared-utils/isTouchDevice.js";
59
62
  import "../../shared-utils/getIntersectionFromEvent.js";
60
63
  import "../../shared-utils/getPointFromHammerEvent.js";
61
- const l = () => !1;
62
- class Ee extends L {
63
- constructor(t) {
64
- var e;
65
- super(t);
66
- s(this, "type", "edit");
67
- s(this, "polyline");
68
- s(this, "area");
69
- s(this, "hasAppendDashed", !1);
70
- s(this, "fiveElement");
64
+ import "../Modules/DeleteDom/_Assets/delete.svg.js";
65
+ import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
66
+ import "../Modules/DeleteDom/_Assets/delete_hover_bg.png.js";
67
+ const E = () => !1;
68
+ class Xe extends x {
69
+ constructor(e) {
70
+ var t;
71
+ super(e);
72
+ o(this, "type", "edit");
73
+ o(this, "polyline");
74
+ o(this, "area");
75
+ o(this, "hasAppendDashed", !1);
76
+ // private deleteDom: DeleteDom
77
+ o(this, "fiveElement");
71
78
  /** 上一个端点位置 */
72
- s(this, "lastPoint", null);
73
- s(this, "pointSelector");
79
+ o(this, "lastPoint", null);
80
+ o(this, "pointSelector");
81
+ o(this, "deleteDom");
74
82
  /** 根据 intersection 更新放大镜和吸附点 */
75
- s(this, "onIntersectionUpdate", S(() => this.updateDashed(), 20));
83
+ o(this, "onIntersectionUpdate", j(() => this.updateDashed(), 20));
76
84
  /** 撤销编辑 */
77
- s(this, "revoke", () => {
85
+ o(this, "revoke", () => {
78
86
  this.currentMeasureType === "area" ? this.revokeArea() : this.currentMeasureType === "line" && this.revokeLine();
79
87
  });
80
88
  /**
81
89
  * @description: 测面积的撤销功能
82
90
  */
83
- s(this, "revokeArea", () => {
91
+ o(this, "revokeArea", () => {
84
92
  if (this.area.points.length !== 0) {
85
93
  if (this.area.popPoint(), this.area.points.length === 0) {
86
94
  this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.remove(), this.five.needsRender = !0, this.hook.emit("revoke", { isEmpty: !0 });
87
95
  return;
88
96
  } else
89
- this.lastPoint = new c(this.area.points[this.area.points.length - 1]), this.updateDashed();
97
+ this.lastPoint = new S(this.area.points[this.area.points.length - 1]), this.updateDashed();
90
98
  this.five.needsRender = !0;
91
99
  }
92
100
  });
93
101
  /**
94
102
  * @description: 测距的撤销功能
95
103
  */
96
- s(this, "revokeLine", (t) => {
97
- const e = t || this.polyline;
98
- if (e.lines.length === 0 && this.lastPoint) {
104
+ o(this, "revokeLine", (e) => {
105
+ const t = e || this.polyline;
106
+ if (t.lines.length === 0 && this.lastPoint) {
99
107
  this.lastPoint = null, this.hasAppendDashed = !1, this.dashed.remove(), this.hook.emit("anchorChange", null), this.hook.emit("editedDashedLineChange", null), this.five.needsRender = !0;
100
108
  return;
101
109
  }
102
- if (e.lines.length === 0 && !this.lastPoint || !this.lastPoint)
110
+ if (t.lines.length === 0 && !this.lastPoint || !this.lastPoint)
103
111
  return;
104
- const i = e.lines[e.lines.length - 1], o = i.findAnotherPoint(this.lastPoint);
105
- o && (this.lastPoint = o, this.hook.emit("anchorChange", o.position), this.group.remove(i.mesh), e.removeLine(i), i.distanceItem.remove(), this.updateDashed(), this.five.needsRender = !0);
112
+ const i = t.lines[t.lines.length - 1], s = i.findAnotherPoint(this.lastPoint);
113
+ 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);
106
114
  });
107
- // private wantsTapGesture = (raycaster): false => {
108
- // if (this.editParams.pointSelectorMode === 'cursor') return false // 鼠标选点的话点击动作为选点,所有没有下面的点击删除动作
109
- // // ================================= 这是选择面的逻辑 =================================
110
- // const intersections = this.model.areas
111
- // .map((area) => raycaster.intersectObject(area.polygon, true)[0]) // 获取所有的交点
112
- // .sort((a, b) => a.distance - b.distance) // 按照距离排序
113
- // const intersectionObject = intersections[0]?.object.parent
114
- // if (intersectionObject.isPolygonMesh) {
115
- // const area = this.model.areas.find((area) => area.polygon === intersectionObject)
116
- // if (area) {
117
- // const { x, y } = intersections[0].point.clone().project(this.five.camera)
118
- // const left = `${((x + 1) / 2) * 100}%`
119
- // const top = `${((-y + 1) / 2) * 100}%`
120
- // this.chooseArea(area, { left, top })
121
- // }
122
- // }
123
- // return false
124
- // // // ================================= 这后面是之前的选择线的逻辑 =================================
125
- // // const [target] = this.five.model.intersectRaycaster(raycaster)
126
- // // if (!target) return
127
- // // const camera = this.five.camera
128
- // // const ndcTarget = target.point.clone().project(camera)
129
- // // const screenWidth = this.container.clientWidth
130
- // // const screenHeight = this.container.clientHeight
131
- // // const targetScreenPosition = new Vector2(ndcTarget.x * screenWidth, ndcTarget.y * screenHeight)
132
- // // // 把线的端点全部映射到屏幕上,过滤掉不在视野内的线,同时乘以屏幕宽 & 高
133
- // // const screenLines = this.model
134
- // // .getAllLines()
135
- // // .map((line) => {
136
- // // const [startPoint, endPoint] = line.points
137
- // // const ndcStartPoint = startPoint.position.clone().project(camera)
138
- // // const ndcEndPoint = endPoint.position.clone().project(camera)
139
- // // if (!isNDCPointInScreen(ndcStartPoint) && !isNDCPointInScreen(ndcEndPoint)) return null
140
- // // const startScreenPosition = new Vector2(ndcStartPoint.x * screenWidth, ndcStartPoint.y * screenHeight)
141
- // // const endScreenPosition = new Vector2(ndcEndPoint.x * screenWidth, ndcEndPoint.y * screenHeight)
142
- // // return { id: line.id, points: [startScreenPosition, endScreenPosition] }
143
- // // })
144
- // // .filter((line) => !!line) as { id: string; points: Vector2[] }[]
145
- // // if (screenLines.length === 0) return
146
- // // // 找这些线距离鼠标点击位置最近的线
147
- // // const distanceLines = screenLines
148
- // // .map((line) => {
149
- // // const closestPoint = closestPointOnLine(targetScreenPosition, line.points)
150
- // // return { id: line.id, distance: closestPoint.distanceTo(targetScreenPosition) }
151
- // // })
152
- // // .sort((a, b) => a.distance - b.distance)
153
- // // const closestScreenLine = distanceLines[0]
154
- // // if (closestScreenLine.distance > 20) return
155
- // // const closestLine = this.model.getAllLines().find(({ id }) => id === closestScreenLine.id)
156
- // // if (!closestLine) return
157
- // // this.chooseLine(closestLine)
158
- // // return false
159
- // }
160
- s(this, "onMouseLeave", () => {
161
- var t;
162
- this.lastPoint && ((t = this.pointSelector.position) == null || t.point.copy(this.lastPoint.position), this.updateDashed()), this.area.hideArea();
115
+ o(this, "onMouseLeave", () => {
116
+ this.dashed.hide(), this.perpendicularDashed.hide(), this.area.hideArea();
163
117
  });
164
118
  /** 编辑线条发生改变时通知外部 */
165
- s(this, "onLineChanged", () => {
119
+ o(this, "onLineChanged", () => {
166
120
  this.hook.emit("editedPolylineChange", this.polyline);
167
121
  });
168
122
  /**
@@ -170,74 +124,140 @@ class Ee extends L {
170
124
  * 2. 把上一个点的位置更新为当前点的位置
171
125
  * 3. 清除 pointSelector
172
126
  */
173
- s(this, "onSelect", () => {
174
- var o, h, d, m;
127
+ o(this, "onSelect", () => {
128
+ var s, h, d, p;
175
129
  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;
176
- const t = (() => {
177
- var n, r;
130
+ const e = (() => {
131
+ var n, a;
178
132
  if (this.currentMeasureType === "area")
179
133
  return this.area.projectPoint((n = this.pointSelector.position) == null ? void 0 : n.point);
180
134
  if (this.currentMeasureType === "line")
181
- return (r = this.pointSelector.position) == null ? void 0 : r.point;
135
+ return (a = this.pointSelector.position) == null ? void 0 : a.point;
182
136
  })();
183
- if (!t)
137
+ if (!e)
184
138
  return;
185
- const e = new c(t), i = this.lastPoint;
186
- if (this.lastPoint = e, this.currentMeasureType === "line") {
187
- if (e && i) {
188
- const r = new k(i, e, this.model);
189
- r.distanceItem.setCanSelect(!1), r.distanceItem.appendTo(this.container), this.polyline.addLine(r), this.group.add(r.mesh), r.distanceItem.update(this.five);
139
+ const t = new S(e), i = this.lastPoint;
140
+ if (this.lastPoint = t, this.currentMeasureType === "line") {
141
+ if (t && i) {
142
+ const a = new b(i, t, this.model);
143
+ a.distanceItem.setCanSelect(!1), a.distanceItem.appendTo(this.container), this.polyline.addLine(a), this.group.add(a.mesh), a.distanceItem.update(this.five);
190
144
  }
191
- const n = (h = (o = this.editParams) == null ? void 0 : o.autoEndConfig) == null ? void 0 : h.line;
145
+ const n = (h = (s = this.editParams) == null ? void 0 : s.autoEndConfig) == null ? void 0 : h.line;
192
146
  typeof n == "number" && (this.polyline.getPointLength() >= n ? this.complete() : this.polyline.getPointLength() === n - 1 && this.hook.emit("readyComplete"));
193
147
  } else if (this.currentMeasureType === "area") {
194
- this.area.addPoints(e.position);
195
- const n = (m = (d = this.editParams) == null ? void 0 : d.autoEndConfig) == null ? void 0 : m.area;
148
+ this.area.addPoints(t.position);
149
+ const n = (p = (d = this.editParams) == null ? void 0 : d.autoEndConfig) == null ? void 0 : p.area;
196
150
  typeof n == "number" && (this.area.points.length >= n ? this.complete() : this.area.points.length === n - 1 && this.hook.emit("readyComplete"));
197
151
  }
198
- this.updateDashed(), this.five.needsRender = !0, this.hook.emit("anchorChange", e.position);
152
+ this.updateDashed(), this.five.needsRender = !0, this.hook.emit("anchorChange", t.position);
199
153
  });
200
154
  /** 移动全景时更新 distanceItem 在屏幕上的位置 */
201
- s(this, "onCameraUpdate", () => {
155
+ o(this, "onCameraUpdate", () => {
202
156
  this.updateDistanceUI();
203
157
  });
204
158
  /** 更新虚线 */
205
- s(this, "updateDashed", () => {
159
+ o(this, "updateDashed", () => {
206
160
  var i;
207
161
  if (!this.lastPoint)
208
162
  return;
209
- const t = this.lastPoint.position, e = (() => {
210
- var o, h;
163
+ const e = this.lastPoint.position, t = (() => {
164
+ var s, h;
211
165
  if (this.currentMeasureType === "area")
212
- return this.area.projectPoint((o = this.pointSelector.position) == null ? void 0 : o.point);
166
+ return this.area.projectPoint((s = this.pointSelector.position) == null ? void 0 : s.point);
213
167
  if (this.currentMeasureType === "line")
214
168
  return (h = this.pointSelector.position) == null ? void 0 : h.point;
215
169
  })();
216
- if (this.dashed.setPoints(t, e), this.dashed.distanceItem.update(this.five), this.hook.emit("editedDashedLineChange", this.dashed), this.currentMeasureType === "area")
170
+ if (!t) {
171
+ this.dashed.hide();
172
+ return;
173
+ }
174
+ if (this.dashed.setPoints(e, t), this.dashed.distanceItem.update(this.five), this.dashed.show(), this.hook.emit("editedDashedLineChange", this.dashed), this.currentMeasureType === "area")
217
175
  if (this.area.areaItem.setCanSelect(!1), this.area.points.length >= 2) {
218
- const o = this.area.polyline.lines.map((n) => ({ start: n.points[0].position, end: n.points[1].position })), h = v({ start: t, end: e }, o), d = v({ start: e, end: this.area.points[0] }, o);
176
+ const s = this.area.polyline.lines.map((n) => ({ start: n.points[0].position, end: n.points[1].position })), h = w({ start: e, end: t }, s), d = w({ start: t, end: this.area.points[0] }, s);
219
177
  if (h || d)
220
178
  this.area.hideArea(), this.hook.emit("allowAddPointStateChange", "forbid");
221
179
  else {
222
180
  this.area.showArea();
223
- const n = [...this.area.points, e];
181
+ const n = [...this.area.points, t];
224
182
  this.area.polygon.updatePoints(n), this.area.areaItem.updateArea(this.five);
225
- const r = (i = this.pointSelector.position) == null ? void 0 : i.point;
226
- if (!r) {
183
+ const a = (i = this.pointSelector.position) == null ? void 0 : i.point;
184
+ if (!a) {
227
185
  this.perpendicularDashed.hide();
228
186
  return;
229
187
  }
230
- const g = r, P = e;
188
+ const g = a, P = t;
231
189
  this.perpendicularDashed.setPoints(g, P), this.perpendicularDashed.show(), this.hook.emit("allowAddPointStateChange", "allow");
232
190
  }
233
191
  } else
234
192
  this.area.hideArea(), this.perpendicularDashed.hide();
235
193
  this.five.needsRender = !0;
236
194
  });
237
- this.pointSelector = new A(this.five, {
195
+ // 下面一堆高亮相关
196
+ o(this, "wantsTapGesture", (e) => {
197
+ var C, D;
198
+ if (this.editParams.pointSelectorMode === "cursor" || this.lastPoint)
199
+ return !1;
200
+ const t = this.model.areas.map((r) => e.intersectObject(r.polygon, !0)[0]).sort((r, l) => r.distance - l.distance), i = (D = (C = t[0]) == null ? void 0 : C.object) == null ? void 0 : D.parent;
201
+ if (i != null && i.isPolygonMesh) {
202
+ const r = this.model.areas.find((l) => l.polygon === i);
203
+ if (r) {
204
+ const { x: l, y: v } = t[0].point.clone().project(this.five.camera), f = `${(l + 1) / 2 * 100}%`, u = `${(-v + 1) / 2 * 100}%`;
205
+ return this.chooseArea(r, { left: f, top: u }), !1;
206
+ }
207
+ }
208
+ const [s] = this.five.model.intersectRaycaster(e);
209
+ if (!s)
210
+ return;
211
+ const h = this.five.camera, d = s.point.clone().project(h), p = this.container.clientWidth, n = this.container.clientHeight, a = new y(d.x * p, d.y * n), g = this.model.getAllLines().map((r) => {
212
+ const [l, v] = r.points, f = l.position.clone().project(h), u = v.position.clone().project(h);
213
+ if (!I(f) && !I(u))
214
+ return null;
215
+ const M = new y(f.x * p, f.y * n), R = new y(u.x * p, u.y * n);
216
+ return { id: r.id, points: [M, R] };
217
+ }).filter((r) => !!r);
218
+ if (g.length === 0)
219
+ return;
220
+ const L = g.map((r) => {
221
+ const l = $(a, r.points);
222
+ return { id: r.id, distance: l.distanceTo(a) };
223
+ }).sort((r, l) => r.distance - l.distance)[0];
224
+ if (L.distance > 20)
225
+ return;
226
+ const A = this.model.getAllLines().find(({ id: r }) => r === L.id);
227
+ if (A)
228
+ return this.chooseLine(A), !1;
229
+ });
230
+ o(this, "chooseLine", (e) => {
231
+ const t = V(e);
232
+ this.deleteDom.setTarget(t).setLines(t).updatePosition().show(), this.highlightLines(t), this.hook.emit("selectedChange", t);
233
+ });
234
+ o(this, "chooseArea", (e, t) => {
235
+ this.deleteDom.setTarget(e).updatePosition(t.left, `calc(${t.top} - 1.5rem)`).show(), this.highlightArea(e);
236
+ });
237
+ o(this, "deleteArea", (e) => {
238
+ this.unHighlightArea(e), e.dispose(), this.deleteDom.hide();
239
+ });
240
+ o(this, "deleteLine", (e) => {
241
+ const t = e[0], i = this.model.getPolylineByLine(t);
242
+ i && (this.model.removePolyline(i), this.deleteDom.setLines([]).hide());
243
+ });
244
+ this.fiveElement = this.five.getElement(), this.deleteDom = new B(this.five, {
245
+ i18n: this.config.i18n,
246
+ onClick: (i, s) => {
247
+ var p;
248
+ const h = s.type === "area", d = Array.isArray(s) && ((p = s[0]) == null ? void 0 : p.type) === "line";
249
+ h && this.deleteArea(s), d && this.deleteLine(s);
250
+ },
251
+ cancel: (i) => {
252
+ var d;
253
+ this.deleteDom.hide();
254
+ const s = i.type === "area", h = Array.isArray(i) && ((d = i[0]) == null ? void 0 : d.type) === "line";
255
+ s && this.unHighlightArea(i), h && this.unHighlightLines(i);
256
+ }
257
+ }).appendTo(this.container), this.pointSelector = new G(this.five, {
238
258
  mode: this.editParams.pointSelectorMode,
239
259
  pointSelectorHelperParams: { magnifierParams: this.magnifierParams }
240
- }), this.pointSelector.enable(), this.polyline = new f({ model: this.model }), this.area = new u(void 0, {
260
+ }), this.pointSelector.enable(), this.polyline = new k({ model: this.model }), this.area = new T(void 0, {
241
261
  five: this.five,
242
262
  model: this.model,
243
263
  meshContainer: this.group,
@@ -245,16 +265,16 @@ class Ee extends L {
245
265
  }), this.model.addPolyline(this.polyline), this.model.addArea(this.area), this.model.getAllLines().forEach((i) => {
246
266
  i.distanceItem.appendTo(this.container), i.distanceItem.update(this.five), i.distanceItem.setCanSelect(!0), this.group.add(i.mesh);
247
267
  }), this.model.getAllAreas().forEach((i) => {
248
- i.areaItem.appendTo(this.container), i.areaItem.updateDomPosition(this.five), i.areaItem.setCanSelect(!0), this.group.add(i.polygon), i.polyline.lines.forEach((o) => {
249
- o.distanceItem.appendTo(this.container), o.distanceItem.update(this.five), this.group.add(o.mesh);
268
+ i.areaItem.appendTo(this.container), i.areaItem.updateDomPosition(this.five), i.areaItem.setCanSelect(!0), this.group.add(i.polygon), i.polyline.lines.forEach((s) => {
269
+ s.distanceItem.appendTo(this.container), s.distanceItem.update(this.five), this.group.add(s.mesh);
250
270
  });
251
- }), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", l), this.five.on("wantsToMoveToPano", l), this.pointSelector.hook.on("intersectionUpdate", this.onIntersectionUpdate), this.pointSelector.hook.on("select", this.onSelect), 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();
271
+ }), 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.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();
252
272
  }
253
273
  dispose() {
254
- var t;
255
- super.dispose(), this.model.areas.forEach((e) => {
256
- (e.points.length < 2 || e.polygon.isBlank) && this.model.removeArea(e);
257
- }), this.five.helperVisible = !0, this.pointSelector.disable(), this.dashed.remove(), this.perpendicularDashed.remove(), this.five.off("cameraUpdate", this.onCameraUpdate), this.five.off("wantsTapGesture", l), this.five.off("wantsToMoveToPano", l), 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;
274
+ var e;
275
+ super.dispose(), this.model.areas.forEach((t) => {
276
+ (t.points.length < 2 || t.polygon.isBlank) && this.model.removeArea(t);
277
+ }), 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;
258
278
  }
259
279
  getEditingLines() {
260
280
  return this.polyline.lines;
@@ -263,9 +283,26 @@ class Ee extends L {
263
283
  this.onSelect();
264
284
  }
265
285
  complete() {
266
- this.hook.emit("complete"), this.currentMeasureType === "area" ? (this.area = new u(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 f({ model: this.model }), this.model.addPolyline(this.polyline)), this.lastPoint = void 0;
286
+ this.hook.emit("complete"), this.currentMeasureType === "area" ? (this.area.complete(), this.area = new T(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.dashed.hide(), this.perpendicularDashed.hide(), this.lastPoint = void 0;
287
+ }
288
+ highlightArea(e) {
289
+ this.highlightLines(e.polyline.lines), this.five.needsRender = !0;
290
+ }
291
+ unHighlightArea(e) {
292
+ this.unHighlightLines(e.polyline.lines), this.five.needsRender = !0;
293
+ }
294
+ highlightLines(e) {
295
+ e.forEach((t) => this.highlightLine(t));
296
+ }
297
+ unHighlightLines(e) {
298
+ e.forEach((t) => {
299
+ t.selected = !1, t.distanceItem.unHighlight(), this.group.remove(t.lightMesh), this.five.needsRender = !0;
300
+ });
301
+ }
302
+ highlightLine(e) {
303
+ e.selected || (e.selected = !0, this.group.add(e.lightMesh), e.distanceItem.highlight(), this.five.needsRender = !0);
267
304
  }
268
305
  }
269
306
  export {
270
- Ee as default
307
+ Xe as default
271
308
  };
@@ -1,7 +1,7 @@
1
1
  var b = Object.defineProperty;
2
- var D = (n, s, e) => s in n ? b(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
3
- var t = (n, s, e) => (D(n, typeof s != "symbol" ? s + "" : s, e), e);
4
- import { Model as S } from "../Model/index.js";
2
+ var S = (n, s, e) => s in n ? b(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
3
+ var t = (n, s, e) => (S(n, typeof s != "symbol" ? s + "" : s, e), e);
4
+ import { Model as D } from "../Model/index.js";
5
5
  import y from "../Model/line.js";
6
6
  import T from "./BaseController.js";
7
7
  import M from "../Modules/DeleteDom/index.js";
@@ -119,10 +119,10 @@ class le extends T {
119
119
  t(this, "cancelDeleteClickCallback", () => {
120
120
  this.clearHighlightLines();
121
121
  });
122
- this.model = new S(this.config), this.polyline = new L({ model: this.model }), this.rangePieceController = new E(e), this.deleteDom = new M(this.five, {
122
+ this.model = new D(this.config), this.polyline = new L({ model: this.model }), this.rangePieceController = new E(e), this.deleteDom = new M(this.five, {
123
123
  i18n: this.config.i18n,
124
124
  onClick: this.deleteDomClickCallback,
125
- cancelDelete: this.cancelDeleteClickCallback
125
+ cancel: this.cancelDeleteClickCallback
126
126
  }).appendTo(this.container), this.five.on("cameraUpdate", this.onCameraUpdate), this.five.on("wantsTapGesture", this.onWantsTapGesture), this.five.on("wantsToMoveToPano", this.onWantsToMoveToPano), this.five.helperVisible = !1, this.hook.emit("editedDashedLineChange", null), this.hook.on("getStartPoint", this.onGetStartPoint), this.hook.on("getEndPoint", this.onGetEndPoint), this.hook.on("nowPointChange", this.onNowPointChange), this.hook.on("willChangeState", this.onWillChangeState), this.five.refresh();
127
127
  }
128
128
  dispose() {
@@ -14,9 +14,9 @@ export default class WatchController extends BaseController {
14
14
  highlightLine(line: Line): void;
15
15
  clearHighlightLines(): void;
16
16
  private highlightArea;
17
+ private unHighlightArea;
17
18
  private highlightLines;
18
19
  private unHighlightLines;
19
- private unHighlightArea;
20
20
  private onPanStart;
21
21
  private onPanEnd;
22
22
  private onPan;
@@ -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 D } from "../utils/findAssociatedLines.js";
12
- import { getPointFromHammerEvent as w } from "../../shared-utils/getPointFromHammerEvent.js";
11
+ import { findAssociatedLines as w } from "../utils/findAssociatedLines.js";
12
+ import { getPointFromHammerEvent as D } 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 = w(e).point, t = (a = b(this.five, this.model.getAllPoints(), i, 20)) == null ? void 0 : a.point;
53
+ const i = D(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: D(t.lines[0])
60
+ associatedLines: w(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 = w(e).ndcPoint, t = new T();
73
+ const i = D(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,14 +129,14 @@ class Pe extends G {
129
129
  });
130
130
  s(this, "chooseLine", (e) => {
131
131
  this.choose = "line";
132
- const i = D(e);
132
+ const i = w(e);
133
133
  this.deleteDom.setLines(i).updatePosition().show(), this.highlightLines(i), this.five.needsRender = !0, this.hook.emit(
134
134
  "selectedChange",
135
135
  i.map((t) => t)
136
136
  );
137
137
  });
138
138
  s(this, "chooseArea", (e, i) => {
139
- this.choose = e, this.deleteDom.updatePosition(i.left, `calc(${i.top} - 20px)`).show(), this.highlightArea(e);
139
+ this.deleteDom.setTarget(e).updatePosition(i.left, `calc(${i.top} - 20px)`).show(), this.highlightArea(e);
140
140
  });
141
141
  s(this, "polylineRemoved", (e) => {
142
142
  e.lines.forEach((i) => this.removeLine(i)), this.hook.emit(
@@ -162,7 +162,7 @@ class Pe extends G {
162
162
  onClick: () => {
163
163
  this.choose === "line" ? this.deleteLine() : this.choose instanceof j && this.deleteArea(this.choose);
164
164
  },
165
- cancelDelete: this.cancelDeleteClickCallback
165
+ cancel: this.cancelDeleteClickCallback
166
166
  }).appendTo(this.container), this.model.getAllLines().forEach((t) => {
167
167
  t.distanceItem.appendTo(this.container), t.distanceItem.update(this.five), t.hook.on("selected", this.chooseLine), t.distanceItem.setCanSelect(!0), this.group.add(t.mesh);
168
168
  }), this.model.getAllAreas().forEach((t) => {
@@ -191,19 +191,20 @@ class Pe extends G {
191
191
  highlightArea(e) {
192
192
  this.unHighlightLines(), this.unHighlightArea(), this.highlightLines(e.polyline.lines), this.five.needsRender = !0;
193
193
  }
194
+ unHighlightArea(e) {
195
+ const i = e != null ? e : this.highlightedArea;
196
+ i && (this.unHighlightLines(i.polyline.lines), this.five.needsRender = !0);
197
+ }
194
198
  highlightLines(e) {
195
199
  this.unHighlightLines(), this.highlightedLines = e, e.forEach((i) => this.highlightLine(i));
196
200
  }
197
201
  unHighlightLines(e) {
202
+ this.unHighlightArea();
198
203
  const i = e != null ? e : this.highlightedLines;
199
204
  i && i.forEach((t) => {
200
205
  t.selected = !1, t.distanceItem.unHighlight(), this.group.remove(t.lightMesh), this.five.needsRender = !0;
201
206
  });
202
207
  }
203
- unHighlightArea(e) {
204
- const i = e != null ? e : this.highlightedArea;
205
- i && (this.unHighlightLines(i.polyline.lines), this.five.needsRender = !0);
206
- }
207
208
  }
208
209
  export {
209
210
  Pe as default
@@ -83,10 +83,10 @@ import "../Modules/DeleteDom/index.js";
83
83
  import "../Modules/DeleteDom/_Assets/delete.svg.js";
84
84
  import "../Modules/DeleteDom/_Assets/delete_bg.png.js";
85
85
  import "../Modules/DeleteDom/_Assets/delete_hover_bg.png.js";
86
+ import "../utils/findAssociatedLines.js";
86
87
  import "../utils/math.js";
87
88
  import "../utils/findClosestPoint.js";
88
89
  import "../utils/ndc2Screen.js";
89
- import "../utils/findAssociatedLines.js";
90
90
  import "../Modules/rangePiece/index.js";
91
91
  import "../../shared-utils/noop.js";
92
92
  import "../utils/calculateThreeMouse.js";
@@ -163,7 +163,7 @@ class kt {
163
163
  });
164
164
  var l, n, u, d, f, g, y, M, C;
165
165
  this.five = e, this.params = t, this.config = D(t, ["openParams", "magnifierParams"]), this.model = new x(this.config), this.fiveHelper = new k(e), this.isMobile = (n = (l = t == null ? void 0 : t.openParams) == null ? void 0 : l.isMobile) != null ? n : !1, this.magnifier = new B(e, (u = t.magnifierParams) != null ? u : { width: 190, height: 190, scale: 2 }), this.allowMeasureType = Array.from(new Set((f = (d = t.editParams) == null ? void 0 : d.allowMeasureType) != null ? f : ["line"])), this.currentMeasureType = (g = this.allowMeasureType[0]) != null ? g : "line", this.group = new U(), 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";
166
- const o = ((M = (y = t.editParams) == null ? void 0 : y.pointSelectorMode) != null ? M : W) ? "fixed" : "cursor", r = (C = this.params.openParams) != null ? C : {};
166
+ const o = (M = (y = t.editParams) == null ? void 0 : y.pointSelectorMode) != null ? M : W ? "fixed" : "cursor", r = (C = this.params.openParams) != null ? C : {};
167
167
  if (this.params.useUIController !== !1) {
168
168
  const p = h({ container: this.container, openParams: r, pointSelectorMode: o }, b(this.params.useUIController));
169
169
  this.useUIController = new S(this, p);
@@ -18,6 +18,7 @@ export default class Area {
18
18
  id: string;
19
19
  selected: boolean;
20
20
  text?: string;
21
+ readonly type = "area";
21
22
  readonly lightMesh: FiveLine;
22
23
  readonly areaItem: AreaItem;
23
24
  readonly hook: Subscribe<AreaHook>;
@@ -43,8 +44,14 @@ export default class Area {
43
44
  five?: Five;
44
45
  });
45
46
  addPoints(point: THREE.Vector3): void;
47
+ /**
48
+ * @description: 移除最后一个添加的点
49
+ */
46
50
  popPoint(): void;
47
- refresh(): void;
51
+ /**
52
+ * @description: 自动补全多边形的各个边
53
+ */
54
+ complete(): void;
48
55
  hideArea(): void;
49
56
  showArea(): void;
50
57
  /**