@mlightcad/cad-simple-viewer 1.5.6 → 1.5.7
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 +66 -1
- package/dist/cad-simple-viewer.js +30394 -28405
- package/dist/cad-simple-viewer.umd.cjs +150 -158
- package/dist/dxf-parser-worker.js +796 -707
- package/lib/app/AcApContext.d.ts.map +1 -1
- package/lib/app/AcApContext.js +15 -5
- package/lib/app/AcApContext.js.map +1 -1
- package/lib/app/AcApDocManager.d.ts +56 -0
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +112 -14
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcApDocument.d.ts +81 -0
- package/lib/app/AcApDocument.d.ts.map +1 -1
- package/lib/app/AcApDocument.js +154 -0
- package/lib/app/AcApDocument.js.map +1 -1
- package/lib/app/AcApLayerSessionState.d.ts +15 -0
- package/lib/app/AcApLayerSessionState.d.ts.map +1 -0
- package/lib/app/AcApLayerSessionState.js +2 -0
- package/lib/app/AcApLayerSessionState.js.map +1 -0
- package/lib/app/AcApOpenFileDialog.d.ts +35 -0
- package/lib/app/AcApOpenFileDialog.d.ts.map +1 -0
- package/lib/app/AcApOpenFileDialog.js +192 -0
- package/lib/app/AcApOpenFileDialog.js.map +1 -0
- package/lib/app/AcApWebworkerReadiness.d.ts +18 -0
- package/lib/app/AcApWebworkerReadiness.d.ts.map +1 -0
- package/lib/app/AcApWebworkerReadiness.js +126 -0
- package/lib/app/AcApWebworkerReadiness.js.map +1 -0
- package/lib/app/index.d.ts +3 -0
- package/lib/app/index.d.ts.map +1 -1
- package/lib/app/index.js +2 -0
- package/lib/app/index.js.map +1 -1
- package/lib/command/AcApOpenCmd.d.ts +3 -22
- package/lib/command/AcApOpenCmd.d.ts.map +1 -1
- package/lib/command/AcApOpenCmd.js +3 -22
- package/lib/command/AcApOpenCmd.js.map +1 -1
- package/lib/command/AcApRedoCmd.d.ts +10 -0
- package/lib/command/AcApRedoCmd.d.ts.map +1 -0
- package/lib/command/AcApRedoCmd.js +85 -0
- package/lib/command/AcApRedoCmd.js.map +1 -0
- package/lib/command/AcApUndoCmd.d.ts +10 -0
- package/lib/command/AcApUndoCmd.d.ts.map +1 -0
- package/lib/command/AcApUndoCmd.js +85 -0
- package/lib/command/AcApUndoCmd.js.map +1 -0
- package/lib/command/draw/AcApEllipseCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApEllipseCmd.js +12 -4
- package/lib/command/draw/AcApEllipseCmd.js.map +1 -1
- package/lib/command/draw/AcApLineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApLineCmd.js +8 -2
- package/lib/command/draw/AcApLineCmd.js.map +1 -1
- package/lib/command/draw/AcApMLineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApMLineCmd.js +2 -0
- package/lib/command/draw/AcApMLineCmd.js.map +1 -1
- package/lib/command/draw/AcApPolylineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApPolylineCmd.js +3 -0
- package/lib/command/draw/AcApPolylineCmd.js.map +1 -1
- package/lib/command/draw/AcApSplineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApSplineCmd.js +2 -0
- package/lib/command/draw/AcApSplineCmd.js.map +1 -1
- package/lib/command/index.d.ts +2 -0
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +2 -0
- package/lib/command/index.js.map +1 -1
- package/lib/command/layer/AcApLayerCmd.d.ts +3 -187
- package/lib/command/layer/AcApLayerCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerCmd.js +52 -376
- package/lib/command/layer/AcApLayerCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerCurCmd.d.ts +2 -27
- package/lib/command/layer/AcApLayerCurCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerCurCmd.js +18 -67
- package/lib/command/layer/AcApLayerCurCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerDelCmd.d.ts +2 -25
- package/lib/command/layer/AcApLayerDelCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerDelCmd.js +22 -155
- package/lib/command/layer/AcApLayerDelCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerFreezeCmd.d.ts +2 -9
- package/lib/command/layer/AcApLayerFreezeCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerFreezeCmd.js +27 -39
- package/lib/command/layer/AcApLayerFreezeCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerIsoCmd.d.ts +2 -24
- package/lib/command/layer/AcApLayerIsoCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerIsoCmd.js +14 -183
- package/lib/command/layer/AcApLayerIsoCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerLockCmd.d.ts +2 -33
- package/lib/command/layer/AcApLayerLockCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerLockCmd.js +18 -55
- package/lib/command/layer/AcApLayerLockCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerMutationCmd.d.ts +13 -0
- package/lib/command/layer/AcApLayerMutationCmd.d.ts.map +1 -0
- package/lib/command/layer/AcApLayerMutationCmd.js +42 -0
- package/lib/command/layer/AcApLayerMutationCmd.js.map +1 -0
- package/lib/command/layer/AcApLayerOffCmd.d.ts +2 -2
- package/lib/command/layer/AcApLayerOffCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerOffCmd.js +27 -28
- package/lib/command/layer/AcApLayerOffCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerOnCmd.d.ts +2 -15
- package/lib/command/layer/AcApLayerOnCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerOnCmd.js +6 -49
- package/lib/command/layer/AcApLayerOnCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerPCmd.d.ts +2 -68
- package/lib/command/layer/AcApLayerPCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerPCmd.js +4 -152
- package/lib/command/layer/AcApLayerPCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerThawCmd.d.ts +2 -22
- package/lib/command/layer/AcApLayerThawCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerThawCmd.js +6 -61
- package/lib/command/layer/AcApLayerThawCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerUnisoCmd.d.ts +2 -37
- package/lib/command/layer/AcApLayerUnisoCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerUnisoCmd.js +7 -108
- package/lib/command/layer/AcApLayerUnisoCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerUnlockCmd.d.ts +2 -33
- package/lib/command/layer/AcApLayerUnlockCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerUnlockCmd.js +18 -55
- package/lib/command/layer/AcApLayerUnlockCmd.js.map +1 -1
- package/lib/command/modify/AcApCopyCmd.d.ts +12 -0
- package/lib/command/modify/AcApCopyCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApCopyCmd.js +67 -177
- package/lib/command/modify/AcApCopyCmd.js.map +1 -1
- package/lib/command/modify/AcApCopyPreviewJig.d.ts +21 -0
- package/lib/command/modify/AcApCopyPreviewJig.d.ts.map +1 -0
- package/lib/command/modify/AcApCopyPreviewJig.js +61 -0
- package/lib/command/modify/AcApCopyPreviewJig.js.map +1 -0
- package/lib/command/modify/AcApEraseCmd.d.ts +0 -6
- package/lib/command/modify/AcApEraseCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApEraseCmd.js +11 -38
- package/lib/command/modify/AcApEraseCmd.js.map +1 -1
- package/lib/command/modify/AcApHideObjectsCmd.d.ts +0 -7
- package/lib/command/modify/AcApHideObjectsCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApHideObjectsCmd.js +0 -7
- package/lib/command/modify/AcApHideObjectsCmd.js.map +1 -1
- package/lib/command/modify/AcApMoveCmd.d.ts +0 -6
- package/lib/command/modify/AcApMoveCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApMoveCmd.js +26 -105
- package/lib/command/modify/AcApMoveCmd.js.map +1 -1
- package/lib/command/modify/AcApMovePreviewJig.d.ts +18 -0
- package/lib/command/modify/AcApMovePreviewJig.d.ts.map +1 -0
- package/lib/command/modify/AcApMovePreviewJig.js +45 -0
- package/lib/command/modify/AcApMovePreviewJig.js.map +1 -0
- package/lib/command/modify/AcApOffsetCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApOffsetCmd.js +5 -33
- package/lib/command/modify/AcApOffsetCmd.js.map +1 -1
- package/lib/command/modify/AcApRotateCmd.d.ts +2 -2
- package/lib/command/modify/AcApRotateCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApRotateCmd.js +37 -200
- package/lib/command/modify/AcApRotateCmd.js.map +1 -1
- package/lib/command/modify/AcApRotatePreviewJig.d.ts +47 -0
- package/lib/command/modify/AcApRotatePreviewJig.d.ts.map +1 -0
- package/lib/command/modify/AcApRotatePreviewJig.js +97 -0
- package/lib/command/modify/AcApRotatePreviewJig.js.map +1 -0
- package/lib/editor/command/AcEdCommand.d.ts +8 -0
- package/lib/editor/command/AcEdCommand.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommand.js +48 -5
- package/lib/editor/command/AcEdCommand.js.map +1 -1
- package/lib/editor/global/eventBus.d.ts +10 -2
- package/lib/editor/global/eventBus.d.ts.map +1 -1
- package/lib/editor/global/eventBus.js.map +1 -1
- package/lib/editor/grip/AcEdGripAppearance.d.ts +18 -0
- package/lib/editor/grip/AcEdGripAppearance.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripAppearance.js +30 -0
- package/lib/editor/grip/AcEdGripAppearance.js.map +1 -0
- package/lib/editor/grip/AcEdGripEditSession.d.ts.map +1 -1
- package/lib/editor/grip/AcEdGripEditSession.js +9 -2
- package/lib/editor/grip/AcEdGripEditSession.js.map +1 -1
- package/lib/editor/grip/AcEdGripHandle.d.ts +3 -2
- package/lib/editor/grip/AcEdGripHandle.d.ts.map +1 -1
- package/lib/editor/grip/AcEdGripHandle.js +9 -6
- package/lib/editor/grip/AcEdGripHandle.js.map +1 -1
- package/lib/editor/grip/AcEdGripManager.d.ts +13 -1
- package/lib/editor/grip/AcEdGripManager.d.ts.map +1 -1
- package/lib/editor/grip/AcEdGripManager.js +54 -14
- package/lib/editor/grip/AcEdGripManager.js.map +1 -1
- package/lib/editor/input/AcEdBatchPreview.d.ts +96 -0
- package/lib/editor/input/AcEdBatchPreview.d.ts.map +1 -0
- package/lib/editor/input/AcEdBatchPreview.js +125 -0
- package/lib/editor/input/AcEdBatchPreview.js.map +1 -0
- package/lib/editor/input/AcEdPreviewJig.d.ts +1 -1
- package/lib/editor/input/AcEdPreviewJig.d.ts.map +1 -1
- package/lib/editor/input/AcEdPreviewJig.js +14 -0
- package/lib/editor/input/AcEdPreviewJig.js.map +1 -1
- package/lib/editor/input/AcEdSelectionPreviewJig.d.ts +109 -0
- package/lib/editor/input/AcEdSelectionPreviewJig.d.ts.map +1 -0
- package/lib/editor/input/AcEdSelectionPreviewJig.js +185 -0
- package/lib/editor/input/AcEdSelectionPreviewJig.js.map +1 -0
- package/lib/editor/input/index.d.ts +2 -0
- package/lib/editor/input/index.d.ts.map +1 -1
- package/lib/editor/input/index.js +2 -0
- package/lib/editor/input/index.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts +7 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +17 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBox.js +10 -2
- package/lib/editor/input/ui/AcEdFloatingInputBox.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js +9 -4
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js.map +1 -1
- package/lib/editor/view/AcEdBaseView.d.ts +37 -2
- package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
- package/lib/editor/view/AcEdBaseView.js +14 -12
- package/lib/editor/view/AcEdBaseView.js.map +1 -1
- package/lib/editor/view/AcEdSpatialQueryResult.d.ts +28 -0
- package/lib/editor/view/AcEdSpatialQueryResult.d.ts.map +1 -1
- package/lib/editor/view/AcEdSpatialQueryResult.js +65 -1
- package/lib/editor/view/AcEdSpatialQueryResult.js.map +1 -1
- package/lib/i18n/AcApI18n.d.ts +42 -0
- package/lib/i18n/AcApI18n.d.ts.map +1 -1
- package/lib/i18n/AcApI18n.js +56 -4
- package/lib/i18n/AcApI18n.js.map +1 -1
- package/lib/i18n/en/command.d.ts +23 -0
- package/lib/i18n/en/command.d.ts.map +1 -1
- package/lib/i18n/en/command.js +23 -0
- package/lib/i18n/en/command.js.map +1 -1
- package/lib/i18n/zh/command.d.ts +23 -0
- package/lib/i18n/zh/command.d.ts.map +1 -1
- package/lib/i18n/zh/command.js +23 -0
- package/lib/i18n/zh/command.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/service/AcApEntitySelection.d.ts +42 -0
- package/lib/service/AcApEntitySelection.d.ts.map +1 -0
- package/lib/service/AcApEntitySelection.js +156 -0
- package/lib/service/AcApEntitySelection.js.map +1 -0
- package/lib/service/AcApEntityService.d.ts +115 -0
- package/lib/service/AcApEntityService.d.ts.map +1 -0
- package/lib/service/AcApEntityService.js +194 -0
- package/lib/service/AcApEntityService.js.map +1 -0
- package/lib/{command/layer → service}/AcApLayerIsoState.d.ts +6 -24
- package/lib/service/AcApLayerIsoState.d.ts.map +1 -0
- package/lib/service/AcApLayerIsoState.js +28 -0
- package/lib/service/AcApLayerIsoState.js.map +1 -0
- package/lib/service/AcApLayerService.d.ts +400 -0
- package/lib/service/AcApLayerService.d.ts.map +1 -0
- package/lib/service/AcApLayerService.js +1240 -0
- package/lib/service/AcApLayerService.js.map +1 -0
- package/lib/service/AcApLayerStore.d.ts +198 -0
- package/lib/service/AcApLayerStore.d.ts.map +1 -0
- package/lib/service/AcApLayerStore.js +335 -0
- package/lib/service/AcApLayerStore.js.map +1 -0
- package/lib/service/AcApServiceEdit.d.ts +18 -0
- package/lib/service/AcApServiceEdit.d.ts.map +1 -0
- package/lib/service/AcApServiceEdit.js +34 -0
- package/lib/service/AcApServiceEdit.js.map +1 -0
- package/lib/service/index.d.ts +16 -0
- package/lib/service/index.d.ts.map +1 -0
- package/lib/service/index.js +16 -0
- package/lib/service/index.js.map +1 -0
- package/lib/service/types.d.ts +116 -0
- package/lib/service/types.d.ts.map +1 -0
- package/lib/service/types.js +5 -0
- package/lib/service/types.js.map +1 -0
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts +21 -6
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js +56 -10
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js.map +1 -1
- package/lib/spatialIndex/AcTrLinearSpatialIndex.d.ts +2 -2
- package/lib/spatialIndex/AcTrLinearSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrLinearSpatialIndex.js +9 -3
- package/lib/spatialIndex/AcTrLinearSpatialIndex.js.map +1 -1
- package/lib/spatialIndex/AcTrRBushSpatialIndex.d.ts +2 -2
- package/lib/spatialIndex/AcTrRBushSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrRBushSpatialIndex.js +19 -5
- package/lib/spatialIndex/AcTrRBushSpatialIndex.js.map +1 -1
- package/lib/spatialIndex/AcTrSpatialIndex.d.ts +10 -1
- package/lib/spatialIndex/AcTrSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrSpatialIndex.js +7 -1
- package/lib/spatialIndex/AcTrSpatialIndex.js.map +1 -1
- package/lib/util/AcApDatabaseEdit.d.ts +11 -0
- package/lib/util/AcApDatabaseEdit.d.ts.map +1 -0
- package/lib/util/AcApDatabaseEdit.js +20 -0
- package/lib/util/AcApDatabaseEdit.js.map +1 -0
- package/lib/util/AcApGeTransform.d.ts +10 -0
- package/lib/util/AcApGeTransform.d.ts.map +1 -0
- package/lib/util/AcApGeTransform.js +15 -0
- package/lib/util/AcApGeTransform.js.map +1 -0
- package/lib/util/index.d.ts +2 -0
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +2 -0
- package/lib/util/index.js.map +1 -1
- package/lib/view/AcEdViewKeyHandler.d.ts +32 -0
- package/lib/view/AcEdViewKeyHandler.d.ts.map +1 -0
- package/lib/view/AcEdViewKeyHandler.js +101 -0
- package/lib/view/AcEdViewKeyHandler.js.map +1 -0
- package/lib/view/AcTrGroupWcsBboxAssert.d.ts +16 -0
- package/lib/view/AcTrGroupWcsBboxAssert.d.ts.map +1 -1
- package/lib/view/AcTrGroupWcsBboxAssert.js +19 -0
- package/lib/view/AcTrGroupWcsBboxAssert.js.map +1 -1
- package/lib/view/AcTrInheritedLayerMaterialMapper.d.ts +49 -0
- package/lib/view/AcTrInheritedLayerMaterialMapper.d.ts.map +1 -0
- package/lib/view/AcTrInheritedLayerMaterialMapper.js +138 -0
- package/lib/view/AcTrInheritedLayerMaterialMapper.js.map +1 -0
- package/lib/view/AcTrLayer.d.ts +26 -2
- package/lib/view/AcTrLayer.d.ts.map +1 -1
- package/lib/view/AcTrLayer.js +64 -0
- package/lib/view/AcTrLayer.js.map +1 -1
- package/lib/view/AcTrLayerAppearanceController.d.ts +55 -0
- package/lib/view/AcTrLayerAppearanceController.d.ts.map +1 -0
- package/lib/view/AcTrLayerAppearanceController.js +86 -0
- package/lib/view/AcTrLayerAppearanceController.js.map +1 -0
- package/lib/view/AcTrLayout.d.ts +36 -1
- package/lib/view/AcTrLayout.d.ts.map +1 -1
- package/lib/view/AcTrLayout.js +160 -14
- package/lib/view/AcTrLayout.js.map +1 -1
- package/lib/view/AcTrScene.d.ts +47 -1
- package/lib/view/AcTrScene.d.ts.map +1 -1
- package/lib/view/AcTrScene.js +78 -3
- package/lib/view/AcTrScene.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +50 -53
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +195 -312
- package/lib/view/AcTrView2d.js.map +1 -1
- package/lib/view/index.d.ts +3 -0
- package/lib/view/index.d.ts.map +1 -1
- package/lib/view/index.js +3 -0
- package/lib/view/index.js.map +1 -1
- package/package.json +7 -7
- package/lib/command/layer/AcApLayerIsoState.d.ts.map +0 -1
- package/lib/command/layer/AcApLayerIsoState.js +0 -53
- package/lib/command/layer/AcApLayerIsoState.js.map +0 -1
|
@@ -1,30 +1,10 @@
|
|
|
1
1
|
import { AcApContext } from '../../app';
|
|
2
|
-
import {
|
|
2
|
+
import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
|
|
3
3
|
/**
|
|
4
4
|
* AutoCAD-like `LAYTHW` command.
|
|
5
|
-
*
|
|
6
|
-
* The command thaws every frozen layer in the current drawing by clearing the
|
|
7
|
-
* global frozen flag. Per-viewport layer freeze state is not represented in
|
|
8
|
-
* the current viewer, matching the command to database-wide layer thawing only.
|
|
9
5
|
*/
|
|
10
|
-
export declare class AcApLayerThawCmd extends
|
|
11
|
-
/**
|
|
12
|
-
* Creates a write-enabled `LAYTHW` command instance.
|
|
13
|
-
*/
|
|
6
|
+
export declare class AcApLayerThawCmd extends AcApLayerMutationCmd {
|
|
14
7
|
constructor();
|
|
15
|
-
/**
|
|
16
|
-
* Runs the thaw-all-layers workflow.
|
|
17
|
-
*
|
|
18
|
-
* @param context - Active application context used to update the current drawing.
|
|
19
|
-
* @returns Resolves when all layer states have been processed.
|
|
20
|
-
*/
|
|
21
8
|
execute(context: AcApContext): Promise<void>;
|
|
22
|
-
/**
|
|
23
|
-
* Clears or sets the frozen bit while preserving other layer flags.
|
|
24
|
-
*
|
|
25
|
-
* @param layer - Target layer table record.
|
|
26
|
-
* @param frozen - Whether the layer should be marked frozen.
|
|
27
|
-
*/
|
|
28
|
-
private setLayerFrozen;
|
|
29
9
|
}
|
|
30
10
|
//# sourceMappingURL=AcApLayerThawCmd.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApLayerThawCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerThawCmd.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AcApLayerThawCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerThawCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAIvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,oBAAoB;;IAMlD,OAAO,CAAC,OAAO,EAAE,WAAW;CAWnC"}
|
|
@@ -49,69 +49,25 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49
49
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
|
|
53
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
54
|
-
if (!m) return o;
|
|
55
|
-
var i = m.call(o), r, ar = [], e;
|
|
56
|
-
try {
|
|
57
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
58
|
-
}
|
|
59
|
-
catch (error) { e = { error: error }; }
|
|
60
|
-
finally {
|
|
61
|
-
try {
|
|
62
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
63
|
-
}
|
|
64
|
-
finally { if (e) throw e.error; }
|
|
65
|
-
}
|
|
66
|
-
return ar;
|
|
67
|
-
};
|
|
68
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
69
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
70
|
-
if (ar || !(i in from)) {
|
|
71
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
72
|
-
ar[i] = from[i];
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
76
|
-
};
|
|
77
|
-
import { AcEdCommand, AcEdOpenMode } from '../../editor';
|
|
52
|
+
import { AcEdOpenMode } from '../../editor';
|
|
78
53
|
import { AcApI18n } from '../../i18n';
|
|
54
|
+
import { AcApLayerService } from '../../service';
|
|
55
|
+
import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
|
|
79
56
|
/**
|
|
80
57
|
* AutoCAD-like `LAYTHW` command.
|
|
81
|
-
*
|
|
82
|
-
* The command thaws every frozen layer in the current drawing by clearing the
|
|
83
|
-
* global frozen flag. Per-viewport layer freeze state is not represented in
|
|
84
|
-
* the current viewer, matching the command to database-wide layer thawing only.
|
|
85
58
|
*/
|
|
86
59
|
var AcApLayerThawCmd = /** @class */ (function (_super) {
|
|
87
60
|
__extends(AcApLayerThawCmd, _super);
|
|
88
|
-
/**
|
|
89
|
-
* Creates a write-enabled `LAYTHW` command instance.
|
|
90
|
-
*/
|
|
91
61
|
function AcApLayerThawCmd() {
|
|
92
62
|
var _this = _super.call(this) || this;
|
|
93
63
|
_this.mode = AcEdOpenMode.Write;
|
|
94
64
|
return _this;
|
|
95
65
|
}
|
|
96
|
-
/**
|
|
97
|
-
* Runs the thaw-all-layers workflow.
|
|
98
|
-
*
|
|
99
|
-
* @param context - Active application context used to update the current drawing.
|
|
100
|
-
* @returns Resolves when all layer states have been processed.
|
|
101
|
-
*/
|
|
102
66
|
AcApLayerThawCmd.prototype.execute = function (context) {
|
|
103
67
|
return __awaiter(this, void 0, void 0, function () {
|
|
104
|
-
var
|
|
105
|
-
var _this = this;
|
|
68
|
+
var thawed;
|
|
106
69
|
return __generator(this, function (_a) {
|
|
107
|
-
|
|
108
|
-
thawed = 0;
|
|
109
|
-
layers.forEach(function (layer) {
|
|
110
|
-
if (!layer.isFrozen)
|
|
111
|
-
return;
|
|
112
|
-
_this.setLayerFrozen(layer, false);
|
|
113
|
-
thawed++;
|
|
114
|
-
});
|
|
70
|
+
thawed = new AcApLayerService(context.doc.database).thawAllLayers();
|
|
115
71
|
context.view.selectionSet.clear();
|
|
116
72
|
if (thawed === 0) {
|
|
117
73
|
this.showMessage(AcApI18n.t('jig.laythw.alreadyThawed'));
|
|
@@ -122,18 +78,7 @@ var AcApLayerThawCmd = /** @class */ (function (_super) {
|
|
|
122
78
|
});
|
|
123
79
|
});
|
|
124
80
|
};
|
|
125
|
-
/**
|
|
126
|
-
* Clears or sets the frozen bit while preserving other layer flags.
|
|
127
|
-
*
|
|
128
|
-
* @param layer - Target layer table record.
|
|
129
|
-
* @param frozen - Whether the layer should be marked frozen.
|
|
130
|
-
*/
|
|
131
|
-
AcApLayerThawCmd.prototype.setLayerFrozen = function (layer, frozen) {
|
|
132
|
-
var _a;
|
|
133
|
-
var flags = (_a = layer.standardFlags) !== null && _a !== void 0 ? _a : 0;
|
|
134
|
-
layer.standardFlags = frozen ? flags | 0x01 : flags & ~0x01;
|
|
135
|
-
};
|
|
136
81
|
return AcApLayerThawCmd;
|
|
137
|
-
}(
|
|
82
|
+
}(AcApLayerMutationCmd));
|
|
138
83
|
export { AcApLayerThawCmd };
|
|
139
84
|
//# sourceMappingURL=AcApLayerThawCmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApLayerThawCmd.js","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerThawCmd.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AcApLayerThawCmd.js","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerThawCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH;IAAsC,oCAAoB;IACxD;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,IAAI,GAAG,YAAY,CAAC,KAAK,CAAA;;IAChC,CAAC;IAEK,kCAAO,GAAb,UAAc,OAAoB;;;;gBAC1B,MAAM,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,aAAa,EAAE,CAAA;gBACzE,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAA;gBAEjC,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC;oBACjB,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAA;oBACxD,sBAAM;gBACR,CAAC;gBAED,IAAI,CAAC,WAAW,CAAC,UAAG,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,eAAK,MAAM,CAAE,EAAE,SAAS,CAAC,CAAA;;;;KAC7E;IACH,uBAAC;AAAD,CAAC,AAjBD,CAAsC,oBAAoB,GAiBzD"}
|
|
@@ -1,45 +1,10 @@
|
|
|
1
1
|
import { AcApContext } from '../../app';
|
|
2
|
-
import {
|
|
2
|
+
import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
|
|
3
3
|
/**
|
|
4
4
|
* AutoCAD-like `LAYUNISO` command.
|
|
5
|
-
*
|
|
6
|
-
* The command restores the layer state captured by the previous `LAYISO`.
|
|
7
|
-
* It only reverts properties that still match the value applied by `LAYISO`,
|
|
8
|
-
* so layer edits made after isolation are retained.
|
|
9
5
|
*/
|
|
10
|
-
export declare class AcApLayerUnisoCmd extends
|
|
11
|
-
/**
|
|
12
|
-
* Creates a write-enabled `LAYUNISO` command instance.
|
|
13
|
-
*/
|
|
6
|
+
export declare class AcApLayerUnisoCmd extends AcApLayerMutationCmd {
|
|
14
7
|
constructor();
|
|
15
|
-
/**
|
|
16
|
-
* Restores the previous `LAYISO` layer state when available.
|
|
17
|
-
*
|
|
18
|
-
* @param context - Active application context used to update layer states.
|
|
19
|
-
* @returns Resolves after restoration is attempted.
|
|
20
|
-
*/
|
|
21
8
|
execute(context: AcApContext): Promise<void>;
|
|
22
|
-
/**
|
|
23
|
-
* Restores tracked layer flags that were not changed after `LAYISO`.
|
|
24
|
-
*
|
|
25
|
-
* @param layer - Layer to restore.
|
|
26
|
-
* @param snapshot - Before/after state captured for this layer by `LAYISO`.
|
|
27
|
-
* @returns `true` if any tracked flag was restored.
|
|
28
|
-
*/
|
|
29
|
-
private restoreLayerIfUnchanged;
|
|
30
|
-
/**
|
|
31
|
-
* Sets or clears the frozen bit while preserving other layer flags.
|
|
32
|
-
*
|
|
33
|
-
* @param layer - Target layer table record.
|
|
34
|
-
* @param frozen - Whether the layer should be marked frozen.
|
|
35
|
-
*/
|
|
36
|
-
private setLayerFrozen;
|
|
37
|
-
/**
|
|
38
|
-
* Sets or clears the locked bit while preserving other layer flags.
|
|
39
|
-
*
|
|
40
|
-
* @param layer - Target layer table record.
|
|
41
|
-
* @param locked - Whether the layer should be marked locked.
|
|
42
|
-
*/
|
|
43
|
-
private setLayerLocked;
|
|
44
9
|
}
|
|
45
10
|
//# sourceMappingURL=AcApLayerUnisoCmd.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApLayerUnisoCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerUnisoCmd.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AcApLayerUnisoCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerUnisoCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAGvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,oBAAoB;;IAMnD,OAAO,CAAC,OAAO,EAAE,WAAW;CAoBnC"}
|
|
@@ -49,81 +49,28 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49
49
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
|
|
53
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
54
|
-
if (m) return m.call(o);
|
|
55
|
-
if (o && typeof o.length === "number") return {
|
|
56
|
-
next: function () {
|
|
57
|
-
if (o && i >= o.length) o = void 0;
|
|
58
|
-
return { value: o && o[i++], done: !o };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
62
|
-
};
|
|
63
|
-
import { AcEdCommand, AcEdOpenMode } from '../../editor';
|
|
52
|
+
import { AcEdOpenMode } from '../../editor';
|
|
64
53
|
import { AcApI18n } from '../../i18n';
|
|
65
|
-
import {
|
|
54
|
+
import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
|
|
66
55
|
/**
|
|
67
56
|
* AutoCAD-like `LAYUNISO` command.
|
|
68
|
-
*
|
|
69
|
-
* The command restores the layer state captured by the previous `LAYISO`.
|
|
70
|
-
* It only reverts properties that still match the value applied by `LAYISO`,
|
|
71
|
-
* so layer edits made after isolation are retained.
|
|
72
57
|
*/
|
|
73
58
|
var AcApLayerUnisoCmd = /** @class */ (function (_super) {
|
|
74
59
|
__extends(AcApLayerUnisoCmd, _super);
|
|
75
|
-
/**
|
|
76
|
-
* Creates a write-enabled `LAYUNISO` command instance.
|
|
77
|
-
*/
|
|
78
60
|
function AcApLayerUnisoCmd() {
|
|
79
61
|
var _this = _super.call(this) || this;
|
|
80
62
|
_this.mode = AcEdOpenMode.Write;
|
|
81
63
|
return _this;
|
|
82
64
|
}
|
|
83
|
-
/**
|
|
84
|
-
* Restores the previous `LAYISO` layer state when available.
|
|
85
|
-
*
|
|
86
|
-
* @param context - Active application context used to update layer states.
|
|
87
|
-
* @returns Resolves after restoration is attempted.
|
|
88
|
-
*/
|
|
89
65
|
AcApLayerUnisoCmd.prototype.execute = function (context) {
|
|
90
66
|
return __awaiter(this, void 0, void 0, function () {
|
|
91
|
-
var
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (!snapshot) {
|
|
67
|
+
var restoredLayers;
|
|
68
|
+
return __generator(this, function (_a) {
|
|
69
|
+
restoredLayers = context.doc.unisolateLayers();
|
|
70
|
+
if (restoredLayers === undefined) {
|
|
96
71
|
this.showMessage(AcApI18n.t('jig.layuniso.noPrevious'), 'warning');
|
|
97
72
|
return [2 /*return*/];
|
|
98
73
|
}
|
|
99
|
-
db = context.doc.database;
|
|
100
|
-
table = db.tables.layerTable;
|
|
101
|
-
restoredLayers = 0;
|
|
102
|
-
try {
|
|
103
|
-
for (_a = __values(snapshot.layers), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
104
|
-
entry = _b.value;
|
|
105
|
-
layer = table.getAt(entry.name);
|
|
106
|
-
if (!layer) {
|
|
107
|
-
this.showMessage("".concat(AcApI18n.t('jig.layuniso.layerNotFound'), ": ").concat(entry.name), 'warning');
|
|
108
|
-
continue;
|
|
109
|
-
}
|
|
110
|
-
if (this.restoreLayerIfUnchanged(layer, entry)) {
|
|
111
|
-
restoredLayers++;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
116
|
-
finally {
|
|
117
|
-
try {
|
|
118
|
-
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
119
|
-
}
|
|
120
|
-
finally { if (e_1) throw e_1.error; }
|
|
121
|
-
}
|
|
122
|
-
if (db.clayer === snapshot.currentLayerAfter &&
|
|
123
|
-
snapshot.currentLayerBefore !== snapshot.currentLayerAfter &&
|
|
124
|
-
table.getAt(snapshot.currentLayerBefore)) {
|
|
125
|
-
db.clayer = snapshot.currentLayerBefore;
|
|
126
|
-
}
|
|
127
74
|
context.view.selectionSet.clear();
|
|
128
75
|
if (restoredLayers === 0) {
|
|
129
76
|
this.showMessage(AcApI18n.t('jig.layuniso.nothingRestored'));
|
|
@@ -134,55 +81,7 @@ var AcApLayerUnisoCmd = /** @class */ (function (_super) {
|
|
|
134
81
|
});
|
|
135
82
|
});
|
|
136
83
|
};
|
|
137
|
-
/**
|
|
138
|
-
* Restores tracked layer flags that were not changed after `LAYISO`.
|
|
139
|
-
*
|
|
140
|
-
* @param layer - Layer to restore.
|
|
141
|
-
* @param snapshot - Before/after state captured for this layer by `LAYISO`.
|
|
142
|
-
* @returns `true` if any tracked flag was restored.
|
|
143
|
-
*/
|
|
144
|
-
AcApLayerUnisoCmd.prototype.restoreLayerIfUnchanged = function (layer, snapshot) {
|
|
145
|
-
var restored = false;
|
|
146
|
-
if (layer.isOff === snapshot.isolated.isOff &&
|
|
147
|
-
layer.isOff !== snapshot.before.isOff) {
|
|
148
|
-
layer.isOff = snapshot.before.isOff;
|
|
149
|
-
restored = true;
|
|
150
|
-
}
|
|
151
|
-
if (layer.isFrozen === snapshot.isolated.isFrozen &&
|
|
152
|
-
layer.isFrozen !== snapshot.before.isFrozen) {
|
|
153
|
-
this.setLayerFrozen(layer, snapshot.before.isFrozen);
|
|
154
|
-
restored = true;
|
|
155
|
-
}
|
|
156
|
-
if (layer.isLocked === snapshot.isolated.isLocked &&
|
|
157
|
-
layer.isLocked !== snapshot.before.isLocked) {
|
|
158
|
-
this.setLayerLocked(layer, snapshot.before.isLocked);
|
|
159
|
-
restored = true;
|
|
160
|
-
}
|
|
161
|
-
return restored;
|
|
162
|
-
};
|
|
163
|
-
/**
|
|
164
|
-
* Sets or clears the frozen bit while preserving other layer flags.
|
|
165
|
-
*
|
|
166
|
-
* @param layer - Target layer table record.
|
|
167
|
-
* @param frozen - Whether the layer should be marked frozen.
|
|
168
|
-
*/
|
|
169
|
-
AcApLayerUnisoCmd.prototype.setLayerFrozen = function (layer, frozen) {
|
|
170
|
-
var _a;
|
|
171
|
-
var flags = (_a = layer.standardFlags) !== null && _a !== void 0 ? _a : 0;
|
|
172
|
-
layer.standardFlags = frozen ? flags | 0x01 : flags & ~0x01;
|
|
173
|
-
};
|
|
174
|
-
/**
|
|
175
|
-
* Sets or clears the locked bit while preserving other layer flags.
|
|
176
|
-
*
|
|
177
|
-
* @param layer - Target layer table record.
|
|
178
|
-
* @param locked - Whether the layer should be marked locked.
|
|
179
|
-
*/
|
|
180
|
-
AcApLayerUnisoCmd.prototype.setLayerLocked = function (layer, locked) {
|
|
181
|
-
var _a;
|
|
182
|
-
var flags = (_a = layer.standardFlags) !== null && _a !== void 0 ? _a : 0;
|
|
183
|
-
layer.standardFlags = locked ? flags | 0x04 : flags & ~0x04;
|
|
184
|
-
};
|
|
185
84
|
return AcApLayerUnisoCmd;
|
|
186
|
-
}(
|
|
85
|
+
}(AcApLayerMutationCmd));
|
|
187
86
|
export { AcApLayerUnisoCmd };
|
|
188
87
|
//# sourceMappingURL=AcApLayerUnisoCmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApLayerUnisoCmd.js","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerUnisoCmd.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AcApLayerUnisoCmd.js","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerUnisoCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH;IAAuC,qCAAoB;IACzD;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,IAAI,GAAG,YAAY,CAAC,KAAK,CAAA;;IAChC,CAAC;IAEK,mCAAO,GAAb,UAAc,OAAoB;;;;gBAC1B,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,CAAA;gBAEpD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;oBACjC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,EAAE,SAAS,CAAC,CAAA;oBAClE,sBAAM;gBACR,CAAC;gBAED,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAA;gBAEjC,IAAI,cAAc,KAAK,CAAC,EAAE,CAAC;oBACzB,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAA;oBAC5D,sBAAM;gBACR,CAAC;gBAED,IAAI,CAAC,WAAW,CACd,UAAG,QAAQ,CAAC,CAAC,CAAC,uBAAuB,CAAC,eAAK,cAAc,CAAE,EAC3D,SAAS,CACV,CAAA;;;;KACF;IACH,wBAAC;AAAD,CAAC,AA1BD,CAAuC,oBAAoB,GA0B1D"}
|
|
@@ -1,43 +1,12 @@
|
|
|
1
1
|
import { AcApContext } from '../../app';
|
|
2
|
-
import {
|
|
2
|
+
import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
|
|
3
3
|
/**
|
|
4
4
|
* AutoCAD-like `LAYULK` command.
|
|
5
|
-
*
|
|
6
|
-
* The command repeatedly asks the user to pick an entity and unlocks the
|
|
7
|
-
* corresponding layer. It intentionally works by selection instead of layer
|
|
8
|
-
* name entry, matching AutoCAD's `LAYULK` workflow.
|
|
9
5
|
*/
|
|
10
|
-
export declare class AcApLayerUnlockCmd extends
|
|
11
|
-
/**
|
|
12
|
-
* Creates a write-enabled `LAYULK` command instance.
|
|
13
|
-
*/
|
|
6
|
+
export declare class AcApLayerUnlockCmd extends AcApLayerMutationCmd {
|
|
14
7
|
constructor();
|
|
15
|
-
/**
|
|
16
|
-
* Runs the interactive unlock-layer workflow until the user cancels.
|
|
17
|
-
*
|
|
18
|
-
* @param context - Active application context used to read and update the current drawing.
|
|
19
|
-
* @returns Resolves when the command loop ends.
|
|
20
|
-
*/
|
|
21
8
|
execute(context: AcApContext): Promise<void>;
|
|
22
|
-
/**
|
|
23
|
-
* Prompts for one entity whose layer should be unlocked.
|
|
24
|
-
*
|
|
25
|
-
* @returns Picked entity identifier, or `undefined` when the user cancels.
|
|
26
|
-
*/
|
|
27
9
|
private promptSelection;
|
|
28
|
-
/**
|
|
29
|
-
* Sets or clears the locked bit in `standardFlags`.
|
|
30
|
-
*
|
|
31
|
-
* @param layer - Target layer table record.
|
|
32
|
-
* @param locked - `true` to lock, `false` to unlock.
|
|
33
|
-
*/
|
|
34
|
-
private setLayerLocked;
|
|
35
|
-
/**
|
|
36
|
-
* Resolves the picked entity's layer and unlocks it when needed.
|
|
37
|
-
*
|
|
38
|
-
* @param context - Active application context containing the current database and view.
|
|
39
|
-
* @param objectId - Identifier of the entity selected by the user.
|
|
40
|
-
*/
|
|
41
10
|
private unlockEntityLayer;
|
|
42
11
|
}
|
|
43
12
|
//# sourceMappingURL=AcApLayerUnlockCmd.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApLayerUnlockCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerUnlockCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAkB,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"AcApLayerUnlockCmd.d.ts","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerUnlockCmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAkB,MAAM,WAAW,CAAA;AAQvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,oBAAoB;;IAMpD,OAAO,CAAC,OAAO,EAAE,WAAW;YASpB,eAAe;IAc7B,OAAO,CAAC,iBAAiB;CA+B1B"}
|
|
@@ -50,31 +50,20 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
import { AcApDocManager } from '../../app';
|
|
53
|
-
import {
|
|
53
|
+
import { AcEdOpenMode, AcEdPromptEntityOptions, AcEdPromptStatus } from '../../editor';
|
|
54
54
|
import { AcApI18n } from '../../i18n';
|
|
55
|
+
import { AcApLayerService } from '../../service';
|
|
56
|
+
import { AcApLayerMutationCmd } from './AcApLayerMutationCmd';
|
|
55
57
|
/**
|
|
56
58
|
* AutoCAD-like `LAYULK` command.
|
|
57
|
-
*
|
|
58
|
-
* The command repeatedly asks the user to pick an entity and unlocks the
|
|
59
|
-
* corresponding layer. It intentionally works by selection instead of layer
|
|
60
|
-
* name entry, matching AutoCAD's `LAYULK` workflow.
|
|
61
59
|
*/
|
|
62
60
|
var AcApLayerUnlockCmd = /** @class */ (function (_super) {
|
|
63
61
|
__extends(AcApLayerUnlockCmd, _super);
|
|
64
|
-
/**
|
|
65
|
-
* Creates a write-enabled `LAYULK` command instance.
|
|
66
|
-
*/
|
|
67
62
|
function AcApLayerUnlockCmd() {
|
|
68
63
|
var _this = _super.call(this) || this;
|
|
69
64
|
_this.mode = AcEdOpenMode.Write;
|
|
70
65
|
return _this;
|
|
71
66
|
}
|
|
72
|
-
/**
|
|
73
|
-
* Runs the interactive unlock-layer workflow until the user cancels.
|
|
74
|
-
*
|
|
75
|
-
* @param context - Active application context used to read and update the current drawing.
|
|
76
|
-
* @returns Resolves when the command loop ends.
|
|
77
|
-
*/
|
|
78
67
|
AcApLayerUnlockCmd.prototype.execute = function (context) {
|
|
79
68
|
return __awaiter(this, void 0, void 0, function () {
|
|
80
69
|
var objectId;
|
|
@@ -94,11 +83,6 @@ var AcApLayerUnlockCmd = /** @class */ (function (_super) {
|
|
|
94
83
|
});
|
|
95
84
|
});
|
|
96
85
|
};
|
|
97
|
-
/**
|
|
98
|
-
* Prompts for one entity whose layer should be unlocked.
|
|
99
|
-
*
|
|
100
|
-
* @returns Picked entity identifier, or `undefined` when the user cancels.
|
|
101
|
-
*/
|
|
102
86
|
AcApLayerUnlockCmd.prototype.promptSelection = function () {
|
|
103
87
|
return __awaiter(this, void 0, void 0, function () {
|
|
104
88
|
var prompt, result;
|
|
@@ -120,46 +104,25 @@ var AcApLayerUnlockCmd = /** @class */ (function (_super) {
|
|
|
120
104
|
});
|
|
121
105
|
});
|
|
122
106
|
};
|
|
123
|
-
/**
|
|
124
|
-
* Sets or clears the locked bit in `standardFlags`.
|
|
125
|
-
*
|
|
126
|
-
* @param layer - Target layer table record.
|
|
127
|
-
* @param locked - `true` to lock, `false` to unlock.
|
|
128
|
-
*/
|
|
129
|
-
AcApLayerUnlockCmd.prototype.setLayerLocked = function (layer, locked) {
|
|
130
|
-
var _a;
|
|
131
|
-
var flags = (_a = layer.standardFlags) !== null && _a !== void 0 ? _a : 0;
|
|
132
|
-
layer.standardFlags = locked ? flags | 0x04 : flags & ~0x04;
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* Resolves the picked entity's layer and unlocks it when needed.
|
|
136
|
-
*
|
|
137
|
-
* @param context - Active application context containing the current database and view.
|
|
138
|
-
* @param objectId - Identifier of the entity selected by the user.
|
|
139
|
-
*/
|
|
140
107
|
AcApLayerUnlockCmd.prototype.unlockEntityLayer = function (context, objectId) {
|
|
141
|
-
var
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
if (!layer.isLocked) {
|
|
155
|
-
this.showMessage("".concat(AcApI18n.t('jig.layulk.alreadyUnlocked'), ": ").concat(layer.name), 'info');
|
|
156
|
-
return;
|
|
108
|
+
var result = new AcApLayerService(context.doc.database).unlockLayerByEntity(objectId);
|
|
109
|
+
if (!result.ok) {
|
|
110
|
+
switch (result.reason) {
|
|
111
|
+
case 'invalid_selection':
|
|
112
|
+
this.showMessage(AcApI18n.t('jig.layulk.invalidSelection'), 'warning');
|
|
113
|
+
return;
|
|
114
|
+
case 'layer_not_found':
|
|
115
|
+
this.showMessage("".concat(AcApI18n.t('jig.layulk.layerNotFound'), ": ").concat(result.layerName), 'warning');
|
|
116
|
+
return;
|
|
117
|
+
case 'already_unlocked':
|
|
118
|
+
this.showMessage("".concat(AcApI18n.t('jig.layulk.alreadyUnlocked'), ": ").concat(result.layerName), 'info');
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
157
121
|
}
|
|
158
|
-
this.setLayerLocked(layer, false);
|
|
159
122
|
context.view.selectionSet.clear();
|
|
160
|
-
this.showMessage("".concat(AcApI18n.t('jig.layulk.unlocked'), ": ").concat(
|
|
123
|
+
this.showMessage("".concat(AcApI18n.t('jig.layulk.unlocked'), ": ").concat(result.layerName), 'success');
|
|
161
124
|
};
|
|
162
125
|
return AcApLayerUnlockCmd;
|
|
163
|
-
}(
|
|
126
|
+
}(AcApLayerMutationCmd));
|
|
164
127
|
export { AcApLayerUnlockCmd };
|
|
165
128
|
//# sourceMappingURL=AcApLayerUnlockCmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApLayerUnlockCmd.js","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerUnlockCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAe,cAAc,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"AcApLayerUnlockCmd.js","sourceRoot":"","sources":["../../../src/command/layer/AcApLayerUnlockCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAe,cAAc,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;GAEG;AACH;IAAwC,sCAAoB;IAC1D;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,IAAI,GAAG,YAAY,CAAC,KAAK,CAAA;;IAChC,CAAC;IAEK,oCAAO,GAAb,UAAc,OAAoB;;;;;;6BACzB,IAAI;wBACQ,qBAAM,IAAI,CAAC,eAAe,EAAE,EAAA;;wBAAvC,QAAQ,GAAG,SAA4B;wBAC7C,IAAI,CAAC,QAAQ;4BAAE,sBAAM;wBAErB,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;;;;;;KAE5C;IAEa,4CAAe,GAA7B;;;;;;wBACQ,MAAM,GAAG,IAAI,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAA;wBAC3E,MAAM,CAAC,SAAS,GAAG,IAAI,CAAA;wBACvB,MAAM,CAAC,wBAAwB,GAAG,IAAI,CAAA;wBACtC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAA;wBAEnD,qBAAM,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,EAAA;;wBAA/D,MAAM,GAAG,SAAsD;wBACrE,IAAI,MAAM,CAAC,MAAM,KAAK,gBAAgB,CAAC,EAAE,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;4BAC7D,sBAAO,MAAM,CAAC,QAAQ,EAAA;wBACxB,CAAC;wBAED,sBAAO,SAAS,EAAA;;;;KACjB;IAEO,8CAAiB,GAAzB,UAA0B,OAAoB,EAAE,QAAsB;QACpE,IAAM,MAAM,GAAG,IAAI,gBAAgB,CACjC,OAAO,CAAC,GAAG,CAAC,QAAQ,CACrB,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAA;QAE/B,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,QAAQ,MAAM,CAAC,MAAM,EAAE,CAAC;gBACtB,KAAK,mBAAmB;oBACtB,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,6BAA6B,CAAC,EAAE,SAAS,CAAC,CAAA;oBACtE,OAAM;gBACR,KAAK,iBAAiB;oBACpB,IAAI,CAAC,WAAW,CACd,UAAG,QAAQ,CAAC,CAAC,CAAC,0BAA0B,CAAC,eAAK,MAAM,CAAC,SAAS,CAAE,EAChE,SAAS,CACV,CAAA;oBACD,OAAM;gBACR,KAAK,kBAAkB;oBACrB,IAAI,CAAC,WAAW,CACd,UAAG,QAAQ,CAAC,CAAC,CAAC,4BAA4B,CAAC,eAAK,MAAM,CAAC,SAAS,CAAE,EAClE,MAAM,CACP,CAAA;oBACD,OAAM;YACV,CAAC;QACH,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,CAAC,WAAW,CACd,UAAG,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,eAAK,MAAM,CAAC,SAAS,CAAE,EAC3D,SAAS,CACV,CAAA;IACH,CAAC;IACH,yBAAC;AAAD,CAAC,AA5DD,CAAwC,oBAAoB,GA4D3D"}
|
|
@@ -40,6 +40,18 @@ export declare class AcApCopyCmd extends AcEdCommand {
|
|
|
40
40
|
* @returns Displacement assigned to the requested copy index.
|
|
41
41
|
*/
|
|
42
42
|
private scaleDisplacement;
|
|
43
|
+
/**
|
|
44
|
+
* Appends cloned entities to model space and shows them immediately in the view.
|
|
45
|
+
*
|
|
46
|
+
* Database edits during an active command transaction may not reach the view
|
|
47
|
+
* until the command ends. Explicit {@link AcEdBaseView.addEntity} keeps each
|
|
48
|
+
* placement visible while the COPY loop continues. All placements still share
|
|
49
|
+
* one undo mark from {@link AcEdCommand.trigger}.
|
|
50
|
+
*
|
|
51
|
+
* @param context - Active command context with database and view access
|
|
52
|
+
* @param copies - Cloned entities to append and display
|
|
53
|
+
*/
|
|
54
|
+
private appendCopies;
|
|
43
55
|
/**
|
|
44
56
|
* Clones source entities and translates each clone batch into its final position.
|
|
45
57
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApCopyCmd.d.ts","sourceRoot":"","sources":["../../../src/command/modify/AcApCopyCmd.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"AcApCopyCmd.d.ts","sourceRoot":"","sources":["../../../src/command/modify/AcApCopyCmd.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAkB,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,WAAW,EAOZ,MAAM,cAAc,CAAA;AAarB;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C,OAAO,CAAC,MAAM,CAAC,YAAY,CAAuB;IAElD;;OAEG;;IAMH;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAWlB;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;IAO3B;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;IASzB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,YAAY;IAQpB;;;;;;;;OAQG;IACH,OAAO,CAAC,WAAW;IA8BnB;;;;;OAKG;YACW,cAAc;IAuB5B;;;;;;;;;;;OAWG;YACW,oBAAoB;IAgFlC;;;;;;;;OAQG;YACW,eAAe;IAiE7B;;;;;;;;OAQG;IACG,OAAO,CAAC,OAAO,EAAE,WAAW;CAmFnC"}
|