@labelbee/lb-annotation 1.14.0-alpha.1 → 1.14.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/dist/_virtual/MathUtilsWorker.js +8 -1
  2. package/dist/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +35 -2
  3. package/dist/_virtual/filterBoxWorker.js +8 -1
  4. package/dist/_virtual/highlightWorker.js +8 -1
  5. package/dist/assets/attributeIcon/icon_canvasEdit0.svg.js +5 -1
  6. package/dist/assets/attributeIcon/icon_canvasEdit1.svg.js +5 -1
  7. package/dist/assets/attributeIcon/icon_canvasEdit2.svg.js +5 -1
  8. package/dist/assets/attributeIcon/icon_canvasEdit3.svg.js +5 -1
  9. package/dist/assets/attributeIcon/icon_canvasEdit4.svg.js +5 -1
  10. package/dist/assets/attributeIcon/icon_canvasEdit5.svg.js +5 -1
  11. package/dist/assets/attributeIcon/icon_canvasEdit6.svg.js +5 -1
  12. package/dist/assets/attributeIcon/icon_canvasEdit7.svg.js +5 -1
  13. package/dist/assets/attributeIcon/icon_canvasEdit8.svg.js +5 -1
  14. package/dist/assets/attributeIcon/icon_canvasEdit_miss.svg.js +5 -1
  15. package/dist/assets/attributeIcon/icon_cuboidFAB.svg.js +5 -5
  16. package/dist/assets/attributeIcon/icon_cuboidLeft.svg.js +5 -7
  17. package/dist/assets/attributeIcon/icon_cuboidMore.svg.js +5 -5
  18. package/dist/assets/attributeIcon/icon_cuboidRight.svg.js +5 -5
  19. package/dist/assets/attributeIcon/icon_cuboidTop.svg.js +5 -12
  20. package/dist/assets/attributeIcon/icon_editFEN.svg.js +5 -1
  21. package/dist/assets/attributeIcon/icon_editHUANG.svg.js +5 -1
  22. package/dist/assets/attributeIcon/icon_editLAN.svg.js +5 -1
  23. package/dist/assets/attributeIcon/icon_editLV.svg.js +5 -1
  24. package/dist/assets/attributeIcon/icon_editQING.svg.js +5 -1
  25. package/dist/constant/annotation.js +127 -1
  26. package/dist/constant/annotationTask.js +30 -1
  27. package/dist/constant/defaultConfig.js +266 -1
  28. package/dist/constant/keyCode.js +38 -1
  29. package/dist/constant/style.js +98 -1
  30. package/dist/constant/tool.js +236 -1
  31. package/dist/core/index.js +150 -1
  32. package/dist/core/pointCloud/OrbitControls.js +665 -1
  33. package/dist/core/pointCloud/PCDLoader.js +260 -2
  34. package/dist/core/pointCloud/annotation.js +215 -1
  35. package/dist/core/pointCloud/cache.js +53 -1
  36. package/dist/core/pointCloud/index.js +991 -5
  37. package/dist/core/pointCloud/matrix.js +138 -1
  38. package/dist/core/pointCloud/segmentation.js +144 -0
  39. package/dist/core/pointCloud/selector/Sse3dLassoSelector.js +26 -0
  40. package/dist/core/pointCloud/selector/Sse3dSelector.js +16 -0
  41. package/dist/core/scheduler.js +233 -1
  42. package/dist/core/toolOperation/LineToolOperation.js +1434 -1
  43. package/dist/core/toolOperation/ScribbleTool.js +292 -1
  44. package/dist/core/toolOperation/TextToolOperation.js +131 -1
  45. package/dist/core/toolOperation/ViewOperation.js +556 -1
  46. package/dist/core/toolOperation/basicToolOperation.js +881 -1
  47. package/dist/core/toolOperation/checkOperation.js +208 -1
  48. package/dist/core/toolOperation/cuboidOperation.js +754 -1
  49. package/dist/core/toolOperation/cuboidToggleButtonClass.js +152 -7
  50. package/dist/core/toolOperation/eventListener.js +37 -1
  51. package/dist/core/toolOperation/measureOperation.js +41 -1
  52. package/dist/core/toolOperation/pointCloud2dOperation.js +365 -1
  53. package/dist/core/toolOperation/pointOperation.js +696 -1
  54. package/dist/core/toolOperation/polygonOperation.js +1251 -1
  55. package/dist/core/toolOperation/rectOperation.js +1233 -1
  56. package/dist/core/toolOperation/segmentByRect.js +174 -1
  57. package/dist/core/toolOperation/tagOperation.js +201 -3
  58. package/dist/core/toolOperation/textAttributeClass.js +182 -16
  59. package/dist/index.js +185 -1
  60. package/dist/locales/constants.js +24 -1
  61. package/dist/locales/en_US/message.js +25 -1
  62. package/dist/locales/index.js +19 -1
  63. package/dist/locales/zh_CN/message.js +25 -1
  64. package/dist/newCore/CanvasScheduler.js +35 -1
  65. package/dist/types/core/pointCloud/annotation.d.ts +3 -1
  66. package/dist/types/core/pointCloud/segmentation.d.ts +0 -0
  67. package/dist/types/core/pointCloud/selector/Sse3dLassoSelector.d.ts +0 -0
  68. package/dist/types/core/pointCloud/selector/Sse3dSelector.d.ts +0 -0
  69. package/dist/types/core/toolOperation/LineToolOperation.d.ts +11 -0
  70. package/dist/types/utils/tool/DrawUtils.d.ts +0 -2
  71. package/dist/utils/ActionsHistory.js +84 -1
  72. package/dist/utils/ImgUtils.js +23 -1
  73. package/dist/utils/MathUtils.js +385 -2
  74. package/dist/utils/VectorUtils.js +25 -1
  75. package/dist/utils/tool/AttributeUtils.js +218 -1
  76. package/dist/utils/tool/AxisUtils.js +340 -1
  77. package/dist/utils/tool/CanvasUtils.js +62 -1
  78. package/dist/utils/tool/CommonToolUtils.js +174 -1
  79. package/dist/utils/tool/CuboidUtils.js +704 -1
  80. package/dist/utils/tool/DblClickEventListener.js +102 -1
  81. package/dist/utils/tool/DrawUtils.js +492 -3
  82. package/dist/utils/tool/EnhanceCommonToolUtils.js +53 -1
  83. package/dist/utils/tool/ImgPosUtils.js +58 -1
  84. package/dist/utils/tool/LineToolUtils.js +261 -1
  85. package/dist/utils/tool/MarkerUtils.js +56 -1
  86. package/dist/utils/tool/PolygonUtils.js +460 -1
  87. package/dist/utils/tool/RectUtils.js +155 -1
  88. package/dist/utils/tool/RenderDomClass.js +57 -7
  89. package/dist/utils/tool/RenderDomUtils.js +21 -4
  90. package/dist/utils/tool/StyleUtils.js +31 -1
  91. package/dist/utils/tool/TagUtils.js +129 -1
  92. package/dist/utils/tool/UnitUtils.js +12 -1
  93. package/dist/utils/tool/ZoomUtils.js +72 -1
  94. package/dist/utils/tool/polygonTool.js +133 -1
  95. package/dist/utils/uuid.js +26 -1
  96. package/es/_virtual/MathUtilsWorker.js +6 -1
  97. package/es/_virtual/_rollup-plugin-web-worker-loader__helper__auto__createBase64WorkerFactory.js +12 -0
  98. package/es/_virtual/_rollup-plugin-web-worker-loader__helper__auto__isNodeJS.js +7 -0
  99. package/es/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +31 -2
  100. package/es/_virtual/_rollup-plugin-web-worker-loader__helper__node__WorkerClass.js +11 -0
  101. package/es/_virtual/_rollup-plugin-web-worker-loader__helper__node__createBase64WorkerFactory.js +18 -0
  102. package/es/_virtual/filterBoxWorker.js +6 -1
  103. package/es/_virtual/highlightWorker.js +6 -1
  104. package/es/assets/attributeIcon/icon_canvasEdit0.svg.js +3 -1
  105. package/es/assets/attributeIcon/icon_canvasEdit1.svg.js +3 -1
  106. package/es/assets/attributeIcon/icon_canvasEdit2.svg.js +3 -1
  107. package/es/assets/attributeIcon/icon_canvasEdit3.svg.js +3 -1
  108. package/es/assets/attributeIcon/icon_canvasEdit4.svg.js +3 -1
  109. package/es/assets/attributeIcon/icon_canvasEdit5.svg.js +3 -1
  110. package/es/assets/attributeIcon/icon_canvasEdit6.svg.js +3 -1
  111. package/es/assets/attributeIcon/icon_canvasEdit7.svg.js +3 -1
  112. package/es/assets/attributeIcon/icon_canvasEdit8.svg.js +3 -1
  113. package/es/assets/attributeIcon/icon_canvasEdit_miss.svg.js +3 -1
  114. package/es/assets/attributeIcon/icon_cuboidFAB.svg.js +3 -5
  115. package/es/assets/attributeIcon/icon_cuboidLeft.svg.js +3 -7
  116. package/es/assets/attributeIcon/icon_cuboidMore.svg.js +3 -5
  117. package/es/assets/attributeIcon/icon_cuboidRight.svg.js +3 -5
  118. package/es/assets/attributeIcon/icon_cuboidTop.svg.js +3 -12
  119. package/es/assets/attributeIcon/icon_editFEN.svg.js +3 -1
  120. package/es/assets/attributeIcon/icon_editHUANG.svg.js +3 -1
  121. package/es/assets/attributeIcon/icon_editLAN.svg.js +3 -1
  122. package/es/assets/attributeIcon/icon_editLV.svg.js +3 -1
  123. package/es/assets/attributeIcon/icon_editQING.svg.js +3 -1
  124. package/es/constant/annotation.js +113 -1
  125. package/es/constant/annotationTask.js +25 -1
  126. package/es/constant/defaultConfig.js +260 -1
  127. package/es/constant/keyCode.js +36 -1
  128. package/es/constant/style.js +74 -1
  129. package/es/constant/tool.js +220 -1
  130. package/es/core/index.js +148 -1
  131. package/es/core/pointCloud/OrbitControls.js +661 -1
  132. package/es/core/pointCloud/PCDLoader.js +256 -2
  133. package/es/core/pointCloud/annotation.js +211 -1
  134. package/es/core/pointCloud/cache.js +49 -1
  135. package/es/core/pointCloud/index.js +962 -5
  136. package/es/core/pointCloud/matrix.js +109 -1
  137. package/es/core/pointCloud/segmentation.js +120 -0
  138. package/es/core/pointCloud/selector/Sse3dLassoSelector.js +24 -0
  139. package/es/core/pointCloud/selector/Sse3dSelector.js +14 -0
  140. package/es/core/scheduler.js +228 -1
  141. package/es/core/toolOperation/LineToolOperation.js +1421 -1
  142. package/es/core/toolOperation/ScribbleTool.js +290 -1
  143. package/es/core/toolOperation/TextToolOperation.js +129 -1
  144. package/es/core/toolOperation/ViewOperation.js +549 -1
  145. package/es/core/toolOperation/basicToolOperation.js +877 -1
  146. package/es/core/toolOperation/checkOperation.js +206 -1
  147. package/es/core/toolOperation/cuboidOperation.js +752 -1
  148. package/es/core/toolOperation/cuboidToggleButtonClass.js +150 -7
  149. package/es/core/toolOperation/eventListener.js +35 -1
  150. package/es/core/toolOperation/measureOperation.js +39 -1
  151. package/es/core/toolOperation/pointCloud2dOperation.js +359 -1
  152. package/es/core/toolOperation/pointOperation.js +690 -1
  153. package/es/core/toolOperation/polygonOperation.js +1245 -1
  154. package/es/core/toolOperation/rectOperation.js +1228 -1
  155. package/es/core/toolOperation/scribbleTool2.js +249 -0
  156. package/es/core/toolOperation/segmentByRect.js +172 -1
  157. package/es/core/toolOperation/tagOperation.js +199 -3
  158. package/es/core/toolOperation/textAttributeClass.js +180 -16
  159. package/es/index.js +46 -1
  160. package/es/locales/constants.js +22 -1
  161. package/es/locales/en_US/message.js +23 -1
  162. package/es/locales/index.js +17 -1
  163. package/es/locales/zh_CN/message.js +23 -1
  164. package/es/newCore/CanvasScheduler.js +31 -1
  165. package/es/utils/ActionsHistory.js +78 -1
  166. package/es/utils/ImgUtils.js +21 -1
  167. package/es/utils/MathUtils.js +380 -2
  168. package/es/utils/VectorUtils.js +23 -1
  169. package/es/utils/tool/AttributeUtils.js +212 -1
  170. package/es/utils/tool/AxisUtils.js +335 -1
  171. package/es/utils/tool/CanvasUtils.js +60 -1
  172. package/es/utils/tool/CommonToolUtils.js +172 -1
  173. package/es/utils/tool/CuboidUtils.js +680 -1
  174. package/es/utils/tool/DblClickEventListener.js +100 -1
  175. package/es/utils/tool/DrawUtils.js +490 -3
  176. package/es/utils/tool/EnhanceCommonToolUtils.js +48 -1
  177. package/es/utils/tool/ImgPosUtils.js +56 -1
  178. package/es/utils/tool/LineToolUtils.js +255 -1
  179. package/es/utils/tool/MarkerUtils.js +54 -1
  180. package/es/utils/tool/PolygonUtils.js +458 -1
  181. package/es/utils/tool/RectUtils.js +153 -1
  182. package/es/utils/tool/RenderDomClass.js +55 -7
  183. package/es/utils/tool/RenderDomUtils.js +19 -4
  184. package/es/utils/tool/StyleUtils.js +29 -1
  185. package/es/utils/tool/TagUtils.js +127 -1
  186. package/es/utils/tool/UnitUtils.js +10 -1
  187. package/es/utils/tool/ZoomUtils.js +70 -1
  188. package/es/utils/tool/polygonTool.js +126 -1
  189. package/es/utils/uuid.js +24 -1
  190. package/package.json +7 -5
