@mlightcad/cad-simple-viewer 1.4.7 → 1.4.9
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/dist/index.js +7749 -6724
- package/dist/index.umd.cjs +23 -23
- package/lib/app/AcApAnnotation.d.ts +46 -0
- package/lib/app/AcApAnnotation.d.ts.map +1 -0
- package/lib/app/AcApAnnotation.js +134 -0
- package/lib/app/AcApAnnotation.js.map +1 -0
- package/lib/app/AcApDocManager.d.ts +118 -6
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +163 -7
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcApDocument.d.ts +16 -14
- package/lib/app/AcApDocument.d.ts.map +1 -1
- package/lib/app/AcApDocument.js +48 -31
- package/lib/app/AcApDocument.js.map +1 -1
- package/lib/app/AcApProgress.d.ts +8 -2
- package/lib/app/AcApProgress.d.ts.map +1 -1
- package/lib/app/AcApProgress.js +13 -7
- package/lib/app/AcApProgress.js.map +1 -1
- package/lib/app/AcDbOpenDatabaseOptions.d.ts +28 -0
- package/lib/app/AcDbOpenDatabaseOptions.d.ts.map +1 -0
- package/lib/app/AcDbOpenDatabaseOptions.js +2 -0
- package/lib/app/AcDbOpenDatabaseOptions.js.map +1 -0
- package/lib/app/index.d.ts +2 -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/AcApBaseRevCmd.d.ts +36 -0
- package/lib/command/AcApBaseRevCmd.d.ts.map +1 -0
- package/lib/command/AcApBaseRevCmd.js +68 -0
- package/lib/command/AcApBaseRevCmd.js.map +1 -0
- package/lib/command/AcApCircleCmd.d.ts +1 -0
- package/lib/command/AcApCircleCmd.d.ts.map +1 -1
- package/lib/command/AcApCircleCmd.js +4 -2
- package/lib/command/AcApCircleCmd.js.map +1 -1
- package/lib/command/AcApConvertToSvgCmd.d.ts +1 -1
- package/lib/command/AcApConvertToSvgCmd.d.ts.map +1 -1
- package/lib/command/AcApConvertToSvgCmd.js +44 -2
- package/lib/command/AcApConvertToSvgCmd.js.map +1 -1
- package/lib/command/AcApDimLinearCmd.d.ts +1 -0
- package/lib/command/AcApDimLinearCmd.d.ts.map +1 -1
- package/lib/command/AcApDimLinearCmd.js +4 -2
- package/lib/command/AcApDimLinearCmd.js.map +1 -1
- package/lib/command/AcApEraseCmd.d.ts +1 -0
- package/lib/command/AcApEraseCmd.d.ts.map +1 -1
- package/lib/command/AcApEraseCmd.js +14 -4
- package/lib/command/AcApEraseCmd.js.map +1 -1
- package/lib/command/AcApLineCmd.d.ts +1 -0
- package/lib/command/AcApLineCmd.d.ts.map +1 -1
- package/lib/command/AcApLineCmd.js +4 -2
- package/lib/command/AcApLineCmd.js.map +1 -1
- package/lib/command/AcApLogCmd.d.ts +1 -1
- package/lib/command/AcApLogCmd.d.ts.map +1 -1
- package/lib/command/AcApLogCmd.js +44 -3
- package/lib/command/AcApLogCmd.js.map +1 -1
- package/lib/command/AcApOpenCmd.d.ts +1 -1
- package/lib/command/AcApOpenCmd.d.ts.map +1 -1
- package/lib/command/AcApOpenCmd.js +42 -1
- package/lib/command/AcApOpenCmd.js.map +1 -1
- package/lib/command/AcApPanCmd.d.ts +1 -1
- package/lib/command/AcApPanCmd.d.ts.map +1 -1
- package/lib/command/AcApPanCmd.js +43 -2
- package/lib/command/AcApPanCmd.js.map +1 -1
- package/lib/command/AcApQNewCmd.d.ts +1 -1
- package/lib/command/AcApQNewCmd.d.ts.map +1 -1
- package/lib/command/AcApQNewCmd.js +44 -2
- package/lib/command/AcApQNewCmd.js.map +1 -1
- package/lib/command/AcApRectCmd.d.ts +23 -0
- package/lib/command/AcApRectCmd.d.ts.map +1 -0
- package/lib/command/AcApRectCmd.js +134 -0
- package/lib/command/AcApRectCmd.js.map +1 -0
- package/lib/command/AcApRegenCmd.d.ts +1 -1
- package/lib/command/AcApRegenCmd.d.ts.map +1 -1
- package/lib/command/AcApRegenCmd.js +42 -1
- package/lib/command/AcApRegenCmd.js.map +1 -1
- package/lib/command/AcApRevCircleCmd.d.ts +10 -0
- package/lib/command/AcApRevCircleCmd.d.ts.map +1 -0
- package/lib/command/AcApRevCircleCmd.js +83 -0
- package/lib/command/AcApRevCircleCmd.js.map +1 -0
- package/lib/command/AcApRevCloudCmd.d.ts +26 -0
- package/lib/command/AcApRevCloudCmd.d.ts.map +1 -0
- package/lib/command/AcApRevCloudCmd.js +234 -0
- package/lib/command/AcApRevCloudCmd.js.map +1 -0
- package/lib/command/AcApRevRectCmd.d.ts +10 -0
- package/lib/command/AcApRevRectCmd.d.ts.map +1 -0
- package/lib/command/AcApRevRectCmd.js +83 -0
- package/lib/command/AcApRevRectCmd.js.map +1 -0
- package/lib/command/AcApRevVisibilityCmd.d.ts +15 -0
- package/lib/command/AcApRevVisibilityCmd.d.ts.map +1 -0
- package/lib/command/AcApRevVisibilityCmd.js +90 -0
- package/lib/command/AcApRevVisibilityCmd.js.map +1 -0
- package/lib/command/AcApSelectCmd.d.ts +1 -1
- package/lib/command/AcApSelectCmd.d.ts.map +1 -1
- package/lib/command/AcApSelectCmd.js +43 -2
- package/lib/command/AcApSelectCmd.js.map +1 -1
- package/lib/command/AcApSketchCmd.d.ts +32 -0
- package/lib/command/AcApSketchCmd.d.ts.map +1 -0
- package/lib/command/AcApSketchCmd.js +171 -0
- package/lib/command/AcApSketchCmd.js.map +1 -0
- package/lib/command/AcApSwitchBgCmd.d.ts +14 -0
- package/lib/command/AcApSwitchBgCmd.d.ts.map +1 -0
- package/lib/command/AcApSwitchBgCmd.js +86 -0
- package/lib/command/AcApSwitchBgCmd.js.map +1 -0
- package/lib/command/AcApSysVarCmd.d.ts +2 -1
- package/lib/command/AcApSysVarCmd.d.ts.map +1 -1
- package/lib/command/AcApSysVarCmd.js +6 -5
- package/lib/command/AcApSysVarCmd.js.map +1 -1
- package/lib/command/AcApZoomCmd.d.ts +1 -1
- package/lib/command/AcApZoomCmd.d.ts.map +1 -1
- package/lib/command/AcApZoomCmd.js +42 -1
- package/lib/command/AcApZoomCmd.js.map +1 -1
- package/lib/command/index.d.ts +8 -0
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +8 -0
- package/lib/command/index.js.map +1 -1
- package/lib/editor/command/AcEdCommand.d.ts +81 -22
- package/lib/editor/command/AcEdCommand.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommand.js +157 -15
- package/lib/editor/command/AcEdCommand.js.map +1 -1
- package/lib/editor/command/AcEdCommandIterator.d.ts +1 -1
- package/lib/editor/command/AcEdCommandIterator.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommandStack.d.ts +31 -6
- package/lib/editor/command/AcEdCommandStack.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommandStack.js +55 -11
- package/lib/editor/command/AcEdCommandStack.js.map +1 -1
- package/lib/editor/input/AcEditor.d.ts +14 -0
- package/lib/editor/input/AcEditor.d.ts.map +1 -1
- package/lib/editor/input/AcEditor.js +5 -1
- package/lib/editor/input/AcEditor.js.map +1 -1
- package/lib/editor/input/marker/AcEdMarker.d.ts +4 -1
- package/lib/editor/input/marker/AcEdMarker.d.ts.map +1 -1
- package/lib/editor/input/marker/AcEdMarker.js +11 -3
- package/lib/editor/input/marker/AcEdMarker.js.map +1 -1
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts.map +1 -1
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.js +6 -3
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.js.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.d.ts +2 -0
- package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.js +22 -5
- package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts +2 -1
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingMessage.d.ts +6 -4
- package/lib/editor/input/ui/AcEdFloatingMessage.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingMessage.js +19 -13
- package/lib/editor/input/ui/AcEdFloatingMessage.js.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.js +14 -7
- package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
- package/lib/editor/view/AcEdBaseView.d.ts +30 -2
- package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
- package/lib/editor/view/AcEdBaseView.js +42 -6
- package/lib/editor/view/AcEdBaseView.js.map +1 -1
- package/lib/editor/view/AcEdOpenMode.d.ts +26 -0
- package/lib/editor/view/AcEdOpenMode.d.ts.map +1 -0
- package/lib/editor/view/AcEdOpenMode.js +27 -0
- package/lib/editor/view/AcEdOpenMode.js.map +1 -0
- package/lib/editor/view/index.d.ts +2 -0
- package/lib/editor/view/index.d.ts.map +1 -1
- package/lib/editor/view/index.js +2 -0
- package/lib/editor/view/index.js.map +1 -1
- package/lib/i18n/en/command.d.ts +18 -0
- package/lib/i18n/en/command.d.ts.map +1 -1
- package/lib/i18n/en/command.js +19 -1
- package/lib/i18n/en/command.js.map +1 -1
- package/lib/i18n/en/jig.d.ts +8 -0
- package/lib/i18n/en/jig.d.ts.map +1 -1
- package/lib/i18n/en/jig.js +8 -0
- package/lib/i18n/en/jig.js.map +1 -1
- package/lib/i18n/zh/command.d.ts +18 -0
- package/lib/i18n/zh/command.d.ts.map +1 -1
- package/lib/i18n/zh/command.js +18 -0
- package/lib/i18n/zh/command.js.map +1 -1
- package/lib/i18n/zh/jig.d.ts +8 -0
- package/lib/i18n/zh/jig.d.ts.map +1 -1
- package/lib/i18n/zh/jig.js +8 -0
- package/lib/i18n/zh/jig.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/plugin/AcApPlugin.d.ts +83 -0
- package/lib/plugin/AcApPlugin.d.ts.map +1 -0
- package/lib/plugin/AcApPlugin.js +2 -0
- package/lib/plugin/AcApPlugin.js.map +1 -0
- package/lib/plugin/AcApPluginExample.d.ts +23 -0
- package/lib/plugin/AcApPluginExample.d.ts.map +1 -0
- package/lib/plugin/AcApPluginExample.js +160 -0
- package/lib/plugin/AcApPluginExample.js.map +1 -0
- package/lib/plugin/AcApPluginManager.d.ts +206 -0
- package/lib/plugin/AcApPluginManager.d.ts.map +1 -0
- package/lib/plugin/AcApPluginManager.js +499 -0
- package/lib/plugin/AcApPluginManager.js.map +1 -0
- package/lib/plugin/index.d.ts +4 -0
- package/lib/plugin/index.d.ts.map +1 -0
- package/lib/plugin/index.js +4 -0
- package/lib/plugin/index.js.map +1 -0
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +8 -1
- package/lib/view/AcTrView2d.js.map +1 -1
- package/package.json +5 -5
|
@@ -13,6 +13,42 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
13
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
14
|
};
|
|
15
15
|
})();
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
26
|
+
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);
|
|
27
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
28
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
|
+
function step(op) {
|
|
30
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
32
|
+
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;
|
|
33
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
|
+
switch (op[0]) {
|
|
35
|
+
case 0: case 1: t = op; break;
|
|
36
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
37
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
38
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
39
|
+
default:
|
|
40
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
41
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
42
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
43
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
44
|
+
if (t[2]) _.ops.pop();
|
|
45
|
+
_.trys.pop(); continue;
|
|
46
|
+
}
|
|
47
|
+
op = body.call(thisArg, _);
|
|
48
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
49
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
|
+
}
|
|
51
|
+
};
|
|
16
52
|
import { AcEdCommand } from '../command';
|
|
17
53
|
import { AcEdCorsorType, AcEdViewMode } from '../editor';
|
|
18
54
|
/**
|
|
@@ -46,8 +82,13 @@ var AcApPanCmd = /** @class */ (function (_super) {
|
|
|
46
82
|
* @param context - The application context containing the view
|
|
47
83
|
*/
|
|
48
84
|
AcApPanCmd.prototype.execute = function (context) {
|
|
49
|
-
|
|
50
|
-
|
|
85
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
86
|
+
return __generator(this, function (_a) {
|
|
87
|
+
context.view.mode = AcEdViewMode.PAN;
|
|
88
|
+
context.view.setCursor(AcEdCorsorType.Grab);
|
|
89
|
+
return [2 /*return*/];
|
|
90
|
+
});
|
|
91
|
+
});
|
|
51
92
|
};
|
|
52
93
|
return AcApPanCmd;
|
|
53
94
|
}(AcEdCommand));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApPanCmd.js","sourceRoot":"","sources":["../../src/command/AcApPanCmd.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AcApPanCmd.js","sourceRoot":"","sources":["../../src/command/AcApPanCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExD;;;;;;;;;;;;;;;;GAgBG;AACH;IAAgC,8BAAW;IAA3C;;IAaA,CAAC;IAZC;;;;;;;OAOG;IACG,4BAAO,GAAb,UAAc,OAAoB;;;gBAChC,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,GAAG,CAAA;gBACpC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;;;;KAC5C;IACH,iBAAC;AAAD,CAAC,AAbD,CAAgC,WAAW,GAa1C"}
|
|
@@ -27,6 +27,6 @@ export declare class AcApQNewCmd extends AcEdCommand {
|
|
|
27
27
|
*
|
|
28
28
|
* @param _context - The application context (unused in this command)
|
|
29
29
|
*/
|
|
30
|
-
execute(_context: AcApContext): void
|
|
30
|
+
execute(_context: AcApContext): Promise<void>;
|
|
31
31
|
}
|
|
32
32
|
//# sourceMappingURL=AcApQNewCmd.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApQNewCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApQNewCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAExC;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;OAOG;
|
|
1
|
+
{"version":3,"file":"AcApQNewCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApQNewCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAExC;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;OAOG;IACG,OAAO,CAAC,QAAQ,EAAE,WAAW;CAIpC"}
|
|
@@ -13,6 +13,42 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
13
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
14
|
};
|
|
15
15
|
})();
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
26
|
+
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);
|
|
27
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
28
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
|
+
function step(op) {
|
|
30
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
32
|
+
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;
|
|
33
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
|
+
switch (op[0]) {
|
|
35
|
+
case 0: case 1: t = op; break;
|
|
36
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
37
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
38
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
39
|
+
default:
|
|
40
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
41
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
42
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
43
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
44
|
+
if (t[2]) _.ops.pop();
|
|
45
|
+
_.trys.pop(); continue;
|
|
46
|
+
}
|
|
47
|
+
op = body.call(thisArg, _);
|
|
48
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
49
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
|
+
}
|
|
51
|
+
};
|
|
16
52
|
import { AcApDocManager } from '../app';
|
|
17
53
|
import { AcEdCommand } from '../command';
|
|
18
54
|
/**
|
|
@@ -47,8 +83,14 @@ var AcApQNewCmd = /** @class */ (function (_super) {
|
|
|
47
83
|
* @param _context - The application context (unused in this command)
|
|
48
84
|
*/
|
|
49
85
|
AcApQNewCmd.prototype.execute = function (_context) {
|
|
50
|
-
|
|
51
|
-
|
|
86
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
+
var baseUrl;
|
|
88
|
+
return __generator(this, function (_a) {
|
|
89
|
+
baseUrl = AcApDocManager.instance.baseUrl;
|
|
90
|
+
AcApDocManager.instance.openUrl(baseUrl + 'templates/acadiso.dxf');
|
|
91
|
+
return [2 /*return*/];
|
|
92
|
+
});
|
|
93
|
+
});
|
|
52
94
|
};
|
|
53
95
|
return AcApQNewCmd;
|
|
54
96
|
}(AcEdCommand));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApQNewCmd.js","sourceRoot":"","sources":["../../src/command/AcApQNewCmd.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AcApQNewCmd.js","sourceRoot":"","sources":["../../src/command/AcApQNewCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAExC;;;;;;;;;;;;;;;;;GAiBG;AACH;IAAiC,+BAAW;IAA5C;;IAaA,CAAC;IAZC;;;;;;;OAOG;IACG,6BAAO,GAAb,UAAc,QAAqB;;;;gBAC3B,OAAO,GAAG,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAA;gBAC/C,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,GAAG,uBAAuB,CAAC,CAAA;;;;KACnE;IACH,kBAAC;AAAD,CAAC,AAbD,CAAiC,WAAW,GAa3C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AcDbPolyline, AcGePoint2dLike } from '@mlightcad/data-model';
|
|
2
|
+
import { AcApContext } from '../app';
|
|
3
|
+
import { AcEdBaseView, AcEdCommand, AcEdPreviewJig } from '../editor';
|
|
4
|
+
export declare class AcApRectJig extends AcEdPreviewJig<AcGePoint2dLike> {
|
|
5
|
+
private _rect;
|
|
6
|
+
private _firstPoint;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a line jig.
|
|
9
|
+
*
|
|
10
|
+
* @param view - The associated view
|
|
11
|
+
*/
|
|
12
|
+
constructor(view: AcEdBaseView, start: AcGePoint2dLike);
|
|
13
|
+
get entity(): AcDbPolyline;
|
|
14
|
+
update(secondPoint: AcGePoint2dLike): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Command to create one rectangle.
|
|
18
|
+
*/
|
|
19
|
+
export declare class AcApRectCmd extends AcEdCommand {
|
|
20
|
+
constructor();
|
|
21
|
+
execute(context: AcApContext): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=AcApRectCmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApRectCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApRectCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,eAAe,EAChB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,WAAW,EAAkB,MAAM,QAAQ,CAAA;AACpD,OAAO,EACL,YAAY,EACZ,WAAW,EAEX,cAAc,EAEf,MAAM,WAAW,CAAA;AAqBlB,qBAAa,WAAY,SAAQ,cAAc,CAAC,eAAe,CAAC;IAC9D,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,WAAW,CAAa;IAEhC;;;;OAIG;gBACS,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe;IAMtD,IAAI,MAAM,IAAI,YAAY,CAEzB;IAED,MAAM,CAAC,WAAW,EAAE,eAAe;CAGpC;AAED;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;;IAMpC,OAAO,CAAC,OAAO,EAAE,WAAW;CAqBnC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
26
|
+
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);
|
|
27
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
28
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
|
+
function step(op) {
|
|
30
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
32
|
+
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;
|
|
33
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
|
+
switch (op[0]) {
|
|
35
|
+
case 0: case 1: t = op; break;
|
|
36
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
37
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
38
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
39
|
+
default:
|
|
40
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
41
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
42
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
43
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
44
|
+
if (t[2]) _.ops.pop();
|
|
45
|
+
_.trys.pop(); continue;
|
|
46
|
+
}
|
|
47
|
+
op = body.call(thisArg, _);
|
|
48
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
49
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
import { AcDbPolyline, AcGePoint2d } from '@mlightcad/data-model';
|
|
53
|
+
import { AcApDocManager } from '../app';
|
|
54
|
+
import { AcEdCommand, AcEdOpenMode, AcEdPreviewJig, AcEdPromptPointOptions } from '../editor';
|
|
55
|
+
import { AcApI18n } from '../i18n';
|
|
56
|
+
function updateRect(rect, firstPoint, secondPoint) {
|
|
57
|
+
rect.reset(false);
|
|
58
|
+
// Add four vertices to form a rectangle
|
|
59
|
+
// First vertex: the first point (one corner)
|
|
60
|
+
rect.addVertexAt(0, new AcGePoint2d(firstPoint));
|
|
61
|
+
// Second vertex: same Y as first point, X from current point
|
|
62
|
+
rect.addVertexAt(1, new AcGePoint2d(secondPoint.x, firstPoint.y));
|
|
63
|
+
// Third vertex: the current point (opposite corner)
|
|
64
|
+
rect.addVertexAt(2, new AcGePoint2d(secondPoint));
|
|
65
|
+
// Fourth vertex: same X as first point, Y from current point
|
|
66
|
+
rect.addVertexAt(3, new AcGePoint2d(firstPoint.x, secondPoint.y));
|
|
67
|
+
rect.closed = true;
|
|
68
|
+
}
|
|
69
|
+
var AcApRectJig = /** @class */ (function (_super) {
|
|
70
|
+
__extends(AcApRectJig, _super);
|
|
71
|
+
/**
|
|
72
|
+
* Creates a line jig.
|
|
73
|
+
*
|
|
74
|
+
* @param view - The associated view
|
|
75
|
+
*/
|
|
76
|
+
function AcApRectJig(view, start) {
|
|
77
|
+
var _this = _super.call(this, view) || this;
|
|
78
|
+
_this._rect = new AcDbPolyline();
|
|
79
|
+
_this._firstPoint = new AcGePoint2d(start);
|
|
80
|
+
return _this;
|
|
81
|
+
}
|
|
82
|
+
Object.defineProperty(AcApRectJig.prototype, "entity", {
|
|
83
|
+
get: function () {
|
|
84
|
+
return this._rect;
|
|
85
|
+
},
|
|
86
|
+
enumerable: false,
|
|
87
|
+
configurable: true
|
|
88
|
+
});
|
|
89
|
+
AcApRectJig.prototype.update = function (secondPoint) {
|
|
90
|
+
updateRect(this._rect, this._firstPoint, secondPoint);
|
|
91
|
+
};
|
|
92
|
+
return AcApRectJig;
|
|
93
|
+
}(AcEdPreviewJig));
|
|
94
|
+
export { AcApRectJig };
|
|
95
|
+
/**
|
|
96
|
+
* Command to create one rectangle.
|
|
97
|
+
*/
|
|
98
|
+
var AcApRectCmd = /** @class */ (function (_super) {
|
|
99
|
+
__extends(AcApRectCmd, _super);
|
|
100
|
+
function AcApRectCmd() {
|
|
101
|
+
var _this = _super.call(this) || this;
|
|
102
|
+
_this.mode = AcEdOpenMode.Write;
|
|
103
|
+
return _this;
|
|
104
|
+
}
|
|
105
|
+
AcApRectCmd.prototype.execute = function (context) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
107
|
+
var firstPointPrompt, firstPoint, secondPointPrompt, secondPoint, db, rect;
|
|
108
|
+
return __generator(this, function (_a) {
|
|
109
|
+
switch (_a.label) {
|
|
110
|
+
case 0:
|
|
111
|
+
firstPointPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.rect.firstPoint'));
|
|
112
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(firstPointPrompt)];
|
|
113
|
+
case 1:
|
|
114
|
+
firstPoint = _a.sent();
|
|
115
|
+
secondPointPrompt = new AcEdPromptPointOptions(AcApI18n.t('jig.rect.nextPoint'));
|
|
116
|
+
secondPointPrompt.jig = new AcApRectJig(context.view, firstPoint);
|
|
117
|
+
secondPointPrompt.useDashedLine = false;
|
|
118
|
+
secondPointPrompt.useBasePoint = true;
|
|
119
|
+
return [4 /*yield*/, AcApDocManager.instance.editor.getPoint(secondPointPrompt)];
|
|
120
|
+
case 2:
|
|
121
|
+
secondPoint = _a.sent();
|
|
122
|
+
db = context.doc.database;
|
|
123
|
+
rect = new AcDbPolyline();
|
|
124
|
+
updateRect(rect, firstPoint, secondPoint);
|
|
125
|
+
db.tables.blockTable.modelSpace.appendEntity(rect);
|
|
126
|
+
return [2 /*return*/];
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
return AcApRectCmd;
|
|
132
|
+
}(AcEdCommand));
|
|
133
|
+
export { AcApRectCmd };
|
|
134
|
+
//# sourceMappingURL=AcApRectCmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApRectCmd.js","sourceRoot":"","sources":["../../src/command/AcApRectCmd.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApRegenCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApRegenCmd.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,CAAA;AAE/B;;;;;;;;;;;;GAYG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;
|
|
1
|
+
{"version":3,"file":"AcApRegenCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApRegenCmd.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,CAAA;AAE/B;;;;;;;;;;;;GAYG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACG,OAAO;CAGd"}
|
|
@@ -13,6 +13,42 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
13
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
14
|
};
|
|
15
15
|
})();
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
26
|
+
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);
|
|
27
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
28
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
|
+
function step(op) {
|
|
30
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
32
|
+
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;
|
|
33
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
|
+
switch (op[0]) {
|
|
35
|
+
case 0: case 1: t = op; break;
|
|
36
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
37
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
38
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
39
|
+
default:
|
|
40
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
41
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
42
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
43
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
44
|
+
if (t[2]) _.ops.pop();
|
|
45
|
+
_.trys.pop(); continue;
|
|
46
|
+
}
|
|
47
|
+
op = body.call(thisArg, _);
|
|
48
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
49
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
|
+
}
|
|
51
|
+
};
|
|
16
52
|
import { AcApDocManager } from '../app';
|
|
17
53
|
import { AcEdCommand } from '.';
|
|
18
54
|
/**
|
|
@@ -37,7 +73,12 @@ var AcApRegenCmd = /** @class */ (function (_super) {
|
|
|
37
73
|
* Executes the regen command to redraw the current drawing
|
|
38
74
|
*/
|
|
39
75
|
AcApRegenCmd.prototype.execute = function () {
|
|
40
|
-
|
|
76
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
77
|
+
return __generator(this, function (_a) {
|
|
78
|
+
AcApDocManager.instance.regen();
|
|
79
|
+
return [2 /*return*/];
|
|
80
|
+
});
|
|
81
|
+
});
|
|
41
82
|
};
|
|
42
83
|
return AcApRegenCmd;
|
|
43
84
|
}(AcEdCommand));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApRegenCmd.js","sourceRoot":"","sources":["../../src/command/AcApRegenCmd.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AcApRegenCmd.js","sourceRoot":"","sources":["../../src/command/AcApRegenCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,CAAA;AAE/B;;;;;;;;;;;;GAYG;AACH;IAAkC,gCAAW;IAA7C;;IAOA,CAAC;IANC;;OAEG;IACG,8BAAO,GAAb;;;gBACE,cAAc,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAA;;;;KAChC;IACH,mBAAC;AAAD,CAAC,AAPD,CAAkC,WAAW,GAO5C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AcApContext } from '../app';
|
|
2
|
+
import { AcApBaseRevCmd } from './AcApBaseRevCmd';
|
|
3
|
+
/**
|
|
4
|
+
* Command to create one revision circle.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AcApRevCircleCmd extends AcApBaseRevCmd {
|
|
7
|
+
constructor();
|
|
8
|
+
execute(context: AcApContext): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=AcApRevCircleCmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApRevCircleCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApRevCircleCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGjD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,cAAc;;IAM5C,OAAO,CAAC,OAAO,EAAE,WAAW;CAInC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
26
|
+
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);
|
|
27
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
28
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
|
+
function step(op) {
|
|
30
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
32
|
+
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;
|
|
33
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
|
+
switch (op[0]) {
|
|
35
|
+
case 0: case 1: t = op; break;
|
|
36
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
37
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
38
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
39
|
+
default:
|
|
40
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
41
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
42
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
43
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
44
|
+
if (t[2]) _.ops.pop();
|
|
45
|
+
_.trys.pop(); continue;
|
|
46
|
+
}
|
|
47
|
+
op = body.call(thisArg, _);
|
|
48
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
49
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
import { AcEdOpenMode } from '../editor';
|
|
53
|
+
import { AcApBaseRevCmd } from './AcApBaseRevCmd';
|
|
54
|
+
import { AcApCircleCmd } from './AcApCircleCmd';
|
|
55
|
+
/**
|
|
56
|
+
* Command to create one revision circle.
|
|
57
|
+
*/
|
|
58
|
+
var AcApRevCircleCmd = /** @class */ (function (_super) {
|
|
59
|
+
__extends(AcApRevCircleCmd, _super);
|
|
60
|
+
function AcApRevCircleCmd() {
|
|
61
|
+
var _this = _super.call(this) || this;
|
|
62
|
+
_this.mode = AcEdOpenMode.Review;
|
|
63
|
+
return _this;
|
|
64
|
+
}
|
|
65
|
+
AcApRevCircleCmd.prototype.execute = function (context) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
+
var cmd;
|
|
68
|
+
return __generator(this, function (_a) {
|
|
69
|
+
switch (_a.label) {
|
|
70
|
+
case 0:
|
|
71
|
+
cmd = new AcApCircleCmd();
|
|
72
|
+
return [4 /*yield*/, cmd.execute(context)];
|
|
73
|
+
case 1:
|
|
74
|
+
_a.sent();
|
|
75
|
+
return [2 /*return*/];
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
return AcApRevCircleCmd;
|
|
81
|
+
}(AcApBaseRevCmd));
|
|
82
|
+
export { AcApRevCircleCmd };
|
|
83
|
+
//# sourceMappingURL=AcApRevCircleCmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApRevCircleCmd.js","sourceRoot":"","sources":["../../src/command/AcApRevCircleCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;GAEG;AACH;IAAsC,oCAAc;IAClD;QACE,YAAA,MAAK,WAAE,SAAA;QACP,KAAI,CAAC,IAAI,GAAG,YAAY,CAAC,MAAM,CAAA;;IACjC,CAAC;IAEK,kCAAO,GAAb,UAAc,OAAoB;;;;;;wBAC1B,GAAG,GAAG,IAAI,aAAa,EAAE,CAAA;wBAC/B,qBAAM,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,EAAA;;wBAA1B,SAA0B,CAAA;;;;;KAC3B;IACH,uBAAC;AAAD,CAAC,AAVD,CAAsC,cAAc,GAUnD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AcDbPolyline, AcGePoint2dLike } from '@mlightcad/data-model';
|
|
2
|
+
import { AcApContext } from '../app';
|
|
3
|
+
import { AcEdBaseView, AcEdPreviewJig } from '../editor';
|
|
4
|
+
import { AcApBaseRevCmd } from './AcApBaseRevCmd';
|
|
5
|
+
export declare class AcApRevCloudJig extends AcEdPreviewJig<AcGePoint2dLike> {
|
|
6
|
+
private _cloud;
|
|
7
|
+
private _firstPoint;
|
|
8
|
+
private _view;
|
|
9
|
+
/**
|
|
10
|
+
* Creates a cloud line jig.
|
|
11
|
+
*
|
|
12
|
+
* @param view - The associated view
|
|
13
|
+
* @param start - The first corner point
|
|
14
|
+
*/
|
|
15
|
+
constructor(view: AcEdBaseView, start: AcGePoint2dLike);
|
|
16
|
+
get entity(): AcDbPolyline;
|
|
17
|
+
update(secondPoint: AcGePoint2dLike): void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Command to create a revision cloud (cloud line) in rectangular shape.
|
|
21
|
+
*/
|
|
22
|
+
export declare class AcApRevCloudCmd extends AcApBaseRevCmd {
|
|
23
|
+
constructor();
|
|
24
|
+
execute(context: AcApContext): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=AcApRevCloudCmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApRevCloudCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApRevCloudCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,eAAe,EAChB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,WAAW,EAAkB,MAAM,QAAQ,CAAA;AACpD,OAAO,EACL,YAAY,EAEZ,cAAc,EAEf,MAAM,WAAW,CAAA;AAElB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAgJjD,qBAAa,eAAgB,SAAQ,cAAc,CAAC,eAAe,CAAC;IAClE,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,KAAK,CAAc;IAE3B;;;;;OAKG;gBACS,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe;IAOtD,IAAI,MAAM,IAAI,YAAY,CAEzB;IAED,MAAM,CAAC,WAAW,EAAE,eAAe;CAGpC;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,cAAc;;IAM3C,OAAO,CAAC,OAAO,EAAE,WAAW;CAqBnC"}
|