@mlightcad/cad-simple-viewer 1.5.10 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -8
- package/dist/cad-simple-viewer.js +35023 -70495
- package/dist/cad-simple-viewer.umd.cjs +143 -420
- package/lib/app/AcApDocManager.d.ts +50 -39
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +146 -72
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcApSettingManager.d.ts +24 -10
- package/lib/app/AcApSettingManager.d.ts.map +1 -1
- package/lib/app/AcApSettingManager.js +49 -10
- package/lib/app/AcApSettingManager.js.map +1 -1
- package/lib/app/AcApWebworkerReadiness.d.ts +7 -2
- package/lib/app/AcApWebworkerReadiness.d.ts.map +1 -1
- package/lib/app/AcApWebworkerReadiness.js +13 -8
- package/lib/app/AcApWebworkerReadiness.js.map +1 -1
- package/lib/app/AcApWorkerAssets.d.ts +14 -1
- package/lib/app/AcApWorkerAssets.d.ts.map +1 -1
- package/lib/app/AcApWorkerAssets.js +14 -1
- package/lib/app/AcApWorkerAssets.js.map +1 -1
- package/lib/app/index.d.ts +0 -1
- package/lib/app/index.d.ts.map +1 -1
- package/lib/app/index.js +0 -1
- package/lib/app/index.js.map +1 -1
- package/lib/command/AcApRedoCmd.d.ts +1 -1
- package/lib/command/AcApRedoCmd.d.ts.map +1 -1
- package/lib/command/AcApRedoCmd.js +9 -4
- package/lib/command/AcApRedoCmd.js.map +1 -1
- package/lib/command/AcApUndoCmd.d.ts +1 -1
- package/lib/command/AcApUndoCmd.d.ts.map +1 -1
- package/lib/command/AcApUndoCmd.js +9 -4
- package/lib/command/AcApUndoCmd.js.map +1 -1
- package/lib/command/convert/AcApConvertToPngCmd.d.ts.map +1 -1
- package/lib/command/convert/AcApConvertToPngCmd.js +5 -1
- package/lib/command/convert/AcApConvertToPngCmd.js.map +1 -1
- package/lib/command/convert/AcApPngConvertor.d.ts +4 -1
- package/lib/command/convert/AcApPngConvertor.d.ts.map +1 -1
- package/lib/command/convert/AcApPngConvertor.js +131 -78
- package/lib/command/convert/AcApPngConvertor.js.map +1 -1
- package/lib/command/draw/AcApRevCloudCmd.d.ts +48 -0
- package/lib/command/draw/AcApRevCloudCmd.d.ts.map +1 -0
- package/lib/command/draw/AcApRevCloudCmd.js +747 -0
- package/lib/command/draw/AcApRevCloudCmd.js.map +1 -0
- package/lib/command/draw/AcApRevCloudGeom.d.ts +57 -0
- package/lib/command/draw/AcApRevCloudGeom.d.ts.map +1 -0
- package/lib/command/draw/AcApRevCloudGeom.js +373 -0
- package/lib/command/draw/AcApRevCloudGeom.js.map +1 -0
- package/lib/command/draw/AcApSketchCmd.d.ts +59 -0
- package/lib/command/draw/AcApSketchCmd.d.ts.map +1 -0
- package/lib/command/draw/AcApSketchCmd.js +537 -0
- package/lib/command/draw/AcApSketchCmd.js.map +1 -0
- package/lib/command/draw/index.d.ts +3 -0
- package/lib/command/draw/index.d.ts.map +1 -1
- package/lib/command/draw/index.js +3 -0
- package/lib/command/draw/index.js.map +1 -1
- package/lib/command/index.d.ts +2 -1
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +2 -1
- package/lib/command/index.js.map +1 -1
- package/lib/command/markup/AcApClearMarkupsCmd.d.ts +10 -0
- package/lib/command/markup/AcApClearMarkupsCmd.d.ts.map +1 -0
- package/lib/command/{review/AcApRevCircleCmd.js → markup/AcApClearMarkupsCmd.js} +19 -49
- package/lib/command/markup/AcApClearMarkupsCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupArrowCmd.d.ts +10 -0
- package/lib/command/markup/AcApMarkupArrowCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupArrowCmd.js +164 -0
- package/lib/command/markup/AcApMarkupArrowCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupCalloutCmd.d.ts +17 -0
- package/lib/command/markup/AcApMarkupCalloutCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupCalloutCmd.js +259 -0
- package/lib/command/markup/AcApMarkupCalloutCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupCalloutDrag.d.ts +78 -0
- package/lib/command/markup/AcApMarkupCalloutDrag.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupCalloutDrag.js +78 -0
- package/lib/command/markup/AcApMarkupCalloutDrag.js.map +1 -0
- package/lib/command/markup/AcApMarkupCircleCmd.d.ts +10 -0
- package/lib/command/markup/AcApMarkupCircleCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupCircleCmd.js +174 -0
- package/lib/command/markup/AcApMarkupCircleCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupCloudCmd.d.ts +11 -0
- package/lib/command/markup/AcApMarkupCloudCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupCloudCmd.js +178 -0
- package/lib/command/markup/AcApMarkupCloudCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupCmdUtil.d.ts +43 -0
- package/lib/command/markup/AcApMarkupCmdUtil.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupCmdUtil.js +133 -0
- package/lib/command/markup/AcApMarkupCmdUtil.js.map +1 -0
- package/lib/command/markup/AcApMarkupGeometry.d.ts +57 -0
- package/lib/command/markup/AcApMarkupGeometry.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupGeometry.js +231 -0
- package/lib/command/markup/AcApMarkupGeometry.js.map +1 -0
- package/lib/command/markup/AcApMarkupHighlightCmd.d.ts +10 -0
- package/lib/command/markup/AcApMarkupHighlightCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupHighlightCmd.js +166 -0
- package/lib/command/markup/AcApMarkupHighlightCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupHistory.d.ts +139 -0
- package/lib/command/markup/AcApMarkupHistory.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupHistory.js +336 -0
- package/lib/command/markup/AcApMarkupHistory.js.map +1 -0
- package/lib/command/markup/AcApMarkupImportExportCmd.d.ts +17 -0
- package/lib/command/markup/AcApMarkupImportExportCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupImportExportCmd.js +182 -0
- package/lib/command/markup/AcApMarkupImportExportCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupLineCmd.d.ts +10 -0
- package/lib/command/markup/AcApMarkupLineCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupLineCmd.js +185 -0
- package/lib/command/markup/AcApMarkupLineCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupPresenter.d.ts +62 -0
- package/lib/command/markup/AcApMarkupPresenter.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupPresenter.js +288 -0
- package/lib/command/markup/AcApMarkupPresenter.js.map +1 -0
- package/lib/command/markup/AcApMarkupRectCmd.d.ts +10 -0
- package/lib/command/markup/AcApMarkupRectCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupRectCmd.js +174 -0
- package/lib/command/markup/AcApMarkupRectCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupRepublish.d.ts +29 -0
- package/lib/command/markup/AcApMarkupRepublish.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupRepublish.js +28 -0
- package/lib/command/markup/AcApMarkupRepublish.js.map +1 -0
- package/lib/command/markup/AcApMarkupShapeBuilder.d.ts +88 -0
- package/lib/command/markup/AcApMarkupShapeBuilder.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupShapeBuilder.js +246 -0
- package/lib/command/markup/AcApMarkupShapeBuilder.js.map +1 -0
- package/lib/command/markup/AcApMarkupShapeCallout.d.ts +46 -0
- package/lib/command/markup/AcApMarkupShapeCallout.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupShapeCallout.js +356 -0
- package/lib/command/markup/AcApMarkupShapeCallout.js.map +1 -0
- package/lib/command/markup/AcApMarkupSidecar.d.ts +14 -0
- package/lib/command/markup/AcApMarkupSidecar.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupSidecar.js +196 -0
- package/lib/command/markup/AcApMarkupSidecar.js.map +1 -0
- package/lib/command/markup/AcApMarkupStampCmd.d.ts +10 -0
- package/lib/command/markup/AcApMarkupStampCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupStampCmd.js +158 -0
- package/lib/command/markup/AcApMarkupStampCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupStore.d.ts +94 -0
- package/lib/command/markup/AcApMarkupStore.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupStore.js +327 -0
- package/lib/command/markup/AcApMarkupStore.js.map +1 -0
- package/lib/command/markup/AcApMarkupTextCmd.d.ts +10 -0
- package/lib/command/markup/AcApMarkupTextCmd.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupTextCmd.js +141 -0
- package/lib/command/markup/AcApMarkupTextCmd.js.map +1 -0
- package/lib/command/markup/AcApMarkupTextEdit.d.ts +88 -0
- package/lib/command/markup/AcApMarkupTextEdit.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupTextEdit.js +249 -0
- package/lib/command/markup/AcApMarkupTextEdit.js.map +1 -0
- package/lib/command/markup/AcApMarkupTypes.d.ts +118 -0
- package/lib/command/markup/AcApMarkupTypes.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupTypes.js +8 -0
- package/lib/command/markup/AcApMarkupTypes.js.map +1 -0
- package/lib/command/markup/AcApMarkupUtil.d.ts +41 -0
- package/lib/command/markup/AcApMarkupUtil.d.ts.map +1 -0
- package/lib/command/markup/AcApMarkupUtil.js +135 -0
- package/lib/command/markup/AcApMarkupUtil.js.map +1 -0
- package/lib/command/markup/AcApMarkupVisibilityCmd.d.ts +17 -0
- package/lib/command/markup/AcApMarkupVisibilityCmd.d.ts.map +1 -0
- package/lib/command/{review/AcApRevVisibilityCmd.js → markup/AcApMarkupVisibilityCmd.js} +30 -27
- package/lib/command/markup/AcApMarkupVisibilityCmd.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupCalloutEntity.d.ts +48 -0
- package/lib/command/markup/entity/AcApMarkupCalloutEntity.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupCalloutEntity.js +291 -0
- package/lib/command/markup/entity/AcApMarkupCalloutEntity.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupEntity.d.ts +131 -0
- package/lib/command/markup/entity/AcApMarkupEntity.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupEntity.js +191 -0
- package/lib/command/markup/entity/AcApMarkupEntity.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupEntityFactory.d.ts +20 -0
- package/lib/command/markup/entity/AcApMarkupEntityFactory.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupEntityFactory.js +43 -0
- package/lib/command/markup/entity/AcApMarkupEntityFactory.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupEntityGrips.d.ts +94 -0
- package/lib/command/markup/entity/AcApMarkupEntityGrips.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupEntityGrips.js +204 -0
- package/lib/command/markup/entity/AcApMarkupEntityGrips.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupHighlightEntity.d.ts +27 -0
- package/lib/command/markup/entity/AcApMarkupHighlightEntity.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupHighlightEntity.js +124 -0
- package/lib/command/markup/entity/AcApMarkupHighlightEntity.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupSegmentEntity.d.ts +40 -0
- package/lib/command/markup/entity/AcApMarkupSegmentEntity.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupSegmentEntity.js +294 -0
- package/lib/command/markup/entity/AcApMarkupSegmentEntity.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupShapeEntity.d.ts +32 -0
- package/lib/command/markup/entity/AcApMarkupShapeEntity.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupShapeEntity.js +241 -0
- package/lib/command/markup/entity/AcApMarkupShapeEntity.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupStampEntity.d.ts +23 -0
- package/lib/command/markup/entity/AcApMarkupStampEntity.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupStampEntity.js +125 -0
- package/lib/command/markup/entity/AcApMarkupStampEntity.js.map +1 -0
- package/lib/command/markup/entity/AcApMarkupTextEntity.d.ts +23 -0
- package/lib/command/markup/entity/AcApMarkupTextEntity.d.ts.map +1 -0
- package/lib/command/markup/entity/AcApMarkupTextEntity.js +129 -0
- package/lib/command/markup/entity/AcApMarkupTextEntity.js.map +1 -0
- package/lib/command/markup/entity/index.d.ts +13 -0
- package/lib/command/markup/entity/index.d.ts.map +1 -0
- package/lib/command/markup/entity/index.js +13 -0
- package/lib/command/markup/entity/index.js.map +1 -0
- package/lib/command/markup/index.d.ts +27 -0
- package/lib/command/markup/index.d.ts.map +1 -0
- package/lib/command/markup/index.js +27 -0
- package/lib/command/markup/index.js.map +1 -0
- package/lib/command/measure/AcApClearMeasurementsCmd.d.ts +5 -12
- package/lib/command/measure/AcApClearMeasurementsCmd.d.ts.map +1 -1
- package/lib/command/measure/AcApClearMeasurementsCmd.js +42 -20
- package/lib/command/measure/AcApClearMeasurementsCmd.js.map +1 -1
- package/lib/command/measure/AcApMeasureAngleCmd.d.ts +13 -3
- package/lib/command/measure/AcApMeasureAngleCmd.d.ts.map +1 -1
- package/lib/command/measure/AcApMeasureAngleCmd.js +76 -210
- package/lib/command/measure/AcApMeasureAngleCmd.js.map +1 -1
- package/lib/command/measure/AcApMeasureArcCmd.d.ts +21 -1
- package/lib/command/measure/AcApMeasureArcCmd.d.ts.map +1 -1
- package/lib/command/measure/AcApMeasureArcCmd.js +103 -97
- package/lib/command/measure/AcApMeasureArcCmd.js.map +1 -1
- package/lib/command/measure/AcApMeasureAreaCmd.d.ts +11 -1
- package/lib/command/measure/AcApMeasureAreaCmd.d.ts.map +1 -1
- package/lib/command/measure/AcApMeasureAreaCmd.js +126 -144
- package/lib/command/measure/AcApMeasureAreaCmd.js.map +1 -1
- package/lib/command/measure/AcApMeasureDistanceCmd.d.ts +24 -15
- package/lib/command/measure/AcApMeasureDistanceCmd.d.ts.map +1 -1
- package/lib/command/measure/AcApMeasureDistanceCmd.js +52 -52
- package/lib/command/measure/AcApMeasureDistanceCmd.js.map +1 -1
- package/lib/command/measure/AcApMeasurePointCmd.d.ts +24 -0
- package/lib/command/measure/AcApMeasurePointCmd.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurePointCmd.js +114 -0
- package/lib/command/measure/AcApMeasurePointCmd.js.map +1 -0
- package/lib/command/measure/AcApMeasurementGeometry.d.ts +22 -0
- package/lib/command/measure/AcApMeasurementGeometry.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementGeometry.js +127 -0
- package/lib/command/measure/AcApMeasurementGeometry.js.map +1 -0
- package/lib/command/measure/AcApMeasurementHistory.d.ts +78 -0
- package/lib/command/measure/AcApMeasurementHistory.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementHistory.js +387 -0
- package/lib/command/measure/AcApMeasurementHistory.js.map +1 -0
- package/lib/command/measure/AcApMeasurementImportExportCmd.d.ts +17 -0
- package/lib/command/measure/AcApMeasurementImportExportCmd.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementImportExportCmd.js +207 -0
- package/lib/command/measure/AcApMeasurementImportExportCmd.js.map +1 -0
- package/lib/command/measure/AcApMeasurementPlace.d.ts +9 -0
- package/lib/command/measure/AcApMeasurementPlace.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementPlace.js +33 -0
- package/lib/command/measure/AcApMeasurementPlace.js.map +1 -0
- package/lib/command/measure/AcApMeasurementSidecar.d.ts +19 -0
- package/lib/command/measure/AcApMeasurementSidecar.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementSidecar.js +173 -0
- package/lib/command/measure/AcApMeasurementSidecar.js.map +1 -0
- package/lib/command/measure/AcApMeasurementStore.d.ts +90 -0
- package/lib/command/measure/AcApMeasurementStore.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementStore.js +364 -0
- package/lib/command/measure/AcApMeasurementStore.js.map +1 -0
- package/lib/command/measure/AcApMeasurementTypes.d.ts +56 -0
- package/lib/command/measure/AcApMeasurementTypes.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementTypes.js +2 -0
- package/lib/command/measure/AcApMeasurementTypes.js.map +1 -0
- package/lib/command/measure/AcApMeasurementVisibilityCmd.d.ts +10 -0
- package/lib/command/measure/AcApMeasurementVisibilityCmd.d.ts.map +1 -0
- package/lib/command/measure/AcApMeasurementVisibilityCmd.js +78 -0
- package/lib/command/measure/AcApMeasurementVisibilityCmd.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasureAngleEntity.d.ts +68 -0
- package/lib/command/measure/entity/AcApMeasureAngleEntity.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasureAngleEntity.js +188 -0
- package/lib/command/measure/entity/AcApMeasureAngleEntity.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasureArcEntity.d.ts +85 -0
- package/lib/command/measure/entity/AcApMeasureArcEntity.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasureArcEntity.js +159 -0
- package/lib/command/measure/entity/AcApMeasureArcEntity.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasureAreaEntity.d.ts +60 -0
- package/lib/command/measure/entity/AcApMeasureAreaEntity.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasureAreaEntity.js +184 -0
- package/lib/command/measure/entity/AcApMeasureAreaEntity.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasureDistanceEntity.d.ts +60 -0
- package/lib/command/measure/entity/AcApMeasureDistanceEntity.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasureDistanceEntity.js +166 -0
- package/lib/command/measure/entity/AcApMeasureDistanceEntity.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasureDrawUtil.d.ts +129 -0
- package/lib/command/measure/entity/AcApMeasureDrawUtil.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasureDrawUtil.js +257 -0
- package/lib/command/measure/entity/AcApMeasureDrawUtil.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasureEntity.d.ts +148 -0
- package/lib/command/measure/entity/AcApMeasureEntity.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasureEntity.js +141 -0
- package/lib/command/measure/entity/AcApMeasureEntity.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasureEntityFactory.d.ts +15 -0
- package/lib/command/measure/entity/AcApMeasureEntityFactory.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasureEntityFactory.js +35 -0
- package/lib/command/measure/entity/AcApMeasureEntityFactory.js.map +1 -0
- package/lib/command/measure/entity/AcApMeasurePointEntity.d.ts +56 -0
- package/lib/command/measure/entity/AcApMeasurePointEntity.d.ts.map +1 -0
- package/lib/command/measure/entity/AcApMeasurePointEntity.js +125 -0
- package/lib/command/measure/entity/AcApMeasurePointEntity.js.map +1 -0
- package/lib/command/measure/entity/index.d.ts +12 -0
- package/lib/command/measure/entity/index.d.ts.map +1 -0
- package/lib/command/measure/entity/index.js +12 -0
- package/lib/command/measure/entity/index.js.map +1 -0
- package/lib/command/measure/index.d.ts +10 -0
- package/lib/command/measure/index.d.ts.map +1 -1
- package/lib/command/measure/index.js +10 -0
- package/lib/command/measure/index.js.map +1 -1
- package/lib/command/modify/AcApCopyCmd.d.ts +1 -1
- package/lib/command/modify/AcApCopyCmd.js +2 -2
- package/lib/command/modify/AcApCopyCmd.js.map +1 -1
- package/lib/command/modify/AcApMoveCmd.js +1 -1
- package/lib/command/modify/AcApMoveCmd.js.map +1 -1
- package/lib/command/modify/AcApOffsetCmd.d.ts +1 -1
- package/lib/command/modify/AcApOffsetCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApOffsetCmd.js +5 -10
- package/lib/command/modify/AcApOffsetCmd.js.map +1 -1
- package/lib/command/modify/AcApRotateCmd.d.ts +1 -1
- package/lib/command/modify/AcApRotateCmd.js +2 -2
- package/lib/command/modify/AcApRotateCmd.js.map +1 -1
- package/lib/command/overlay/AcApHtmlLivePreview.d.ts +121 -0
- package/lib/command/overlay/AcApHtmlLivePreview.d.ts.map +1 -0
- package/lib/command/overlay/AcApHtmlLivePreview.js +193 -0
- package/lib/command/overlay/AcApHtmlLivePreview.js.map +1 -0
- package/lib/command/overlay/AcApOverlayDrawUtil.d.ts +63 -0
- package/lib/command/overlay/AcApOverlayDrawUtil.d.ts.map +1 -0
- package/lib/command/overlay/AcApOverlayDrawUtil.js +115 -0
- package/lib/command/overlay/AcApOverlayDrawUtil.js.map +1 -0
- package/lib/command/overlay/AcApOverlayEntity.d.ts +93 -0
- package/lib/command/overlay/AcApOverlayEntity.d.ts.map +1 -0
- package/lib/command/overlay/AcApOverlayEntity.js +65 -0
- package/lib/command/overlay/AcApOverlayEntity.js.map +1 -0
- package/lib/command/overlay/AcApOverlayGripHost.d.ts +105 -0
- package/lib/command/overlay/AcApOverlayGripHost.d.ts.map +1 -0
- package/lib/command/overlay/AcApOverlayGripHost.js +207 -0
- package/lib/command/overlay/AcApOverlayGripHost.js.map +1 -0
- package/lib/command/overlay/AcApOverlaySerializable.d.ts +20 -0
- package/lib/command/overlay/AcApOverlaySerializable.d.ts.map +1 -0
- package/lib/command/overlay/AcApOverlaySerializable.js +2 -0
- package/lib/command/overlay/AcApOverlaySerializable.js.map +1 -0
- package/lib/command/overlay/index.d.ts +13 -0
- package/lib/command/overlay/index.d.ts.map +1 -0
- package/lib/command/overlay/index.js +13 -0
- package/lib/command/overlay/index.js.map +1 -0
- package/lib/editor/command/AcEdCommand.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommand.js +1 -0
- package/lib/editor/command/AcEdCommand.js.map +1 -1
- package/lib/editor/global/AcEdUiLayout.d.ts +3 -3
- package/lib/editor/global/AcEdUiLayout.d.ts.map +1 -1
- package/lib/editor/global/AcEdUiLayout.js +3 -3
- package/lib/editor/global/AcEdUiLayout.js.map +1 -1
- package/lib/editor/global/AcEdUiTheme.d.ts +1 -1
- package/lib/editor/global/AcEdUiTheme.d.ts.map +1 -1
- package/lib/editor/global/AcEdUiTheme.js +1 -1
- package/lib/editor/global/AcEdUiTheme.js.map +1 -1
- package/lib/editor/global/eventBus.d.ts +5 -0
- package/lib/editor/global/eventBus.d.ts.map +1 -1
- package/lib/editor/global/eventBus.js.map +1 -1
- package/lib/editor/input/AcEditor.d.ts +6 -0
- package/lib/editor/input/AcEditor.d.ts.map +1 -1
- package/lib/editor/input/AcEditor.js +10 -0
- package/lib/editor/input/AcEditor.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptBoxOptions.d.ts +7 -0
- package/lib/editor/input/prompt/AcEdPromptBoxOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptBoxOptions.js +17 -0
- package/lib/editor/input/prompt/AcEdPromptBoxOptions.js.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.d.ts +9 -0
- package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.js +17 -0
- package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
- package/lib/editor/input/ui/AcEdMTextEditor.js +3 -3
- package/lib/editor/input/ui/AcEdMTextEditor.js.map +1 -1
- package/lib/i18n/cs/command.d.ts +60 -0
- package/lib/i18n/cs/command.d.ts.map +1 -1
- package/lib/i18n/cs/command.js +63 -3
- package/lib/i18n/cs/command.js.map +1 -1
- package/lib/i18n/cs/jig.d.ts +1227 -1
- package/lib/i18n/cs/jig.d.ts.map +1 -1
- package/lib/i18n/cs/jig.js +1226 -6
- package/lib/i18n/cs/jig.js.map +1 -1
- package/lib/i18n/cs/main.d.ts +5 -0
- package/lib/i18n/cs/main.d.ts.map +1 -1
- package/lib/i18n/cs/main.js +5 -0
- package/lib/i18n/cs/main.js.map +1 -1
- package/lib/i18n/en/command.d.ts +57 -0
- package/lib/i18n/en/command.d.ts.map +1 -1
- package/lib/i18n/en/command.js +60 -3
- package/lib/i18n/en/command.js.map +1 -1
- package/lib/i18n/en/jig.d.ts +180 -0
- package/lib/i18n/en/jig.d.ts.map +1 -1
- package/lib/i18n/en/jig.js +181 -1
- package/lib/i18n/en/jig.js.map +1 -1
- package/lib/i18n/en/main.d.ts +5 -0
- package/lib/i18n/en/main.d.ts.map +1 -1
- package/lib/i18n/en/main.js +5 -0
- package/lib/i18n/en/main.js.map +1 -1
- package/lib/i18n/tr/command.d.ts +57 -0
- package/lib/i18n/tr/command.d.ts.map +1 -1
- package/lib/i18n/tr/command.js +60 -3
- package/lib/i18n/tr/command.js.map +1 -1
- package/lib/i18n/tr/jig.d.ts +180 -0
- package/lib/i18n/tr/jig.d.ts.map +1 -1
- package/lib/i18n/tr/jig.js +181 -1
- package/lib/i18n/tr/jig.js.map +1 -1
- package/lib/i18n/tr/main.d.ts +7 -0
- package/lib/i18n/tr/main.d.ts.map +1 -1
- package/lib/i18n/tr/main.js +7 -0
- package/lib/i18n/tr/main.js.map +1 -1
- package/lib/i18n/zh/command.d.ts +57 -0
- package/lib/i18n/zh/command.d.ts.map +1 -1
- package/lib/i18n/zh/command.js +60 -3
- package/lib/i18n/zh/command.js.map +1 -1
- package/lib/i18n/zh/jig.d.ts +180 -0
- package/lib/i18n/zh/jig.d.ts.map +1 -1
- package/lib/i18n/zh/jig.js +181 -1
- package/lib/i18n/zh/jig.js.map +1 -1
- package/lib/i18n/zh/main.d.ts +5 -0
- package/lib/i18n/zh/main.d.ts.map +1 -1
- package/lib/i18n/zh/main.js +5 -0
- package/lib/i18n/zh/main.js.map +1 -1
- package/lib/plugin/AcApPluginManager.d.ts.map +1 -1
- package/lib/plugin/AcApPluginManager.js +2 -1
- package/lib/plugin/AcApPluginManager.js.map +1 -1
- package/lib/service/AcApEntitySelection.d.ts +0 -3
- package/lib/service/AcApEntitySelection.d.ts.map +1 -1
- package/lib/service/AcApEntitySelection.js +42 -36
- package/lib/service/AcApEntitySelection.js.map +1 -1
- package/lib/ui/AcApDrawStyle.d.ts +63 -0
- package/lib/ui/AcApDrawStyle.d.ts.map +1 -0
- package/lib/ui/AcApDrawStyle.js +149 -0
- package/lib/ui/AcApDrawStyle.js.map +1 -0
- package/lib/ui/AcApDrawStyleToolbar.d.ts +124 -0
- package/lib/ui/AcApDrawStyleToolbar.d.ts.map +1 -0
- package/lib/ui/AcApDrawStyleToolbar.js +486 -0
- package/lib/ui/AcApDrawStyleToolbar.js.map +1 -0
- package/lib/ui/AcUiDialog.d.ts.map +1 -1
- package/lib/ui/AcUiDialog.js +2 -2
- package/lib/ui/AcUiDialog.js.map +1 -1
- package/lib/ui/index.d.ts +2 -0
- package/lib/ui/index.d.ts.map +1 -1
- package/lib/ui/index.js +2 -0
- package/lib/ui/index.js.map +1 -1
- package/lib/util/AcApDatabaseEdit.d.ts.map +1 -1
- package/lib/util/AcApDatabaseEdit.js +1 -0
- package/lib/util/AcApDatabaseEdit.js.map +1 -1
- package/lib/util/AcApMeasurementUnits.d.ts +52 -0
- package/lib/util/AcApMeasurementUnits.d.ts.map +1 -0
- package/lib/util/AcApMeasurementUnits.js +137 -0
- package/lib/util/AcApMeasurementUnits.js.map +1 -0
- package/lib/util/AcApMeasurementUtil.d.ts +42 -0
- package/lib/util/AcApMeasurementUtil.d.ts.map +1 -0
- package/lib/util/AcApMeasurementUtil.js +98 -0
- package/lib/util/AcApMeasurementUtil.js.map +1 -0
- package/lib/util/AcApScreenHitTest.d.ts +35 -0
- package/lib/util/AcApScreenHitTest.d.ts.map +1 -0
- package/lib/util/AcApScreenHitTest.js +98 -0
- package/lib/util/AcApScreenHitTest.js.map +1 -0
- package/lib/util/AcApScriptParser.d.ts +13 -0
- package/lib/util/AcApScriptParser.d.ts.map +1 -0
- package/lib/util/AcApScriptParser.js +55 -0
- package/lib/util/AcApScriptParser.js.map +1 -0
- package/lib/util/index.d.ts +4 -1
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +4 -1
- package/lib/util/index.js.map +1 -1
- package/lib/view/AcEdReviewOverlayPick.d.ts +25 -0
- package/lib/view/AcEdReviewOverlayPick.d.ts.map +1 -0
- package/lib/view/AcEdReviewOverlayPick.js +229 -0
- package/lib/view/AcEdReviewOverlayPick.js.map +1 -0
- package/lib/view/AcEdViewKeyHandler.d.ts.map +1 -1
- package/lib/view/AcEdViewKeyHandler.js +53 -0
- package/lib/view/AcEdViewKeyHandler.js.map +1 -1
- package/lib/view/AcTrScene.d.ts +15 -1
- package/lib/view/AcTrScene.d.ts.map +1 -1
- package/lib/view/AcTrScene.js +25 -2
- package/lib/view/AcTrScene.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +46 -5
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +179 -74
- package/lib/view/AcTrView2d.js.map +1 -1
- package/lib/view/index.d.ts +1 -0
- package/lib/view/index.d.ts.map +1 -1
- package/lib/view/index.js +1 -0
- package/lib/view/index.js.map +1 -1
- package/package.json +7 -6
- package/dist/libredwg-parser-worker.js +0 -7525
- package/lib/app/AcApAnnotation.d.ts +0 -47
- package/lib/app/AcApAnnotation.d.ts.map +0 -1
- package/lib/app/AcApAnnotation.js +0 -135
- package/lib/app/AcApAnnotation.js.map +0 -1
- package/lib/command/review/AcApBaseRevCmd.d.ts +0 -36
- package/lib/command/review/AcApBaseRevCmd.d.ts.map +0 -1
- package/lib/command/review/AcApBaseRevCmd.js +0 -68
- package/lib/command/review/AcApBaseRevCmd.js.map +0 -1
- package/lib/command/review/AcApRevCircleCmd.d.ts +0 -18
- package/lib/command/review/AcApRevCircleCmd.d.ts.map +0 -1
- package/lib/command/review/AcApRevCircleCmd.js.map +0 -1
- package/lib/command/review/AcApRevCloudCmd.d.ts +0 -26
- package/lib/command/review/AcApRevCloudCmd.d.ts.map +0 -1
- package/lib/command/review/AcApRevCloudCmd.js +0 -240
- package/lib/command/review/AcApRevCloudCmd.js.map +0 -1
- package/lib/command/review/AcApRevRectCmd.d.ts +0 -18
- package/lib/command/review/AcApRevRectCmd.d.ts.map +0 -1
- package/lib/command/review/AcApRevRectCmd.js +0 -155
- package/lib/command/review/AcApRevRectCmd.js.map +0 -1
- package/lib/command/review/AcApRevVisibilityCmd.d.ts +0 -15
- package/lib/command/review/AcApRevVisibilityCmd.d.ts.map +0 -1
- package/lib/command/review/AcApRevVisibilityCmd.js.map +0 -1
- package/lib/command/review/AcApSketchCmd.d.ts +0 -32
- package/lib/command/review/AcApSketchCmd.d.ts.map +0 -1
- package/lib/command/review/AcApSketchCmd.js +0 -175
- package/lib/command/review/AcApSketchCmd.js.map +0 -1
- package/lib/command/review/index.d.ts +0 -7
- package/lib/command/review/index.d.ts.map +0 -1
- package/lib/command/review/index.js +0 -7
- package/lib/command/review/index.js.map +0 -1
- package/lib/util/AcApMeasurementElementGenerator.d.ts +0 -36
- package/lib/util/AcApMeasurementElementGenerator.d.ts.map +0 -1
- package/lib/util/AcApMeasurementElementGenerator.js +0 -92
- package/lib/util/AcApMeasurementElementGenerator.js.map +0 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { AcEdCorsorType, AcEdOpenMode, AcEdPromptStatus, AcEdPromptStringOptions, AcEdViewMode } from '../../editor';
|
|
38
|
+
import { AcApI18n } from '../../i18n';
|
|
39
|
+
import { editMarkupHtmlText } from './AcApMarkupTextEdit';
|
|
40
|
+
import { createMarkupId, defaultMarkupStyle, getMarkupAuthor, markupNow } from './AcApMarkupUtil';
|
|
41
|
+
/** Shared open-mode for all Design Review markup commands. */
|
|
42
|
+
export var MARKUP_OPEN_MODE = AcEdOpenMode.Review;
|
|
43
|
+
/**
|
|
44
|
+
* Apply shared markup-command defaults (Review mode, no empty DB undo marks).
|
|
45
|
+
* Markup undo is handled by {@link runMarkupEdit} instead.
|
|
46
|
+
*/
|
|
47
|
+
export function configureMarkupCommand(command) {
|
|
48
|
+
command.mode = MARKUP_OPEN_MODE;
|
|
49
|
+
command.recordsUndoStack = false;
|
|
50
|
+
}
|
|
51
|
+
/** Create shared metadata fields for a new markup record. */
|
|
52
|
+
export function createMarkupMeta(type, view, context, extras) {
|
|
53
|
+
var _a;
|
|
54
|
+
var now = markupNow();
|
|
55
|
+
return {
|
|
56
|
+
id: createMarkupId(type),
|
|
57
|
+
type: type,
|
|
58
|
+
layoutId: view.activeLayoutBtrId,
|
|
59
|
+
style: defaultMarkupStyle(),
|
|
60
|
+
text: extras === null || extras === void 0 ? void 0 : extras.text,
|
|
61
|
+
comment: (_a = extras === null || extras === void 0 ? void 0 : extras.comment) !== null && _a !== void 0 ? _a : '',
|
|
62
|
+
status: 'open',
|
|
63
|
+
author: getMarkupAuthor(context.doc.database),
|
|
64
|
+
createdAt: now,
|
|
65
|
+
updatedAt: now
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/** Prompt for a short label / note string (optional empty). */
|
|
69
|
+
export function promptMarkupText(context_1, messageKey_1) {
|
|
70
|
+
return __awaiter(this, arguments, void 0, function (context, messageKey, defaultValue) {
|
|
71
|
+
var prompt, result;
|
|
72
|
+
var _a;
|
|
73
|
+
if (defaultValue === void 0) { defaultValue = ''; }
|
|
74
|
+
return __generator(this, function (_b) {
|
|
75
|
+
switch (_b.label) {
|
|
76
|
+
case 0:
|
|
77
|
+
prompt = new AcEdPromptStringOptions(AcApI18n.t(messageKey));
|
|
78
|
+
prompt.allowEmpty = true;
|
|
79
|
+
prompt.allowSpaces = true;
|
|
80
|
+
// Enter with no typing must accept the default (including empty) — floating
|
|
81
|
+
// input only commits blank Enter when useDefaultValue is true.
|
|
82
|
+
prompt.defaultValue = defaultValue;
|
|
83
|
+
prompt.useDefaultValue = true;
|
|
84
|
+
return [4 /*yield*/, context.view.editor.getString(prompt)];
|
|
85
|
+
case 1:
|
|
86
|
+
result = _b.sent();
|
|
87
|
+
if (result.status !== AcEdPromptStatus.OK)
|
|
88
|
+
return [2 /*return*/, undefined];
|
|
89
|
+
return [2 /*return*/, ((_a = result.stringResult) !== null && _a !== void 0 ? _a : defaultValue).trim()];
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Type markup text directly in a capsule, matching double-click edit.
|
|
96
|
+
*
|
|
97
|
+
* Escape cancels and returns an empty string (geometry is still committed).
|
|
98
|
+
*/
|
|
99
|
+
export function promptMarkupCapsuleText(host, options) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
101
|
+
var text;
|
|
102
|
+
var _a, _b;
|
|
103
|
+
return __generator(this, function (_c) {
|
|
104
|
+
switch (_c.label) {
|
|
105
|
+
case 0: return [4 /*yield*/, editMarkupHtmlText({
|
|
106
|
+
el: host.textElement,
|
|
107
|
+
listenOn: host.element,
|
|
108
|
+
multiline: (_a = options === null || options === void 0 ? void 0 : options.multiline) !== null && _a !== void 0 ? _a : true,
|
|
109
|
+
initialText: (_b = options === null || options === void 0 ? void 0 : options.initialText) !== null && _b !== void 0 ? _b : ''
|
|
110
|
+
})];
|
|
111
|
+
case 1:
|
|
112
|
+
text = _c.sent();
|
|
113
|
+
return [2 /*return*/, (text !== null && text !== void 0 ? text : '').trim()];
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/** Run a markup command body inside selection mode + crosshair cursor. */
|
|
119
|
+
export function withMarkupInput(context, fn) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
121
|
+
return __generator(this, function (_a) {
|
|
122
|
+
switch (_a.label) {
|
|
123
|
+
case 0: return [4 /*yield*/, context.view.withMode(AcEdViewMode.SELECTION, function () {
|
|
124
|
+
return context.view.editor.withCursor(AcEdCorsorType.Crosshair, fn);
|
|
125
|
+
})];
|
|
126
|
+
case 1:
|
|
127
|
+
_a.sent();
|
|
128
|
+
return [2 /*return*/];
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=AcApMarkupCmdUtil.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApMarkupCmdUtil.js","sourceRoot":"","sources":["../../../src/command/markup/AcApMarkupCmdUtil.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EACL,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,uBAAuB,EACvB,YAAY,EACb,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAMzD,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,SAAS,EACV,MAAM,kBAAkB,CAAA;AAEzB,8DAA8D;AAC9D,MAAM,CAAC,IAAM,gBAAgB,GAAG,YAAY,CAAC,MAAM,CAAA;AAEnD;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAGtC;IACC,OAAO,CAAC,IAAI,GAAG,gBAAgB,CAAA;IAC/B,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAA;AAClC,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,gBAAgB,CAC9B,IAAoB,EACpB,IAAgB,EAChB,OAAoB,EACpB,MAA0D;;IAE1D,IAAM,GAAG,GAAG,SAAS,EA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;;;;;;wBAE1C,qBAAM,kBAAkB,CAAC;wBACpC,EAAE,EAAE,IAAI,CAAC,WAAW;wBACpB,QAAQ,EAAE,IAAI,CAAC,OAAO;wBACtB,SAAS,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,mCAAI,IAAI;wBACrC,WAAW,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,mCAAI,EAAE;qBACxC,CAAC,EAAA;;oBALI,IAAI,GAAG,SAKX;oBACF,sBAAO,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAA;;;;CAC3B;AAED,0EAA0E;AAC1E,MAAM,UAAgB,eAAe,CACnC,OAAoB,EACpB,EAAuB;;;;wBAEvB,qBAAM,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,SAAS,EAAE;wBAClD,OAAA,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,CAAC;oBAA5D,CAA4D,CAC7D,EAAA;;oBAFD,SAEC,CAAA;;;;;CACF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { AcGeBox2d } from '@mlightcad/data-model';
|
|
2
|
+
import { type AcApScreenPoint } from '../../util/AcApScreenHitTest';
|
|
3
|
+
import type { AcApMarkupAttachedCallout, AcApMarkupGeometry, AcApMarkupPoint2d } from './AcApMarkupTypes';
|
|
4
|
+
type WorldToScreen = (point: AcApMarkupPoint2d) => AcApScreenPoint;
|
|
5
|
+
/**
|
|
6
|
+
* Translate a 2D markup point by a world-space delta.
|
|
7
|
+
*
|
|
8
|
+
* @param point - Original point.
|
|
9
|
+
* @param dx - World X translation.
|
|
10
|
+
* @param dy - World Y translation.
|
|
11
|
+
* @returns A new point; `point` is not mutated.
|
|
12
|
+
*/
|
|
13
|
+
export declare function translateMarkupPoint(point: AcApMarkupPoint2d, dx: number, dy: number): AcApMarkupPoint2d;
|
|
14
|
+
/**
|
|
15
|
+
* Translate an attached shape callout by a world-space delta.
|
|
16
|
+
*
|
|
17
|
+
* @param callout - Callout whose tip and anchor are moved.
|
|
18
|
+
* @param dx - World X translation.
|
|
19
|
+
* @param dy - World Y translation.
|
|
20
|
+
* @returns A new callout; text is copied unchanged.
|
|
21
|
+
*/
|
|
22
|
+
export declare function translateAttachedCallout(callout: AcApMarkupAttachedCallout, dx: number, dy: number): AcApMarkupAttachedCallout;
|
|
23
|
+
/**
|
|
24
|
+
* Center point used as the move grip for a markup.
|
|
25
|
+
*
|
|
26
|
+
* @param geometry - Markup geometry to inspect.
|
|
27
|
+
* @returns Midpoint, center, or position, or `undefined` for unknown types.
|
|
28
|
+
*/
|
|
29
|
+
export declare function markupGeometryCenter(geometry: AcApMarkupGeometry): AcApMarkupPoint2d | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Translate a markup's geometry by a world-space delta.
|
|
32
|
+
*
|
|
33
|
+
* Radius and stamp ids are preserved; only positions move.
|
|
34
|
+
*
|
|
35
|
+
* @param geometry - Geometry to translate.
|
|
36
|
+
* @param dx - World X translation.
|
|
37
|
+
* @param dy - World Y translation.
|
|
38
|
+
* @returns A new geometry object of the same type.
|
|
39
|
+
*/
|
|
40
|
+
export declare function translateMarkupGeometry(geometry: AcApMarkupGeometry, dx: number, dy: number): AcApMarkupGeometry;
|
|
41
|
+
/**
|
|
42
|
+
* Axis-aligned world bounds of a markup's control geometry.
|
|
43
|
+
*
|
|
44
|
+
* Used for window / crossing box selection. Point-like markups (text / stamp /
|
|
45
|
+
* symbol) use their anchor; shapes include attached callout tip and anchor.
|
|
46
|
+
*/
|
|
47
|
+
export declare function markupGeometryBounds(geometry: AcApMarkupGeometry): AcGeBox2d | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Whether a canvas-space pick hits a markup's drawn stroke (not HTML capsules).
|
|
50
|
+
*
|
|
51
|
+
* Hollow shapes (rect / cloud / circle) hit on the outline only. Highlights
|
|
52
|
+
* also hit their filled interior. Text / stamp / symbol are skipped — those
|
|
53
|
+
* are selected via their HTML overlays.
|
|
54
|
+
*/
|
|
55
|
+
export declare function hitTestMarkupGeometry(geometry: AcApMarkupGeometry, canvas: AcApScreenPoint, worldToScreen: WorldToScreen, threshold: number): boolean;
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=AcApMarkupGeometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApMarkupGeometry.d.ts","sourceRoot":"","sources":["../../../src/command/markup/AcApMarkupGeometry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,OAAO,EACL,KAAK,eAAe,EAKrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EACV,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,mBAAmB,CAAA;AAK1B,KAAK,aAAa,GAAG,CAAC,KAAK,EAAE,iBAAiB,KAAK,eAAe,CAAA;AAElE;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,iBAAiB,EACxB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,iBAAiB,CAEnB;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,yBAAyB,EAClC,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,yBAAyB,CAM3B;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,kBAAkB,GAC3B,iBAAiB,GAAG,SAAS,CA6B/B;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,kBAAkB,EAC5B,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,kBAAkB,CAuDpB;AAyBD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,kBAAkB,GAC3B,SAAS,GAAG,SAAS,CAuCvB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,kBAAkB,EAC5B,MAAM,EAAE,eAAe,EACvB,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,MAAM,GAChB,OAAO,CAgFT"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { AcGeBox2d } from '@mlightcad/data-model';
|
|
13
|
+
import { distPointToCirclePx, distPointToRectOutlinePx, distPointToSegmentPx, pointInRectPx } from '../../util/AcApScreenHitTest';
|
|
14
|
+
/** Extra hit slop for revision-cloud lobes around the AABB. */
|
|
15
|
+
var CLOUD_HIT_EXTRA_PX = 8;
|
|
16
|
+
/**
|
|
17
|
+
* Translate a 2D markup point by a world-space delta.
|
|
18
|
+
*
|
|
19
|
+
* @param point - Original point.
|
|
20
|
+
* @param dx - World X translation.
|
|
21
|
+
* @param dy - World Y translation.
|
|
22
|
+
* @returns A new point; `point` is not mutated.
|
|
23
|
+
*/
|
|
24
|
+
export function translateMarkupPoint(point, dx, dy) {
|
|
25
|
+
return { x: point.x + dx, y: point.y + dy };
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Translate an attached shape callout by a world-space delta.
|
|
29
|
+
*
|
|
30
|
+
* @param callout - Callout whose tip and anchor are moved.
|
|
31
|
+
* @param dx - World X translation.
|
|
32
|
+
* @param dy - World Y translation.
|
|
33
|
+
* @returns A new callout; text is copied unchanged.
|
|
34
|
+
*/
|
|
35
|
+
export function translateAttachedCallout(callout, dx, dy) {
|
|
36
|
+
return {
|
|
37
|
+
tip: translateMarkupPoint(callout.tip, dx, dy),
|
|
38
|
+
anchor: translateMarkupPoint(callout.anchor, dx, dy),
|
|
39
|
+
text: callout.text
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Center point used as the move grip for a markup.
|
|
44
|
+
*
|
|
45
|
+
* @param geometry - Markup geometry to inspect.
|
|
46
|
+
* @returns Midpoint, center, or position, or `undefined` for unknown types.
|
|
47
|
+
*/
|
|
48
|
+
export function markupGeometryCenter(geometry) {
|
|
49
|
+
switch (geometry.type) {
|
|
50
|
+
case 'cloud':
|
|
51
|
+
case 'rect':
|
|
52
|
+
case 'highlight':
|
|
53
|
+
return {
|
|
54
|
+
x: (geometry.corner1.x + geometry.corner2.x) / 2,
|
|
55
|
+
y: (geometry.corner1.y + geometry.corner2.y) / 2
|
|
56
|
+
};
|
|
57
|
+
case 'circle':
|
|
58
|
+
return __assign({}, geometry.center);
|
|
59
|
+
case 'callout':
|
|
60
|
+
return {
|
|
61
|
+
x: (geometry.tip.x + geometry.anchor.x) / 2,
|
|
62
|
+
y: (geometry.tip.y + geometry.anchor.y) / 2
|
|
63
|
+
};
|
|
64
|
+
case 'arrow':
|
|
65
|
+
case 'line':
|
|
66
|
+
return {
|
|
67
|
+
x: (geometry.start.x + geometry.end.x) / 2,
|
|
68
|
+
y: (geometry.start.y + geometry.end.y) / 2
|
|
69
|
+
};
|
|
70
|
+
case 'text':
|
|
71
|
+
case 'stamp':
|
|
72
|
+
case 'symbol':
|
|
73
|
+
return __assign({}, geometry.position);
|
|
74
|
+
default:
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Translate a markup's geometry by a world-space delta.
|
|
80
|
+
*
|
|
81
|
+
* Radius and stamp ids are preserved; only positions move.
|
|
82
|
+
*
|
|
83
|
+
* @param geometry - Geometry to translate.
|
|
84
|
+
* @param dx - World X translation.
|
|
85
|
+
* @param dy - World Y translation.
|
|
86
|
+
* @returns A new geometry object of the same type.
|
|
87
|
+
*/
|
|
88
|
+
export function translateMarkupGeometry(geometry, dx, dy) {
|
|
89
|
+
switch (geometry.type) {
|
|
90
|
+
case 'cloud':
|
|
91
|
+
return __assign(__assign({}, geometry), { corner1: translateMarkupPoint(geometry.corner1, dx, dy), corner2: translateMarkupPoint(geometry.corner2, dx, dy), callout: geometry.callout
|
|
92
|
+
? translateAttachedCallout(geometry.callout, dx, dy)
|
|
93
|
+
: undefined });
|
|
94
|
+
case 'rect':
|
|
95
|
+
return __assign(__assign({}, geometry), { corner1: translateMarkupPoint(geometry.corner1, dx, dy), corner2: translateMarkupPoint(geometry.corner2, dx, dy), callout: geometry.callout
|
|
96
|
+
? translateAttachedCallout(geometry.callout, dx, dy)
|
|
97
|
+
: undefined });
|
|
98
|
+
case 'highlight':
|
|
99
|
+
return __assign(__assign({}, geometry), { corner1: translateMarkupPoint(geometry.corner1, dx, dy), corner2: translateMarkupPoint(geometry.corner2, dx, dy) });
|
|
100
|
+
case 'circle':
|
|
101
|
+
return __assign(__assign({}, geometry), { center: translateMarkupPoint(geometry.center, dx, dy), callout: geometry.callout
|
|
102
|
+
? translateAttachedCallout(geometry.callout, dx, dy)
|
|
103
|
+
: undefined });
|
|
104
|
+
case 'callout':
|
|
105
|
+
return __assign(__assign({}, geometry), { tip: translateMarkupPoint(geometry.tip, dx, dy), anchor: translateMarkupPoint(geometry.anchor, dx, dy) });
|
|
106
|
+
case 'arrow':
|
|
107
|
+
case 'line':
|
|
108
|
+
return __assign(__assign({}, geometry), { start: translateMarkupPoint(geometry.start, dx, dy), end: translateMarkupPoint(geometry.end, dx, dy) });
|
|
109
|
+
case 'text':
|
|
110
|
+
case 'stamp':
|
|
111
|
+
case 'symbol':
|
|
112
|
+
return __assign(__assign({}, geometry), { position: translateMarkupPoint(geometry.position, dx, dy) });
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function hitTestLeader(callout, canvas, worldToScreen, threshold) {
|
|
116
|
+
var tip = worldToScreen(callout.tip);
|
|
117
|
+
var anchor = worldToScreen(callout.anchor);
|
|
118
|
+
return (distPointToSegmentPx(canvas.x, canvas.y, tip.x, tip.y, anchor.x, anchor.y) <=
|
|
119
|
+
threshold);
|
|
120
|
+
}
|
|
121
|
+
function expandAttachedCallout(box, callout) {
|
|
122
|
+
if (!callout)
|
|
123
|
+
return;
|
|
124
|
+
box.expandByPoint(callout.tip);
|
|
125
|
+
box.expandByPoint(callout.anchor);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Axis-aligned world bounds of a markup's control geometry.
|
|
129
|
+
*
|
|
130
|
+
* Used for window / crossing box selection. Point-like markups (text / stamp /
|
|
131
|
+
* symbol) use their anchor; shapes include attached callout tip and anchor.
|
|
132
|
+
*/
|
|
133
|
+
export function markupGeometryBounds(geometry) {
|
|
134
|
+
var box = new AcGeBox2d();
|
|
135
|
+
switch (geometry.type) {
|
|
136
|
+
case 'line':
|
|
137
|
+
case 'arrow':
|
|
138
|
+
box.expandByPoint(geometry.start).expandByPoint(geometry.end);
|
|
139
|
+
break;
|
|
140
|
+
case 'rect':
|
|
141
|
+
case 'cloud':
|
|
142
|
+
box.expandByPoint(geometry.corner1).expandByPoint(geometry.corner2);
|
|
143
|
+
expandAttachedCallout(box, geometry.callout);
|
|
144
|
+
break;
|
|
145
|
+
case 'highlight':
|
|
146
|
+
box.expandByPoint(geometry.corner1).expandByPoint(geometry.corner2);
|
|
147
|
+
break;
|
|
148
|
+
case 'circle':
|
|
149
|
+
box
|
|
150
|
+
.expandByPoint({
|
|
151
|
+
x: geometry.center.x - geometry.radius,
|
|
152
|
+
y: geometry.center.y - geometry.radius
|
|
153
|
+
})
|
|
154
|
+
.expandByPoint({
|
|
155
|
+
x: geometry.center.x + geometry.radius,
|
|
156
|
+
y: geometry.center.y + geometry.radius
|
|
157
|
+
});
|
|
158
|
+
expandAttachedCallout(box, geometry.callout);
|
|
159
|
+
break;
|
|
160
|
+
case 'callout':
|
|
161
|
+
box.expandByPoint(geometry.tip).expandByPoint(geometry.anchor);
|
|
162
|
+
break;
|
|
163
|
+
case 'text':
|
|
164
|
+
case 'stamp':
|
|
165
|
+
case 'symbol':
|
|
166
|
+
box.expandByPoint(geometry.position);
|
|
167
|
+
break;
|
|
168
|
+
default:
|
|
169
|
+
return undefined;
|
|
170
|
+
}
|
|
171
|
+
return box.isEmpty() ? undefined : box;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Whether a canvas-space pick hits a markup's drawn stroke (not HTML capsules).
|
|
175
|
+
*
|
|
176
|
+
* Hollow shapes (rect / cloud / circle) hit on the outline only. Highlights
|
|
177
|
+
* also hit their filled interior. Text / stamp / symbol are skipped — those
|
|
178
|
+
* are selected via their HTML overlays.
|
|
179
|
+
*/
|
|
180
|
+
export function hitTestMarkupGeometry(geometry, canvas, worldToScreen, threshold) {
|
|
181
|
+
switch (geometry.type) {
|
|
182
|
+
case 'line':
|
|
183
|
+
case 'arrow': {
|
|
184
|
+
var a = worldToScreen(geometry.start);
|
|
185
|
+
var b = worldToScreen(geometry.end);
|
|
186
|
+
return (distPointToSegmentPx(canvas.x, canvas.y, a.x, a.y, b.x, b.y) <=
|
|
187
|
+
threshold);
|
|
188
|
+
}
|
|
189
|
+
case 'rect': {
|
|
190
|
+
if (distPointToRectOutlinePx(canvas.x, canvas.y, worldToScreen(geometry.corner1), worldToScreen(geometry.corner2)) <= threshold) {
|
|
191
|
+
return true;
|
|
192
|
+
}
|
|
193
|
+
return geometry.callout
|
|
194
|
+
? hitTestLeader(geometry.callout, canvas, worldToScreen, threshold)
|
|
195
|
+
: false;
|
|
196
|
+
}
|
|
197
|
+
case 'cloud': {
|
|
198
|
+
if (distPointToRectOutlinePx(canvas.x, canvas.y, worldToScreen(geometry.corner1), worldToScreen(geometry.corner2)) <=
|
|
199
|
+
threshold + CLOUD_HIT_EXTRA_PX) {
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
return geometry.callout
|
|
203
|
+
? hitTestLeader(geometry.callout, canvas, worldToScreen, threshold)
|
|
204
|
+
: false;
|
|
205
|
+
}
|
|
206
|
+
case 'circle': {
|
|
207
|
+
var c = worldToScreen(geometry.center);
|
|
208
|
+
var rim = worldToScreen({
|
|
209
|
+
x: geometry.center.x + geometry.radius,
|
|
210
|
+
y: geometry.center.y
|
|
211
|
+
});
|
|
212
|
+
var radius = Math.hypot(rim.x - c.x, rim.y - c.y);
|
|
213
|
+
if (distPointToCirclePx(canvas.x, canvas.y, c.x, c.y, radius) <= threshold) {
|
|
214
|
+
return true;
|
|
215
|
+
}
|
|
216
|
+
return geometry.callout
|
|
217
|
+
? hitTestLeader(geometry.callout, canvas, worldToScreen, threshold)
|
|
218
|
+
: false;
|
|
219
|
+
}
|
|
220
|
+
case 'highlight':
|
|
221
|
+
return (pointInRectPx(canvas.x, canvas.y, worldToScreen(geometry.corner1), worldToScreen(geometry.corner2)) ||
|
|
222
|
+
distPointToRectOutlinePx(canvas.x, canvas.y, worldToScreen(geometry.corner1), worldToScreen(geometry.corner2)) <= threshold);
|
|
223
|
+
case 'callout':
|
|
224
|
+
return hitTestLeader(geometry, canvas, worldToScreen, threshold);
|
|
225
|
+
case 'text':
|
|
226
|
+
case 'stamp':
|
|
227
|
+
case 'symbol':
|
|
228
|
+
return false;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
//# sourceMappingURL=AcApMarkupGeometry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApMarkupGeometry.js","sourceRoot":"","sources":["../../../src/command/markup/AcApMarkupGeometry.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,OAAO,EAEL,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,aAAa,EACd,MAAM,8BAA8B,CAAA;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 +1,10 @@
|
|
|
1
|
+
import { AcApContext } from '../../app';
|
|
2
|
+
import { AcEdCommand } from '../../editor';
|
|
3
|
+
/**
|
|
4
|
+
* Create a semi-transparent rectangular highlight markup.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AcApMarkupHighlightCmd extends AcEdCommand {
|
|
7
|
+
constructor();
|
|
8
|
+
execute(context: AcApContext): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=AcApMarkupHighlightCmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApMarkupHighlightCmd.d.ts","sourceRoot":"","sources":["../../../src/command/markup/AcApMarkupHighlightCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAEL,WAAW,EAIZ,MAAM,cAAc,CAAA;AAqErB;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,WAAW;;IAM/C,OAAO,CAAC,OAAO,EAAE,WAAW;CAyCnC"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __assign = (this && this.__assign) || function () {
|
|
17
|
+
__assign = Object.assign || function(t) {
|
|
18
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
+
s = arguments[i];
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
+
t[p] = s[p];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
};
|
|
25
|
+
return __assign.apply(this, arguments);
|
|
26
|
+
};
|
|
27
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
28
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
29
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
30
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
31
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
32
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
33
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
37
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
38
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
39
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
40
|
+
function step(op) {
|
|
41
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
42
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
43
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
44
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
45
|
+
switch (op[0]) {
|
|
46
|
+
case 0: case 1: t = op; break;
|
|
47
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
48
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
49
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
50
|
+
default:
|
|
51
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
52
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
53
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
54
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
55
|
+
if (t[2]) _.ops.pop();
|
|
56
|
+
_.trys.pop(); continue;
|
|
57
|
+
}
|
|
58
|
+
op = body.call(thisArg, _);
|
|
59
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
60
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
import { AcEdCommand, AcEdPreviewJig, AcEdPromptPointOptions, AcEdPromptStatus } from '../../editor';
|
|
64
|
+
import { AcApI18n } from '../../i18n';
|
|
65
|
+
import { acapFillLiveHighlight, AcApHtmlLivePreview } from '../overlay/AcApHtmlLivePreview';
|
|
66
|
+
import { configureMarkupCommand, createMarkupMeta, withMarkupInput } from './AcApMarkupCmdUtil';
|
|
67
|
+
import { commitMarkup } from './AcApMarkupPresenter';
|
|
68
|
+
import { MARKUP_LIVE_LAYER } from './AcApMarkupStore';
|
|
69
|
+
import { defaultMarkupColor, getMarkupLineWeight, markupCanvasLineWidth, markupColorToCss } from './AcApMarkupUtil';
|
|
70
|
+
var AcApMarkupHighlightJig = /** @class */ (function (_super) {
|
|
71
|
+
__extends(AcApMarkupHighlightJig, _super);
|
|
72
|
+
function AcApMarkupHighlightJig(view, start, color) {
|
|
73
|
+
var _this = _super.call(this, view) || this;
|
|
74
|
+
_this._view = view;
|
|
75
|
+
_this._first = start;
|
|
76
|
+
_this._second = start;
|
|
77
|
+
_this._colorCss = markupColorToCss(color);
|
|
78
|
+
_this._preview = new AcApHtmlLivePreview(_this._view, "live-markup-highlight-".concat(Date.now()), MARKUP_LIVE_LAYER);
|
|
79
|
+
return _this;
|
|
80
|
+
}
|
|
81
|
+
Object.defineProperty(AcApMarkupHighlightJig.prototype, "entity", {
|
|
82
|
+
/** HTML-only preview — no CAD transient. */
|
|
83
|
+
get: function () {
|
|
84
|
+
return null;
|
|
85
|
+
},
|
|
86
|
+
enumerable: false,
|
|
87
|
+
configurable: true
|
|
88
|
+
});
|
|
89
|
+
AcApMarkupHighlightJig.prototype.update = function (second) {
|
|
90
|
+
var _this = this;
|
|
91
|
+
this._second = second;
|
|
92
|
+
this._colorCss = markupColorToCss(defaultMarkupColor());
|
|
93
|
+
var lineWidth = markupCanvasLineWidth(getMarkupLineWeight());
|
|
94
|
+
this._preview.acapSetDraw(function (ctx, view) {
|
|
95
|
+
acapFillLiveHighlight(ctx, view, _this._first, _this._second, _this._colorCss, lineWidth);
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
AcApMarkupHighlightJig.prototype.end = function () {
|
|
99
|
+
_super.prototype.end.call(this);
|
|
100
|
+
this._preview.acapDispose();
|
|
101
|
+
};
|
|
102
|
+
return AcApMarkupHighlightJig;
|
|
103
|
+
}(AcEdPreviewJig));
|
|
104
|
+
/**
|
|
105
|
+
* Create a semi-transparent rectangular highlight markup.
|
|
106
|
+
*/
|
|
107
|
+
var AcApMarkupHighlightCmd = /** @class */ (function (_super) {
|
|
108
|
+
__extends(AcApMarkupHighlightCmd, _super);
|
|
109
|
+
function AcApMarkupHighlightCmd() {
|
|
110
|
+
var _this = _super.call(this) || this;
|
|
111
|
+
configureMarkupCommand(_this);
|
|
112
|
+
return _this;
|
|
113
|
+
}
|
|
114
|
+
AcApMarkupHighlightCmd.prototype.execute = function (context) {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
116
|
+
var _this = this;
|
|
117
|
+
return __generator(this, function (_a) {
|
|
118
|
+
switch (_a.label) {
|
|
119
|
+
case 0: return [4 /*yield*/, withMarkupInput(context, function () { return __awaiter(_this, void 0, void 0, function () {
|
|
120
|
+
var color, colorCss, p1Prompt, p1Result, p1, p2Prompt, p2Result, p2, meta, record;
|
|
121
|
+
return __generator(this, function (_a) {
|
|
122
|
+
switch (_a.label) {
|
|
123
|
+
case 0:
|
|
124
|
+
color = defaultMarkupColor();
|
|
125
|
+
colorCss = markupColorToCss(color);
|
|
126
|
+
p1Prompt = new AcEdPromptPointOptions(AcApI18n.t('jig.markup.highlight.firstCorner'));
|
|
127
|
+
return [4 /*yield*/, context.view.editor.getPoint(p1Prompt)];
|
|
128
|
+
case 1:
|
|
129
|
+
p1Result = _a.sent();
|
|
130
|
+
if (p1Result.status !== AcEdPromptStatus.OK)
|
|
131
|
+
return [2 /*return*/];
|
|
132
|
+
p1 = p1Result.value;
|
|
133
|
+
p2Prompt = new AcEdPromptPointOptions(AcApI18n.t('jig.markup.highlight.secondCorner'));
|
|
134
|
+
p2Prompt.useBasePoint = true;
|
|
135
|
+
p2Prompt.jig = new AcApMarkupHighlightJig(context.view, p1, color);
|
|
136
|
+
return [4 /*yield*/, context.view.editor.getPoint(p2Prompt)];
|
|
137
|
+
case 2:
|
|
138
|
+
p2Result = _a.sent();
|
|
139
|
+
if (p2Result.status !== AcEdPromptStatus.OK)
|
|
140
|
+
return [2 /*return*/];
|
|
141
|
+
p2 = p2Result.value;
|
|
142
|
+
meta = createMarkupMeta('highlight', context.view, context);
|
|
143
|
+
record = __assign(__assign({}, meta), { type: 'highlight', style: {
|
|
144
|
+
color: colorCss,
|
|
145
|
+
lineWeight: getMarkupLineWeight()
|
|
146
|
+
}, geometry: {
|
|
147
|
+
type: 'highlight',
|
|
148
|
+
corner1: { x: p1.x, y: p1.y },
|
|
149
|
+
corner2: { x: p2.x, y: p2.y }
|
|
150
|
+
} });
|
|
151
|
+
commitMarkup(context.view, record);
|
|
152
|
+
return [2 /*return*/];
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}); })];
|
|
156
|
+
case 1:
|
|
157
|
+
_a.sent();
|
|
158
|
+
return [2 /*return*/];
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
return AcApMarkupHighlightCmd;
|
|
164
|
+
}(AcEdCommand));
|
|
165
|
+
export { AcApMarkupHighlightCmd };
|
|
166
|
+
//# sourceMappingURL=AcApMarkupHighlightCmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApMarkupHighlightCmd.js","sourceRoot":"","sources":["../../../src/command/markup/AcApMarkupHighlightCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,OAAO,EAEL,WAAW,EACX,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EAChB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,kBAAkB,CAAA;AAEzB;IAAqC,0CAA+B;IAOlE,gCAAY,IAAkB,EAAE,KAAsB,EAAE,KAAgB;QACtE,YAAA,MAAK,YAAC,IAAI,CAAC,SAAA;QACX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