package/dist/index.js CHANGED
@@ -1 +1,185 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var rectOperation=require("./core/toolOperation/rectOperation.js"),tagOperation=require("./core/toolOperation/tagOperation.js"),pointOperation=require("./core/toolOperation/pointOperation.js"),LineToolOperation=require("./core/toolOperation/LineToolOperation.js"),TextToolOperation=require("./core/toolOperation/TextToolOperation.js"),polygonOperation=require("./core/toolOperation/polygonOperation.js"),measureOperation=require("./core/toolOperation/measureOperation.js"),basicToolOperation=require("./core/toolOperation/basicToolOperation.js"),ViewOperation=require("./core/toolOperation/ViewOperation.js"),ScribbleTool=require("./core/toolOperation/ScribbleTool.js"),pointCloud2dOperation=require("./core/toolOperation/pointCloud2dOperation.js"),annotation=require("./constant/annotation.js"),annotationTask=require("./constant/annotationTask.js"),keyCode=require("./constant/keyCode.js"),style=require("./constant/style.js"),tool=require("./constant/tool.js"),TagUtils=require("./utils/tool/TagUtils.js"),uuid=require("./utils/uuid.js"),EnhanceCommonToolUtils=require("./utils/tool/EnhanceCommonToolUtils.js"),MarkerUtils=require("./utils/tool/MarkerUtils.js"),RectUtils=require("./utils/tool/RectUtils.js"),AxisUtils=require("./utils/tool/AxisUtils.js"),DrawUtils=require("./utils/tool/DrawUtils.js"),ImgUtils=require("./utils/ImgUtils.js"),MathUtils=require("./utils/MathUtils.js"),AttributeUtils=require("./utils/tool/AttributeUtils.js"),ActionsHistory=require("./utils/ActionsHistory.js"),DblClickEventListener=require("./utils/tool/DblClickEventListener.js"),index=require("./core/index.js"),UnitUtils=require("./utils/tool/UnitUtils.js"),StyleUtils=require("./utils/tool/StyleUtils.js"),CanvasScheduler=require("./newCore/CanvasScheduler.js"),index$1=require("./core/pointCloud/index.js"),matrix=require("./core/pointCloud/matrix.js"),annotation$1=require("./core/pointCloud/annotation.js");function _interopNamespaceDefaultOnly(e){return Object.freeze({__proto__:null,default:e})}var keyCode__namespace=_interopNamespaceDefaultOnly(keyCode);const CommonToolUtils=EnhanceCommonToolUtils.default,toolUtils=EnhanceCommonToolUtils.default;exports.RectOperation=rectOperation.RectOperation,exports.TagOperation=tagOperation,exports.PointOperation=pointOperation,exports.LineToolOperation=LineToolOperation.default,exports.TextToolOperation=TextToolOperation,exports.PolygonOperation=polygonOperation,exports.MeasureOperation=measureOperation,exports.BasicToolOperation=basicToolOperation.BasicToolOperation,exports.ViewOperation=ViewOperation,exports.ScribbleTool=ScribbleTool,exports.PointCloud2dOperation=pointCloud2dOperation,exports.cAnnotation=annotation,exports.cAnnotationTask=annotationTask,exports.cKeyCode=keyCode__namespace,exports.cStyle=style,exports.CLIENT_TOOL_HEAD_TYPE=tool.CLIENT_TOOL_HEAD_TYPE,exports.CLIENT_TOOL_NAME=tool.CLIENT_TOOL_NAME,exports.DEFAULT_FONT=tool.DEFAULT_FONT,exports.DEFAULT_TEXT_MAX_WIDTH=tool.DEFAULT_TEXT_MAX_WIDTH,Object.defineProperty(exports,"EAnnotationMode",{enumerable:!0,get:function(){return tool.EAnnotationMode}}),Object.defineProperty(exports,"EAuditStatus",{enumerable:!0,get:function(){return tool.EAuditStatus}}),Object.defineProperty(exports,"ECheckModel",{enumerable:!0,get:function(){return tool.ECheckModel}}),Object.defineProperty(exports,"EDependPattern",{enumerable:!0,get:function(){return tool.EDependPattern}}),Object.defineProperty(exports,"EDragTarget",{enumerable:!0,get:function(){return tool.EDragTarget}}),Object.defineProperty(exports,"EDrawPointPattern",{enumerable:!0,get:function(){return tool.EDrawPointPattern}}),Object.defineProperty(exports,"EFilterToolOperation",{enumerable:!0,get:function(){return tool.EFilterToolOperation}}),Object.defineProperty(exports,"ELineColor",{enumerable:!0,get:function(){return tool.ELineColor}}),Object.defineProperty(exports,"ELineTypes",{enumerable:!0,get:function(){return tool.ELineTypes}}),Object.defineProperty(exports,"EOperationMode",{enumerable:!0,get:function(){return tool.EOperationMode}}),Object.defineProperty(exports,"EPageOperator",{enumerable:!0,get:function(){return tool.EPageOperator}}),Object.defineProperty(exports,"EPointCloudName",{enumerable:!0,get:function(){return tool.EPointCloudName}}),Object.defineProperty(exports,"EPolygonPattern",{enumerable:!0,get:function(){return tool.EPolygonPattern}}),Object.defineProperty(exports,"ERectPattern",{enumerable:!0,get:function(){return tool.ERectPattern}}),Object.defineProperty(exports,"EScribblePattern",{enumerable:!0,get:function(){return tool.EScribblePattern}}),Object.defineProperty(exports,"ESelectedType",{enumerable:!0,get:function(){return tool.ESelectedType}}),Object.defineProperty(exports,"ETextType",{enumerable:!0,get:function(){return tool.ETextType}}),Object.defineProperty(exports,"EThumbnailOption",{enumerable:!0,get:function(){return tool.EThumbnailOption}}),Object.defineProperty(exports,"EToolName",{enumerable:!0,get:function(){return tool.EToolName}}),Object.defineProperty(exports,"EToolType",{enumerable:!0,get:function(){return tool.EToolType}}),Object.defineProperty(exports,"EVideoToolName",{enumerable:!0,get:function(){return tool.EVideoToolName}}),exports.OPERATION_LIST=tool.OPERATION_LIST,exports.SEGMENT_NUMBER=tool.SEGMENT_NUMBER,exports.TEXT_ATTRIBUTE_LINE_HEIGHT=tool.TEXT_ATTRIBUTE_LINE_HEIGHT,exports.TEXT_ATTRIBUTE_MAX_LENGTH=tool.TEXT_ATTRIBUTE_MAX_LENGTH,exports.TEXT_TYPE=tool.TEXT_TYPE,exports.TOOL_NAME=tool.TOOL_NAME,exports.TOOL_NAME_EN=tool.TOOL_NAME_EN,exports.cTool=tool,exports.edgeAdsorptionScope=tool.edgeAdsorptionScope,exports.editStepWidth=tool.editStepWidth,exports.TagUtils=TagUtils,exports.uuid=uuid,exports.MarkerUtils=MarkerUtils,exports.RectUtils=RectUtils,exports.AxisUtils=AxisUtils.default,exports.DrawUtils=DrawUtils,exports.ImgUtils=ImgUtils,exports.MathUtils=MathUtils.default,exports.AttributeUtils=AttributeUtils.default,exports.ActionsHistory=ActionsHistory,exports.DblClickEventListener=DblClickEventListener,exports.AnnotationEngine=index,exports.UnitUtils=UnitUtils,exports.StyleUtils=StyleUtils,exports.CanvasScheduler=CanvasScheduler.CanvasScheduler,exports.PointCloud=index$1.PointCloud,exports.createThreeMatrix4=matrix.createThreeMatrix4,exports.getCuboidFromPointCloudBox=matrix.getCuboidFromPointCloudBox,exports.lidar2image=matrix.lidar2image,exports.pointCloudLidar2image=matrix.pointCloudLidar2image,exports.rotatePoint=matrix.rotatePoint,exports.transferKitti2Matrix=matrix.transferKitti2Matrix,exports.PointCloudAnnotation=annotation$1.PointCloudAnnotation,exports.CommonToolUtils=CommonToolUtils,exports.toolUtils=toolUtils;
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var rectOperation = require('./core/toolOperation/rectOperation.js');
6
+ var tagOperation = require('./core/toolOperation/tagOperation.js');
7
+ var pointOperation = require('./core/toolOperation/pointOperation.js');
8
+ var LineToolOperation = require('./core/toolOperation/LineToolOperation.js');
9
+ var TextToolOperation = require('./core/toolOperation/TextToolOperation.js');
10
+ var polygonOperation = require('./core/toolOperation/polygonOperation.js');
11
+ var measureOperation = require('./core/toolOperation/measureOperation.js');
12
+ var basicToolOperation = require('./core/toolOperation/basicToolOperation.js');
13
+ var ViewOperation = require('./core/toolOperation/ViewOperation.js');
14
+ var ScribbleTool = require('./core/toolOperation/ScribbleTool.js');
15
+ var pointCloud2dOperation = require('./core/toolOperation/pointCloud2dOperation.js');
16
+ var annotation = require('./constant/annotation.js');
17
+ var annotationTask = require('./constant/annotationTask.js');
18
+ var keyCode = require('./constant/keyCode.js');
19
+ var style = require('./constant/style.js');
20
+ var tool = require('./constant/tool.js');
21
+ var TagUtils = require('./utils/tool/TagUtils.js');
22
+ var uuid = require('./utils/uuid.js');
23
+ var EnhanceCommonToolUtils = require('./utils/tool/EnhanceCommonToolUtils.js');
24
+ var MarkerUtils = require('./utils/tool/MarkerUtils.js');
25
+ var RectUtils = require('./utils/tool/RectUtils.js');
26
+ var AxisUtils = require('./utils/tool/AxisUtils.js');
27
+ var DrawUtils = require('./utils/tool/DrawUtils.js');
28
+ var ImgUtils = require('./utils/ImgUtils.js');
29
+ var MathUtils = require('./utils/MathUtils.js');
30
+ var AttributeUtils = require('./utils/tool/AttributeUtils.js');
31
+ var ActionsHistory = require('./utils/ActionsHistory.js');
32
+ var DblClickEventListener = require('./utils/tool/DblClickEventListener.js');
33
+ var index = require('./core/index.js');
34
+ var UnitUtils = require('./utils/tool/UnitUtils.js');
35
+ var StyleUtils = require('./utils/tool/StyleUtils.js');
36
+ var CanvasScheduler = require('./newCore/CanvasScheduler.js');
37
+ var index$1 = require('./core/pointCloud/index.js');
38
+ var matrix = require('./core/pointCloud/matrix.js');
39
+ var annotation$1 = require('./core/pointCloud/annotation.js');
40
+
41
+ function _interopNamespaceDefaultOnly (e) { return Object.freeze({ __proto__: null, 'default': e }); }
42
+
43
+ var keyCode__namespace = /*#__PURE__*/_interopNamespaceDefaultOnly(keyCode);
44
+
45
+ const CommonToolUtils = EnhanceCommonToolUtils["default"];
46
+ const toolUtils = EnhanceCommonToolUtils["default"];
47
+
48
+ exports.RectOperation = rectOperation.RectOperation;
49
+ exports.TagOperation = tagOperation;
50
+ exports.PointOperation = pointOperation;
51
+ exports.LineToolOperation = LineToolOperation["default"];
52
+ exports.TextToolOperation = TextToolOperation;
53
+ exports.PolygonOperation = polygonOperation;
54
+ exports.MeasureOperation = measureOperation;
55
+ exports.BasicToolOperation = basicToolOperation.BasicToolOperation;
56
+ exports.ViewOperation = ViewOperation;
57
+ exports.ScribbleTool = ScribbleTool;
58
+ exports.PointCloud2dOperation = pointCloud2dOperation;
59
+ exports.cAnnotation = annotation;
60
+ exports.cAnnotationTask = annotationTask;
61
+ exports.cKeyCode = keyCode__namespace;
62
+ exports.cStyle = style;
63
+ exports.CLIENT_TOOL_HEAD_TYPE = tool.CLIENT_TOOL_HEAD_TYPE;
64
+ exports.CLIENT_TOOL_NAME = tool.CLIENT_TOOL_NAME;
65
+ exports.DEFAULT_FONT = tool.DEFAULT_FONT;
66
+ exports.DEFAULT_TEXT_MAX_WIDTH = tool.DEFAULT_TEXT_MAX_WIDTH;
67
+ Object.defineProperty(exports, 'EAnnotationMode', {
68
+ enumerable: true,
69
+ get: function () { return tool.EAnnotationMode; }
70
+ });
71
+ Object.defineProperty(exports, 'EAuditStatus', {
72
+ enumerable: true,
73
+ get: function () { return tool.EAuditStatus; }
74
+ });
75
+ Object.defineProperty(exports, 'ECheckModel', {
76
+ enumerable: true,
77
+ get: function () { return tool.ECheckModel; }
78
+ });
79
+ Object.defineProperty(exports, 'EDependPattern', {
80
+ enumerable: true,
81
+ get: function () { return tool.EDependPattern; }
82
+ });
83
+ Object.defineProperty(exports, 'EDragTarget', {
84
+ enumerable: true,
85
+ get: function () { return tool.EDragTarget; }
86
+ });
87
+ Object.defineProperty(exports, 'EDrawPointPattern', {
88
+ enumerable: true,
89
+ get: function () { return tool.EDrawPointPattern; }
90
+ });
91
+ Object.defineProperty(exports, 'EFilterToolOperation', {
92
+ enumerable: true,
93
+ get: function () { return tool.EFilterToolOperation; }
94
+ });
95
+ Object.defineProperty(exports, 'ELineColor', {
96
+ enumerable: true,
97
+ get: function () { return tool.ELineColor; }
98
+ });
99
+ Object.defineProperty(exports, 'ELineTypes', {
100
+ enumerable: true,
101
+ get: function () { return tool.ELineTypes; }
102
+ });
103
+ Object.defineProperty(exports, 'EOperationMode', {
104
+ enumerable: true,
105
+ get: function () { return tool.EOperationMode; }
106
+ });
107
+ Object.defineProperty(exports, 'EPageOperator', {
108
+ enumerable: true,
109
+ get: function () { return tool.EPageOperator; }
110
+ });
111
+ Object.defineProperty(exports, 'EPointCloudName', {
112
+ enumerable: true,
113
+ get: function () { return tool.EPointCloudName; }
114
+ });
115
+ Object.defineProperty(exports, 'EPolygonPattern', {
116
+ enumerable: true,
117
+ get: function () { return tool.EPolygonPattern; }
118
+ });
119
+ Object.defineProperty(exports, 'ERectPattern', {
120
+ enumerable: true,
121
+ get: function () { return tool.ERectPattern; }
122
+ });
123
+ Object.defineProperty(exports, 'EScribblePattern', {
124
+ enumerable: true,
125
+ get: function () { return tool.EScribblePattern; }
126
+ });
127
+ Object.defineProperty(exports, 'ESelectedType', {
128
+ enumerable: true,
129
+ get: function () { return tool.ESelectedType; }
130
+ });
131
+ Object.defineProperty(exports, 'ETextType', {
132
+ enumerable: true,
133
+ get: function () { return tool.ETextType; }
134
+ });
135
+ Object.defineProperty(exports, 'EThumbnailOption', {
136
+ enumerable: true,
137
+ get: function () { return tool.EThumbnailOption; }
138
+ });
139
+ Object.defineProperty(exports, 'EToolName', {
140
+ enumerable: true,
141
+ get: function () { return tool.EToolName; }
142
+ });
143
+ Object.defineProperty(exports, 'EToolType', {
144
+ enumerable: true,
145
+ get: function () { return tool.EToolType; }
146
+ });
147
+ Object.defineProperty(exports, 'EVideoToolName', {
148
+ enumerable: true,
149
+ get: function () { return tool.EVideoToolName; }
150
+ });
151
+ exports.OPERATION_LIST = tool.OPERATION_LIST;
152
+ exports.SEGMENT_NUMBER = tool.SEGMENT_NUMBER;
153
+ exports.TEXT_ATTRIBUTE_LINE_HEIGHT = tool.TEXT_ATTRIBUTE_LINE_HEIGHT;
154
+ exports.TEXT_ATTRIBUTE_MAX_LENGTH = tool.TEXT_ATTRIBUTE_MAX_LENGTH;
155
+ exports.TEXT_TYPE = tool.TEXT_TYPE;
156
+ exports.TOOL_NAME = tool.TOOL_NAME;
157
+ exports.TOOL_NAME_EN = tool.TOOL_NAME_EN;
158
+ exports.cTool = tool;
159
+ exports.edgeAdsorptionScope = tool.edgeAdsorptionScope;
160
+ exports.editStepWidth = tool.editStepWidth;
161
+ exports.TagUtils = TagUtils;
162
+ exports.uuid = uuid;
163
+ exports.MarkerUtils = MarkerUtils;
164
+ exports.RectUtils = RectUtils;
165
+ exports.AxisUtils = AxisUtils["default"];
166
+ exports.DrawUtils = DrawUtils;
167
+ exports.ImgUtils = ImgUtils;
168
+ exports.MathUtils = MathUtils["default"];
169
+ exports.AttributeUtils = AttributeUtils["default"];
170
+ exports.ActionsHistory = ActionsHistory;
171
+ exports.DblClickEventListener = DblClickEventListener;
172
+ exports.AnnotationEngine = index;
173
+ exports.UnitUtils = UnitUtils;
174
+ exports.StyleUtils = StyleUtils;
175
+ exports.CanvasScheduler = CanvasScheduler.CanvasScheduler;
176
+ exports.PointCloud = index$1.PointCloud;
177
+ exports.createThreeMatrix4 = matrix.createThreeMatrix4;
178
+ exports.getCuboidFromPointCloudBox = matrix.getCuboidFromPointCloudBox;
179
+ exports.lidar2image = matrix.lidar2image;
180
+ exports.pointCloudLidar2image = matrix.pointCloudLidar2image;
181
+ exports.rotatePoint = matrix.rotatePoint;
182
+ exports.transferKitti2Matrix = matrix.transferKitti2Matrix;
183
+ exports.PointCloudAnnotation = annotation$1.PointCloudAnnotation;
184
+ exports.CommonToolUtils = CommonToolUtils;
185
+ exports.toolUtils = toolUtils;
@@ -1 +1,24 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EMessage=void 0,function(r){r.NoRotateNotice="noRotateNotice",r.RectErrorSizeNotice="rectErrorSizeNotice",r.TextCheckNumberErrorNotice="textCheckNumberErrorNotice",r.TextCheckEnglishErrorNotice="textCheckEnglishErrorNotice",r.TextCheckCustomErrorNotice="textCheckCustomErrorNotice",r.UpperLimitErrorNotice="UpperLimitErrorNotice",r.LowerLimitErrorNotice="LowerLimitErrorNotice",r.InvalidImage="InvalidImage",r.DisableDelete="DisableDelete",r.ClearPartialData="ClearPartialData",r.MarkerFinish="MarkerFinish",r.LowerLimitPoint="LowerLimitPoint",r.NoRotateInDependence="noRotateInDependence",r.UnableToReannotation="unableToReannotation",r.ForbiddenCreationOutsideBoundary="ForbiddenCreationOutsideBoundary",r.SuccessfulEdgeAdsorption="SuccessfulEdgeAdsorption",r.ForbidAddNewPoint="ForbidAddNewPoint"}(exports.EMessage||(exports.EMessage={}));
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ exports.EMessage = void 0;
6
+ (function(EMessage2) {
7
+ EMessage2["NoRotateNotice"] = "noRotateNotice";
8
+ EMessage2["RectErrorSizeNotice"] = "rectErrorSizeNotice";
9
+ EMessage2["TextCheckNumberErrorNotice"] = "textCheckNumberErrorNotice";
10
+ EMessage2["TextCheckEnglishErrorNotice"] = "textCheckEnglishErrorNotice";
11
+ EMessage2["TextCheckCustomErrorNotice"] = "textCheckCustomErrorNotice";
12
+ EMessage2["UpperLimitErrorNotice"] = "UpperLimitErrorNotice";
13
+ EMessage2["LowerLimitErrorNotice"] = "LowerLimitErrorNotice";
14
+ EMessage2["InvalidImage"] = "InvalidImage";
15
+ EMessage2["DisableDelete"] = "DisableDelete";
16
+ EMessage2["ClearPartialData"] = "ClearPartialData";
17
+ EMessage2["MarkerFinish"] = "MarkerFinish";
18
+ EMessage2["LowerLimitPoint"] = "LowerLimitPoint";
19
+ EMessage2["NoRotateInDependence"] = "noRotateInDependence";
20
+ EMessage2["UnableToReannotation"] = "unableToReannotation";
21
+ EMessage2["ForbiddenCreationOutsideBoundary"] = "ForbiddenCreationOutsideBoundary";
22
+ EMessage2["SuccessfulEdgeAdsorption"] = "SuccessfulEdgeAdsorption";
23
+ EMessage2["ForbidAddNewPoint"] = "ForbidAddNewPoint";
24
+ })(exports.EMessage || (exports.EMessage = {}));
@@ -1 +1,25 @@
1
- "use strict";var constants=require("../constants.js");const message={[constants.EMessage.NoRotateNotice]:"This Image contains data and cannot be rotated",[constants.EMessage.RectErrorSizeNotice]:"The drawing frame size is smaller than the minimum drawing size",[constants.EMessage.TextCheckNumberErrorNotice]:"Please enter in number-only format",[constants.EMessage.TextCheckEnglishErrorNotice]:"Please enter in English only format",[constants.EMessage.TextCheckCustomErrorNotice]:"Please enter in the required format",[constants.EMessage.UpperLimitErrorNotice]:"The number of vertices is not more than",[constants.EMessage.LowerLimitErrorNotice]:"The number of vertices is not less than",[constants.EMessage.InvalidImage]:"Invalid image, please skip this image",[constants.EMessage.DisableDelete]:"Disable delete",[constants.EMessage.ClearPartialData]:"Clear partial data",[constants.EMessage.MarkerFinish]:"ListAnnotation is finished",[constants.EMessage.LowerLimitPoint]:"The maximum number of points has been reached",[constants.EMessage.NoRotateInDependence]:"Disallow rotation in dependent cases",[constants.EMessage.UnableToReannotation]:"Unabled to reannotation",[constants.EMessage.ForbiddenCreationOutsideBoundary]:"Fobid creation outside boundary",[constants.EMessage.SuccessfulEdgeAdsorption]:"Successful edge adsorption",[constants.EMessage.ForbidAddNewPoint]:"Forbid to add new point in rect-polygon"};module.exports=message;
1
+ 'use strict';
2
+
3
+ var constants = require('../constants.js');
4
+
5
+ const message = {
6
+ [constants.EMessage.NoRotateNotice]: "This Image contains data and cannot be rotated",
7
+ [constants.EMessage.RectErrorSizeNotice]: "The drawing frame size is smaller than the minimum drawing size",
8
+ [constants.EMessage.TextCheckNumberErrorNotice]: "Please enter in number-only format",
9
+ [constants.EMessage.TextCheckEnglishErrorNotice]: "Please enter in English only format",
10
+ [constants.EMessage.TextCheckCustomErrorNotice]: "Please enter in the required format",
11
+ [constants.EMessage.UpperLimitErrorNotice]: "The number of vertices is not more than",
12
+ [constants.EMessage.LowerLimitErrorNotice]: "The number of vertices is not less than",
13
+ [constants.EMessage.InvalidImage]: "Invalid image, please skip this image",
14
+ [constants.EMessage.DisableDelete]: "Disable delete",
15
+ [constants.EMessage.ClearPartialData]: "Clear partial data",
16
+ [constants.EMessage.MarkerFinish]: "ListAnnotation is finished",
17
+ [constants.EMessage.LowerLimitPoint]: "The maximum number of points has been reached",
18
+ [constants.EMessage.NoRotateInDependence]: "Disallow rotation in dependent cases",
19
+ [constants.EMessage.UnableToReannotation]: "Unabled to reannotation",
20
+ [constants.EMessage.ForbiddenCreationOutsideBoundary]: "Fobid creation outside boundary",
21
+ [constants.EMessage.SuccessfulEdgeAdsorption]: "Successful edge adsorption",
22
+ [constants.EMessage.ForbidAddNewPoint]: "Forbid to add new point in rect-polygon"
23
+ };
24
+
25
+ module.exports = message;
@@ -1 +1,19 @@
1
- "use strict";var annotation=require("../constant/annotation.js"),message$1=require("./en_US/message.js"),message=require("./zh_CN/message.js");class Locale{}Locale.getMessagesByLocale=(e,s)=>{switch(s){case annotation.ELang.US:return message$1[e];case annotation.ELang.Zh:default:return message[e]}},module.exports=Locale;
1
+ 'use strict';
2
+
3
+ var annotation = require('../constant/annotation.js');
4
+ var message$1 = require('./en_US/message.js');
5
+ var message = require('./zh_CN/message.js');
6
+
7
+ class Locale {
8
+ }
9
+ Locale.getMessagesByLocale = (key, locale) => {
10
+ switch (locale) {
11
+ case annotation.ELang.US:
12
+ return message$1[key];
13
+ case annotation.ELang.Zh:
14
+ default:
15
+ return message[key];
16
+ }
17
+ };
18
+
19
+ module.exports = Locale;
@@ -1 +1,25 @@
1
- "use strict";var constants=require("../constants.js");const message={[constants.EMessage.NoRotateNotice]:"\u672C\u56FE\u542B\u6709\u6570\u636E\uFF0C\u65E0\u6CD5\u8FDB\u884C\u65CB\u8F6C",[constants.EMessage.RectErrorSizeNotice]:"\u7ED8\u5236\u6846\u5C3A\u5BF8\u5C0F\u4E8E\u6700\u5C0F\u7ED8\u5236\u5C3A\u5BF8",[constants.EMessage.TextCheckNumberErrorNotice]:"\u8BF7\u6309\u4EC5\u6570\u5B57\u7684\u683C\u5F0F\u8F93\u5165",[constants.EMessage.TextCheckEnglishErrorNotice]:"\u8BF7\u6309\u4EC5\u82F1\u6587\u7684\u683C\u5F0F\u8F93\u5165",[constants.EMessage.TextCheckCustomErrorNotice]:"\u8BF7\u6309\u8981\u6C42\u7684\u683C\u5F0F\u8F93\u5165",[constants.EMessage.UpperLimitErrorNotice]:"\u9876\u70B9\u6570\u4E0D\u591A\u4E8E",[constants.EMessage.LowerLimitErrorNotice]:"\u9876\u70B9\u6570\u4E0D\u5C11\u4E8E",[constants.EMessage.InvalidImage]:"\u65E0\u6548\u56FE\u7247\uFF0C\u8BF7\u8DF3\u8FC7\u6B64\u56FE",[constants.EMessage.DisableDelete]:"\u8BE5\u6570\u636E\u7981\u6B62\u5220\u9664",[constants.EMessage.ClearPartialData]:"\u5B58\u5728\u90E8\u5206\u6570\u636E\u65E0\u6CD5\u6E05\u9664",[constants.EMessage.MarkerFinish]:"\u5217\u8868\u6807\u6CE8\u5DF2\u5B8C\u6210",[constants.EMessage.LowerLimitPoint]:"\u5DF2\u5230\u8FBE\u6807\u70B9\u6570\u91CF\u4E0A\u9650",[constants.EMessage.NoRotateInDependence]:"\u4F9D\u8D56\u60C5\u51B5\u4E0B\u65E0\u6CD5\u8FDB\u884C\u65CB\u8F6C",[constants.EMessage.UnableToReannotation]:"\u65E0\u6CD5\u8FDB\u884C\u7EED\u6807\u64CD\u4F5C",[constants.EMessage.ForbiddenCreationOutsideBoundary]:"\u8FB9\u754C\u5916\u7981\u6B62\u521B\u5EFA",[constants.EMessage.SuccessfulEdgeAdsorption]:"\u8FB9\u7F18\u5438\u9644\u6210\u529F",[constants.EMessage.ForbidAddNewPoint]:"\u6846\u4F53\u65E0\u6CD5\u6DFB\u52A0\u70B9"};module.exports=message;
1
+ 'use strict';
2
+
3
+ var constants = require('../constants.js');
4
+
5
+ const message = {
6
+ [constants.EMessage.NoRotateNotice]: "\u672C\u56FE\u542B\u6709\u6570\u636E\uFF0C\u65E0\u6CD5\u8FDB\u884C\u65CB\u8F6C",
7
+ [constants.EMessage.RectErrorSizeNotice]: "\u7ED8\u5236\u6846\u5C3A\u5BF8\u5C0F\u4E8E\u6700\u5C0F\u7ED8\u5236\u5C3A\u5BF8",
8
+ [constants.EMessage.TextCheckNumberErrorNotice]: "\u8BF7\u6309\u4EC5\u6570\u5B57\u7684\u683C\u5F0F\u8F93\u5165",
9
+ [constants.EMessage.TextCheckEnglishErrorNotice]: "\u8BF7\u6309\u4EC5\u82F1\u6587\u7684\u683C\u5F0F\u8F93\u5165",
10
+ [constants.EMessage.TextCheckCustomErrorNotice]: "\u8BF7\u6309\u8981\u6C42\u7684\u683C\u5F0F\u8F93\u5165",
11
+ [constants.EMessage.UpperLimitErrorNotice]: "\u9876\u70B9\u6570\u4E0D\u591A\u4E8E",
12
+ [constants.EMessage.LowerLimitErrorNotice]: "\u9876\u70B9\u6570\u4E0D\u5C11\u4E8E",
13
+ [constants.EMessage.InvalidImage]: "\u65E0\u6548\u56FE\u7247\uFF0C\u8BF7\u8DF3\u8FC7\u6B64\u56FE",
14
+ [constants.EMessage.DisableDelete]: "\u8BE5\u6570\u636E\u7981\u6B62\u5220\u9664",
15
+ [constants.EMessage.ClearPartialData]: "\u5B58\u5728\u90E8\u5206\u6570\u636E\u65E0\u6CD5\u6E05\u9664",
16
+ [constants.EMessage.MarkerFinish]: "\u5217\u8868\u6807\u6CE8\u5DF2\u5B8C\u6210",
17
+ [constants.EMessage.LowerLimitPoint]: "\u5DF2\u5230\u8FBE\u6807\u70B9\u6570\u91CF\u4E0A\u9650",
18
+ [constants.EMessage.NoRotateInDependence]: "\u4F9D\u8D56\u60C5\u51B5\u4E0B\u65E0\u6CD5\u8FDB\u884C\u65CB\u8F6C",
19
+ [constants.EMessage.UnableToReannotation]: "\u65E0\u6CD5\u8FDB\u884C\u7EED\u6807\u64CD\u4F5C",
20
+ [constants.EMessage.ForbiddenCreationOutsideBoundary]: "\u8FB9\u754C\u5916\u7981\u6B62\u521B\u5EFA",
21
+ [constants.EMessage.SuccessfulEdgeAdsorption]: "\u8FB9\u7F18\u5438\u9644\u6210\u529F",
22
+ [constants.EMessage.ForbidAddNewPoint]: "\u6846\u4F53\u65E0\u6CD5\u6DFB\u52A0\u70B9"
23
+ };
24
+
25
+ module.exports = message;
@@ -1 +1,35 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});class CanvasScheduler{constructor(e){this.container=e.container}createCanvas(e,t){if(typeof e!="string")return this.container.appendChild(e),e.style.position="absolute",e.style.left="0",e.style.top="0",e;const n=document.createElement("canvas");return n.id=e,t&&t.size&&(n.width=t.size.width,n.height=t.size.height),this.container.appendChild(n),n}destroyCanvas(e){const t=document.getElementById(e);return t&&this.container.removeChild(t),t}}exports.CanvasScheduler=CanvasScheduler;
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ class CanvasScheduler {
6
+ constructor(props) {
7
+ this.container = props.container;
8
+ }
9
+ createCanvas(id, options) {
10
+ if (typeof id !== "string") {
11
+ this.container.appendChild(id);
12
+ id.style.position = "absolute";
13
+ id.style.left = "0";
14
+ id.style.top = "0";
15
+ return id;
16
+ }
17
+ const canvas = document.createElement("canvas");
18
+ canvas.id = id;
19
+ if (options && options.size) {
20
+ canvas.width = options.size.width;
21
+ canvas.height = options.size.height;
22
+ }
23
+ this.container.appendChild(canvas);
24
+ return canvas;
25
+ }
26
+ destroyCanvas(id) {
27
+ const dom = document.getElementById(id);
28
+ if (dom) {
29
+ this.container.removeChild(dom);
30
+ }
31
+ return dom;
32
+ }
33
+ }
34
+
35
+ exports.CanvasScheduler = CanvasScheduler;
@@ -3,7 +3,7 @@
3
3
  * @createDate 2022-07-18
4
4
  * @author Ron <ron.f.luo@gmail.com>
5
5
  */
6
- import { IPointCloudBox, IPointCloudSphere, IPointCloudConfig } from '@labelbee/lb-utils';
6
+ import { IPointCloudBox, IPointCloudSphere, IPointCloudConfig, ILine } from '@labelbee/lb-utils';
7
7
  import { EToolName, THybridToolName } from '@/constant/tool';
8
8
  import { CanvasScheduler } from '@/newCore';
9
9
  import { IPolygonData } from '@/types/tool/polygon';
@@ -51,6 +51,8 @@ export declare class PointCloudAnnotation implements IPointCloudAnnotationOperat
51
51
  */
52
52
  initSize(size: ISize): void;
53
53
  addPolygonListOnTopView(result: string): void;
54
+ updateLineList: (lineList: ILine[]) => void;
55
+ addLineListOnTopView(result: string): void;
54
56
  addPointListOnTopView(result: string): void;
55
57
  updatePolygonList: (pointCloudDataList: IPointCloudBox[], extraList?: IPolygonData[]) => void;
56
58
  updatePointList: (sphereList: IPointCloudSphere[]) => void;
File without changes
@@ -4,6 +4,7 @@
4
4
  * @date 2022-06-02
5
5
  */
6
6
  import { BasicToolOperation, IBasicToolOperationProps } from './basicToolOperation';
7
+ import TextAttributeClass from './textAttributeClass';
7
8
  declare enum EStatus {
8
9
  Create = 0,
9
10
  /** 正在激活 */
@@ -32,6 +33,7 @@ declare class LineToolOperation extends BasicToolOperation {
32
33
  * @param e 鼠标事件
33
34
  */
34
35
  drawActivatedLine: (coord?: ICoordinate, e?: MouseEvent, hideTempAxis?: boolean) => void;
36
+ _textAttributInstance?: TextAttributeClass;
35
37
  /** 线条是否被选中 */
36
38
  get isLineSelected(): "" | ILinePoint[] | undefined;
37
39
  /** 选中点线条的点 */
@@ -42,6 +44,8 @@ declare class LineToolOperation extends BasicToolOperation {
42
44
  */
43
45
  drawHoverPoint: (coord: ICoordinate) => void;
44
46
  selectedID?: string;
47
+ updatedLine: ILine;
48
+ toolName: string;
45
49
  private lineList;
46
50
  private activeLine?;
47
51
  private status;
@@ -62,6 +66,7 @@ declare class LineToolOperation extends BasicToolOperation {
62
66
  private textEditingID?;
63
67
  private isLineValid;
64
68
  private lineDragging;
69
+ private selectedIDs;
65
70
  constructor(props: ILineOperationProps);
66
71
  /** 创建状态 */
67
72
  get isCreate(): boolean;
@@ -146,6 +151,12 @@ declare class LineToolOperation extends BasicToolOperation {
146
151
  * 对存在绘制对象,绘制热区
147
152
  */
148
153
  renderActiveArea(): void;
154
+ /**
155
+ * Update selectedIDs and rerender
156
+ * @param selectedIDs
157
+ */
158
+ setSelectedIDs(selectedIDs: string[]): void;
159
+ setSelectedID(newID?: string): void;
149
160
  /**
150
161
  * 添加点
151
162
  * @param coord 坐标
@@ -189,8 +189,6 @@ export default class DrawUtils {
189
189
  }, dataConfig: {
190
190
  config: ICuboidConfig;
191
191
  hiddenText?: boolean;
192
- currentPos: ICoordinate;
193
- zoom: number;
194
192
  selectedID?: string;
195
193
  headerText?: string;
196
194
  bottomText?: string;
@@ -1 +1,84 @@
1
- "use strict";var _=require("lodash");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var ___default=_interopDefaultLegacy(_);class ActionsHistory{constructor(e){this.record=[],this.recordIndex=-1,this.minRecordIndex=-1,this.emitHistoryChanged=()=>{this.historyChanged&&(this.constructor.name==="ActionsHistory"?!0:this.record.length>0)&&this.historyChanged(this.undoEnabled,this.redoEnabled)},this.historyChanged=e}get undoEnabled(){return this.recordIndex>this.minRecordIndex}get redoEnabled(){return this.recordIndex<this.record.length-1}pushHistory(e){if(this.recordIndex!==this.record.length-1){const r=this.record.slice(0,Math.min(this.recordIndex+1,this.record.length));this.record=r}this.record.push(___default.default.cloneDeepWith(e)),this.recordIndex+=1,this.emitHistoryChanged()}updateHistory(e){this.record[this.recordIndex]=___default.default.cloneDeep(e)}applyAttribute(e,r,i){e&&this.record.forEach(s=>{const d=s.find(o=>o.id===e);d&&(d[r]=i)})}undo(){if(this.undoEnabled)return this.recordIndex-=1,this.emitHistoryChanged(),___default.default.cloneDeep(this.record[this.recordIndex])||[]}redo(){if(this.redoEnabled)return this.recordIndex+=1,this.emitHistoryChanged(),___default.default.cloneDeep(this.record[this.recordIndex])}init(){this.record=[[]],this.recordIndex=0,this.emitHistoryChanged()}empty(){this.record=[],this.recordIndex=-1,this.emitHistoryChanged()}initRecord(e,r=!1){const i=e.length>0||r;this.record=i?[___default.default.cloneDeep(e)]:[],this.minRecordIndex=i?0:-1,this.recordIndex=0}}module.exports=ActionsHistory;
1
+ 'use strict';
2
+
3
+ var _ = require('lodash');
4
+
5
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
6
+
7
+ var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
8
+
9
+ class ActionsHistory {
10
+ constructor(historyChanged) {
11
+ this.record = [];
12
+ this.recordIndex = -1;
13
+ this.minRecordIndex = -1;
14
+ this.emitHistoryChanged = () => {
15
+ if (this.historyChanged) {
16
+ const isEmit = this.constructor.name === "ActionsHistory" ? true : this.record.length > 0;
17
+ if (isEmit) {
18
+ this.historyChanged(this.undoEnabled, this.redoEnabled);
19
+ }
20
+ }
21
+ };
22
+ this.historyChanged = historyChanged;
23
+ }
24
+ get undoEnabled() {
25
+ return this.recordIndex > this.minRecordIndex;
26
+ }
27
+ get redoEnabled() {
28
+ return this.recordIndex < this.record.length - 1;
29
+ }
30
+ pushHistory(action) {
31
+ if (this.recordIndex !== this.record.length - 1) {
32
+ const newRecord = this.record.slice(0, Math.min(this.recordIndex + 1, this.record.length));
33
+ this.record = newRecord;
34
+ }
35
+ this.record.push(___default["default"].cloneDeepWith(action));
36
+ this.recordIndex += 1;
37
+ this.emitHistoryChanged();
38
+ }
39
+ updateHistory(newRecord) {
40
+ this.record[this.recordIndex] = ___default["default"].cloneDeep(newRecord);
41
+ }
42
+ applyAttribute(id, key, value) {
43
+ if (id) {
44
+ this.record.forEach((lines) => {
45
+ const line = lines.find((i) => i.id === id);
46
+ if (line) {
47
+ line[key] = value;
48
+ }
49
+ });
50
+ }
51
+ }
52
+ undo() {
53
+ if (this.undoEnabled) {
54
+ this.recordIndex -= 1;
55
+ this.emitHistoryChanged();
56
+ return ___default["default"].cloneDeep(this.record[this.recordIndex]) || [];
57
+ }
58
+ }
59
+ redo() {
60
+ if (this.redoEnabled) {
61
+ this.recordIndex += 1;
62
+ this.emitHistoryChanged();
63
+ return ___default["default"].cloneDeep(this.record[this.recordIndex]);
64
+ }
65
+ }
66
+ init() {
67
+ this.record = [[]];
68
+ this.recordIndex = 0;
69
+ this.emitHistoryChanged();
70
+ }
71
+ empty() {
72
+ this.record = [];
73
+ this.recordIndex = -1;
74
+ this.emitHistoryChanged();
75
+ }
76
+ initRecord(data, isExitData = false) {
77
+ const existData = data.length > 0 || isExitData;
78
+ this.record = existData ? [___default["default"].cloneDeep(data)] : [];
79
+ this.minRecordIndex = existData ? 0 : -1;
80
+ this.recordIndex = 0;
81
+ }
82
+ }
83
+
84
+ module.exports = ActionsHistory;
@@ -1 +1,23 @@
1
- "use strict";class ImgUtils{static load(s){return new Promise((o,r)=>{const e=new Image;e.crossOrigin="anonymous",s.startsWith("file")?e.src=encodeURI(s):e.src=s,e.onload=()=>{o(e)},e.onerror=()=>{r(e)}})}}module.exports=ImgUtils;
1
+ 'use strict';
2
+
3
+ class ImgUtils {
4
+ static load(src) {
5
+ return new Promise((resolve, reject) => {
6
+ const imgNode = new Image();
7
+ imgNode.crossOrigin = "anonymous";
8
+ if (src.startsWith("file")) {
9
+ imgNode.src = encodeURI(src);
10
+ } else {
11
+ imgNode.src = src;
12
+ }
13
+ imgNode.onload = () => {
14
+ resolve(imgNode);
15
+ };
16
+ imgNode.onerror = () => {
17
+ reject(imgNode);
18
+ };
19
+ });
20
+ }
21
+ }
22
+
23
+ module.exports = ImgUtils;