@mlightcad/cad-simple-viewer 1.2.4 → 1.2.5
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 +11406 -8892
- package/dist/index.umd.cjs +314 -24
- package/dist/libredwg-parser-worker.js +7267 -7238
- package/dist/mtext-renderer-worker.js +32 -9
- package/lib/app/AcApDocManager.d.ts +20 -3
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +66 -11
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcApProgress.d.ts +133 -0
- package/lib/app/AcApProgress.d.ts.map +1 -0
- package/lib/app/AcApProgress.js +148 -0
- package/lib/app/AcApProgress.js.map +1 -0
- package/lib/app/AcApSettingManager.d.ts +42 -0
- package/lib/app/AcApSettingManager.d.ts.map +1 -1
- package/lib/app/AcApSettingManager.js +63 -0
- package/lib/app/AcApSettingManager.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/AcApCircleCmd.d.ts +21 -0
- package/lib/command/AcApCircleCmd.d.ts.map +1 -0
- package/lib/command/AcApCircleCmd.js +115 -0
- package/lib/command/AcApCircleCmd.js.map +1 -0
- package/lib/command/AcApDimCmd.d.ts +57 -0
- package/lib/command/AcApDimCmd.d.ts.map +1 -0
- package/lib/command/AcApDimCmd.js +228 -0
- package/lib/command/AcApDimCmd.js.map +1 -0
- package/lib/command/AcApLogCmd.d.ts +13 -0
- package/lib/command/AcApLogCmd.d.ts.map +1 -0
- package/lib/command/AcApLogCmd.js +97 -0
- package/lib/command/AcApLogCmd.js.map +1 -0
- package/lib/command/AcApSysVarCmd.d.ts +15 -0
- package/lib/command/AcApSysVarCmd.d.ts.map +1 -0
- package/lib/command/AcApSysVarCmd.js +94 -0
- package/lib/command/AcApSysVarCmd.js.map +1 -0
- package/lib/command/AcApZoomToBoxCmd.d.ts +0 -36
- package/lib/command/AcApZoomToBoxCmd.d.ts.map +1 -1
- package/lib/command/AcApZoomToBoxCmd.js +4 -61
- package/lib/command/AcApZoomToBoxCmd.js.map +1 -1
- package/lib/command/index.d.ts +4 -0
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +4 -0
- package/lib/command/index.js.map +1 -1
- package/lib/editor/command/AcEdCommandStack.d.ts +19 -1
- package/lib/editor/command/AcEdCommandStack.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommandStack.js +40 -0
- package/lib/editor/command/AcEdCommandStack.js.map +1 -1
- package/lib/editor/input/AcEdCursorManager.d.ts +14 -30
- package/lib/editor/input/AcEdCursorManager.d.ts.map +1 -1
- package/lib/editor/input/AcEdCursorManager.js +32 -31
- package/lib/editor/input/AcEdCursorManager.js.map +1 -1
- package/lib/editor/input/AcEdPreviewJig.d.ts +103 -0
- package/lib/editor/input/AcEdPreviewJig.d.ts.map +1 -0
- package/lib/editor/input/AcEdPreviewJig.js +82 -0
- package/lib/editor/input/AcEdPreviewJig.js.map +1 -0
- package/lib/editor/input/AcEditor.d.ts +58 -11
- package/lib/editor/input/AcEditor.d.ts.map +1 -1
- package/lib/editor/input/AcEditor.js +86 -22
- package/lib/editor/input/AcEditor.js.map +1 -1
- package/lib/editor/input/handler/AcEdAngleHandler.d.ts +12 -0
- package/lib/editor/input/handler/AcEdAngleHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdAngleHandler.js +25 -0
- package/lib/editor/input/handler/AcEdAngleHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.d.ts +8 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.js +29 -0
- package/lib/editor/input/handler/AcEdDistanceHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.d.ts +7 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.js +28 -0
- package/lib/editor/input/handler/AcEdDoubleHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdInputHandler.d.ts +14 -0
- package/lib/editor/input/handler/AcEdInputHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdInputHandler.js +2 -0
- package/lib/editor/input/handler/AcEdInputHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.d.ts +11 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.js +44 -0
- package/lib/editor/input/handler/AcEdIntegerHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.d.ts +11 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.js +24 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdPointHandler.d.ts +16 -0
- package/lib/editor/input/handler/AcEdPointHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdPointHandler.js +19 -0
- package/lib/editor/input/handler/AcEdPointHandler.js.map +1 -0
- package/lib/editor/input/handler/AcEdStringHandler.d.ts +12 -0
- package/lib/editor/input/handler/AcEdStringHandler.d.ts.map +1 -0
- package/lib/editor/input/handler/AcEdStringHandler.js +24 -0
- package/lib/editor/input/handler/AcEdStringHandler.js.map +1 -0
- package/lib/editor/input/handler/index.d.ts +9 -0
- package/lib/editor/input/handler/index.d.ts.map +1 -0
- package/lib/editor/input/handler/index.js +9 -0
- package/lib/editor/input/handler/index.js.map +1 -0
- package/lib/editor/input/index.d.ts +4 -1
- package/lib/editor/input/index.d.ts.map +1 -1
- package/lib/editor/input/index.js +4 -1
- package/lib/editor/input/index.js.map +1 -1
- package/lib/editor/input/marker/AcEdMarker.d.ts +72 -0
- package/lib/editor/input/marker/AcEdMarker.d.ts.map +1 -0
- package/lib/editor/input/marker/AcEdMarker.js +124 -0
- package/lib/editor/input/marker/AcEdMarker.js.map +1 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts +52 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts.map +1 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.js +91 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.js.map +1 -0
- package/lib/editor/input/marker/index.d.ts +3 -0
- package/lib/editor/input/marker/index.d.ts.map +1 -0
- package/lib/editor/input/marker/index.js +3 -0
- package/lib/editor/input/marker/index.js.map +1 -0
- package/lib/editor/input/prompt/AcEdKeyword.d.ts +63 -0
- package/lib/editor/input/prompt/AcEdKeyword.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdKeyword.js +120 -0
- package/lib/editor/input/prompt/AcEdKeyword.js.map +1 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts +52 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.js +103 -0
- package/lib/editor/input/prompt/AcEdKeywordCollection.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts +75 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +182 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.d.ts +46 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js +114 -0
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.d.ts +10 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.js +31 -0
- package/lib/editor/input/prompt/AcEdPromptDoubleOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.d.ts +39 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.js +84 -0
- package/lib/editor/input/prompt/AcEdPromptIntegerOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.d.ts +59 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.js +140 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.d.ts +19 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.js +36 -0
- package/lib/editor/input/prompt/AcEdPromptNumericalResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.d.ts +61 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.js +179 -0
- package/lib/editor/input/prompt/AcEdPromptOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts +46 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.js +113 -0
- package/lib/editor/input/prompt/AcEdPromptPointOptions.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.d.ts +25 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.js +38 -0
- package/lib/editor/input/prompt/AcEdPromptPointResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptResult.d.ts +27 -0
- package/lib/editor/input/prompt/AcEdPromptResult.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptResult.js +19 -0
- package/lib/editor/input/prompt/AcEdPromptResult.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.d.ts +22 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.js +23 -0
- package/lib/editor/input/prompt/AcEdPromptStatus.js.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.d.ts +54 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.d.ts.map +1 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.js +124 -0
- package/lib/editor/input/prompt/AcEdPromptStringOptions.js.map +1 -0
- package/lib/editor/input/prompt/index.d.ts +11 -0
- package/lib/editor/input/prompt/index.d.ts.map +1 -0
- package/lib/editor/input/prompt/index.js +11 -0
- package/lib/editor/input/prompt/index.js.map +1 -0
- package/lib/editor/input/ui/AcEdCommandLine.d.ts +114 -0
- package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdCommandLine.js +453 -0
- package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts +151 -0
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInput.js +239 -0
- package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts +60 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.js +113 -0
- package/lib/editor/input/ui/AcEdFloatingInputBox.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts +104 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js +154 -0
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts +113 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.js +2 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.js.map +1 -0
- package/lib/editor/input/ui/AcEdInputManager.d.ts +132 -0
- package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdInputManager.js +477 -0
- package/lib/editor/input/ui/AcEdInputManager.js.map +1 -0
- package/lib/editor/input/ui/AcEdRubberBand.d.ts +66 -0
- package/lib/editor/input/ui/AcEdRubberBand.d.ts.map +1 -0
- package/lib/editor/input/ui/AcEdRubberBand.js +276 -0
- package/lib/editor/input/ui/AcEdRubberBand.js.map +1 -0
- package/lib/editor/input/ui/index.d.ts +3 -0
- package/lib/editor/input/ui/index.d.ts.map +1 -0
- package/lib/editor/input/ui/index.js +3 -0
- package/lib/editor/input/ui/index.js.map +1 -0
- package/lib/editor/view/AcEdBaseView.d.ts +35 -11
- package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
- package/lib/editor/view/AcEdBaseView.js +14 -11
- package/lib/editor/view/AcEdBaseView.js.map +1 -1
- package/lib/i18n/AcApI18n.d.ts +135 -0
- package/lib/i18n/AcApI18n.d.ts.map +1 -0
- package/lib/i18n/AcApI18n.js +208 -0
- package/lib/i18n/AcApI18n.js.map +1 -0
- package/lib/i18n/en/command.d.ts +18 -0
- package/lib/i18n/en/command.d.ts.map +1 -0
- package/lib/i18n/en/command.js +17 -0
- package/lib/i18n/en/command.js.map +1 -0
- package/lib/i18n/en/jig.d.ts +11 -0
- package/lib/i18n/en/jig.d.ts.map +1 -0
- package/lib/i18n/en/jig.js +10 -0
- package/lib/i18n/en/jig.js.map +1 -0
- package/lib/i18n/en/main.d.ts +37 -0
- package/lib/i18n/en/main.d.ts.map +1 -0
- package/lib/i18n/en/main.js +36 -0
- package/lib/i18n/en/main.js.map +1 -0
- package/lib/i18n/index.d.ts +6 -0
- package/lib/i18n/index.d.ts.map +1 -0
- package/lib/i18n/index.js +31 -0
- package/lib/i18n/index.js.map +1 -0
- package/lib/i18n/zh/command.d.ts +18 -0
- package/lib/i18n/zh/command.d.ts.map +1 -0
- package/lib/i18n/zh/command.js +17 -0
- package/lib/i18n/zh/command.js.map +1 -0
- package/lib/i18n/zh/jig.d.ts +11 -0
- package/lib/i18n/zh/jig.d.ts.map +1 -0
- package/lib/i18n/zh/jig.js +10 -0
- package/lib/i18n/zh/jig.js.map +1 -0
- package/lib/i18n/zh/main.d.ts +37 -0
- package/lib/i18n/zh/main.d.ts.map +1 -0
- package/lib/i18n/zh/main.js +36 -0
- package/lib/i18n/zh/main.js.map +1 -0
- 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/view/AcTrScene.d.ts +19 -6
- package/lib/view/AcTrScene.d.ts.map +1 -1
- package/lib/view/AcTrScene.js +25 -6
- package/lib/view/AcTrScene.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +11 -1
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +73 -35
- package/lib/view/AcTrView2d.js.map +1 -1
- package/package.json +7 -7
- package/lib/editor/input/AcEdBaseInput.d.ts +0 -89
- package/lib/editor/input/AcEdBaseInput.d.ts.map +0 -1
- package/lib/editor/input/AcEdBaseInput.js +0 -166
- package/lib/editor/input/AcEdBaseInput.js.map +0 -1
- package/lib/editor/input/AcEdBoxSelector.d.ts +0 -108
- package/lib/editor/input/AcEdBoxSelector.d.ts.map +0 -1
- package/lib/editor/input/AcEdBoxSelector.js +0 -220
- package/lib/editor/input/AcEdBoxSelector.js.map +0 -1
- package/lib/editor/input/AcEdInputPoint.d.ts +0 -51
- package/lib/editor/input/AcEdInputPoint.d.ts.map +0 -1
- package/lib/editor/input/AcEdInputPoint.js +0 -78
- package/lib/editor/input/AcEdInputPoint.js.map +0 -1
- package/lib/editor/input/AcEdJig.d.ts +0 -180
- package/lib/editor/input/AcEdJig.d.ts.map +0 -1
- package/lib/editor/input/AcEdJig.js +0 -256
- package/lib/editor/input/AcEdJig.js.map +0 -1
- package/lib/editor/input/AcEdJigLoop.d.ts +0 -63
- package/lib/editor/input/AcEdJigLoop.d.ts.map +0 -1
- package/lib/editor/input/AcEdJigLoop.js +0 -91
- package/lib/editor/input/AcEdJigLoop.js.map +0 -1
|
@@ -0,0 +1,477 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
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);
|
|
23
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
|
+
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;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
import { acdbHostApplicationServices, AcDbOsnapMode, AcGeBox2d } from '@mlightcad/data-model';
|
|
49
|
+
import { AcApI18n } from '../../../i18n';
|
|
50
|
+
import { AcEdAngleHandler, AcEdDistanceHandler, AcEdDoubleHandler, AcEdIntegerHandler, AcEdPointHandler, AcEdStringHandler } from '../handler';
|
|
51
|
+
import { AcEdMarkerManager } from '../marker';
|
|
52
|
+
import { AcEdPromptPointOptions } from '../prompt';
|
|
53
|
+
import { AcEdFloatingInput } from './AcEdFloatingInput';
|
|
54
|
+
import { AcEdRubberBand } from './AcEdRubberBand';
|
|
55
|
+
/**
|
|
56
|
+
* A fully type-safe TypeScript class providing CAD-style interactive user input
|
|
57
|
+
* using floating HTML input boxes and mouse events. Supports collecting points,
|
|
58
|
+
* distances, angles, numbers, strings, and selecting a 2-point rectangular box
|
|
59
|
+
* using an HTML overlay rectangle (suitable when the main canvas is a THREE.js
|
|
60
|
+
* WebGL canvas).
|
|
61
|
+
*/
|
|
62
|
+
var AcEdInputManager = /** @class */ (function () {
|
|
63
|
+
/**
|
|
64
|
+
* Construct the manager and attach mousemove listener used for floating input
|
|
65
|
+
* positioning and live preview updates.
|
|
66
|
+
*
|
|
67
|
+
* @param view - The view associated with the input manager
|
|
68
|
+
*/
|
|
69
|
+
function AcEdInputManager(view) {
|
|
70
|
+
/** Stores last confirmed point from getPoint() or getBox() */
|
|
71
|
+
this.lastPoint = null;
|
|
72
|
+
/**
|
|
73
|
+
* The flag to indicate whether it is currently in an “input acquisition” mode (e.g., point
|
|
74
|
+
* selection, distance/angle prompt, string prompt, etc.),
|
|
75
|
+
*/
|
|
76
|
+
this.active = false;
|
|
77
|
+
this.view = view;
|
|
78
|
+
this.injectCSS();
|
|
79
|
+
}
|
|
80
|
+
Object.defineProperty(AcEdInputManager.prototype, "isActive", {
|
|
81
|
+
/**
|
|
82
|
+
* The flag to indicate whether it is currently in an “input acquisition” mode (e.g., point
|
|
83
|
+
* selection, distance/angle prompt, string prompt, etc.),
|
|
84
|
+
*/
|
|
85
|
+
get: function () {
|
|
86
|
+
return this.active;
|
|
87
|
+
},
|
|
88
|
+
enumerable: false,
|
|
89
|
+
configurable: true
|
|
90
|
+
});
|
|
91
|
+
/**
|
|
92
|
+
* Injects minimal CSS required for the floating input and preview rectangle.
|
|
93
|
+
* Useful when you do not have a separate CSS file.
|
|
94
|
+
*/
|
|
95
|
+
AcEdInputManager.prototype.injectCSS = function () {
|
|
96
|
+
if (AcEdInputManager.stylesInjected)
|
|
97
|
+
return;
|
|
98
|
+
AcEdInputManager.stylesInjected = true;
|
|
99
|
+
var style = document.createElement('style');
|
|
100
|
+
style.textContent = "\n .ml-jig-preview-rect {\n position: absolute;\n border: 1px dashed var(--line-color, #0f0);\n background: rgba(0, 255, 0, 0.04);\n pointer-events: none;\n z-index: 9999;\n }\n .ml-jig-preview-line {\n position: absolute;\n height: 1px;\n background: var(--line-color, #0f0);\n transform-origin: 0 0;\n pointer-events: none;\n z-index: 9999;\n }\n ";
|
|
101
|
+
document.head.appendChild(style);
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Format a number for display in input box.
|
|
105
|
+
* Default: 3 decimal places for points/distance, 2 decimal places for angles.
|
|
106
|
+
* @param value The numeric value
|
|
107
|
+
* @param type Optional type: 'point' | 'distance' | 'angle'
|
|
108
|
+
*/
|
|
109
|
+
AcEdInputManager.prototype.formatNumber = function (value, type) {
|
|
110
|
+
switch (type) {
|
|
111
|
+
case 'angle':
|
|
112
|
+
return value.toFixed(2);
|
|
113
|
+
case 'distance':
|
|
114
|
+
case 'point':
|
|
115
|
+
default:
|
|
116
|
+
return value.toFixed(3);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Public point input API.
|
|
121
|
+
*/
|
|
122
|
+
AcEdInputManager.prototype.getPoint = function (options) {
|
|
123
|
+
return this.getPointInternal(options);
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Prompt the user to type a numeric value. If integerOnly is true, integers
|
|
127
|
+
* are enforced. The input is validated and the box will be marked invalid if
|
|
128
|
+
* the typed value does not conform, allowing the user to retype.
|
|
129
|
+
*/
|
|
130
|
+
AcEdInputManager.prototype.getNumberTyped = function (options, handler) {
|
|
131
|
+
var getDynamicValue = function () {
|
|
132
|
+
return {
|
|
133
|
+
value: 0,
|
|
134
|
+
raw: { x: '' }
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
return this.makePromise({
|
|
138
|
+
message: options.message,
|
|
139
|
+
twoInputs: false,
|
|
140
|
+
jig: options.jig,
|
|
141
|
+
showBaseLineOnly: false,
|
|
142
|
+
useBasePoint: false,
|
|
143
|
+
handler: handler,
|
|
144
|
+
getDynamicValue: getDynamicValue
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
/** Request a distance (number) from the user. */
|
|
148
|
+
AcEdInputManager.prototype.getDistance = function (options) {
|
|
149
|
+
var _this = this;
|
|
150
|
+
// If no base point defined → fall back to typed numeric input
|
|
151
|
+
if (!this.lastPoint) {
|
|
152
|
+
// fallback to normal numeric input
|
|
153
|
+
return this.getNumberTyped(options, new AcEdDistanceHandler(options));
|
|
154
|
+
}
|
|
155
|
+
var getDynamicValue = function (x, y) {
|
|
156
|
+
var mouseWorld = _this.view.cwcs2Wcs({ x: x, y: y });
|
|
157
|
+
var dx = mouseWorld.x - _this.lastPoint.x;
|
|
158
|
+
var dy = mouseWorld.y - _this.lastPoint.y;
|
|
159
|
+
var dist = Math.sqrt(dx * dx + dy * dy);
|
|
160
|
+
return {
|
|
161
|
+
value: dist,
|
|
162
|
+
raw: { x: _this.formatNumber(dist, 'distance') }
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
var handler = new AcEdDistanceHandler(options);
|
|
166
|
+
return this.makePromise({
|
|
167
|
+
message: options.message,
|
|
168
|
+
twoInputs: false,
|
|
169
|
+
jig: options.jig,
|
|
170
|
+
showBaseLineOnly: false,
|
|
171
|
+
useBasePoint: true,
|
|
172
|
+
handler: handler,
|
|
173
|
+
getDynamicValue: getDynamicValue
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
/** Request an angle in degrees from the user. */
|
|
177
|
+
AcEdInputManager.prototype.getAngle = function (options) {
|
|
178
|
+
var _this = this;
|
|
179
|
+
var getDynamicValue = function (x, y) {
|
|
180
|
+
var cur = _this.view.cwcs2Wcs({ x: x, y: y });
|
|
181
|
+
var dx = cur.x - _this.lastPoint.x;
|
|
182
|
+
var dy = cur.y - _this.lastPoint.y;
|
|
183
|
+
var angleRad = Math.atan2(dy, dx);
|
|
184
|
+
var angleDeg = (angleRad * 180) / Math.PI;
|
|
185
|
+
return {
|
|
186
|
+
value: angleDeg,
|
|
187
|
+
raw: { x: _this.formatNumber(angleDeg, 'angle') }
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
var handler = new AcEdAngleHandler(options);
|
|
191
|
+
return this.makePromise({
|
|
192
|
+
message: options.message,
|
|
193
|
+
twoInputs: false,
|
|
194
|
+
jig: options.jig,
|
|
195
|
+
showBaseLineOnly: false,
|
|
196
|
+
useBasePoint: true,
|
|
197
|
+
handler: handler,
|
|
198
|
+
getDynamicValue: getDynamicValue
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
/** Request a double/float from the user. */
|
|
202
|
+
AcEdInputManager.prototype.getDouble = function (options) {
|
|
203
|
+
return this.getNumberTyped(options, new AcEdDoubleHandler(options));
|
|
204
|
+
};
|
|
205
|
+
/** Request an integer from the user. */
|
|
206
|
+
AcEdInputManager.prototype.getInteger = function (options) {
|
|
207
|
+
return this.getNumberTyped(options, new AcEdIntegerHandler(options));
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Prompt the user to type an arbitrary string. Resolved when Enter is pressed.
|
|
211
|
+
*/
|
|
212
|
+
AcEdInputManager.prototype.getString = function (options) {
|
|
213
|
+
var getDynamicValue = function () {
|
|
214
|
+
return {
|
|
215
|
+
value: '',
|
|
216
|
+
raw: { x: '' }
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
var handler = new AcEdStringHandler(options);
|
|
220
|
+
return this.makePromise({
|
|
221
|
+
message: options.message,
|
|
222
|
+
twoInputs: false,
|
|
223
|
+
jig: options.jig,
|
|
224
|
+
showBaseLineOnly: false,
|
|
225
|
+
useBasePoint: false,
|
|
226
|
+
handler: handler,
|
|
227
|
+
getDynamicValue: getDynamicValue
|
|
228
|
+
});
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* Prompt the user to specify a rectangular box by selecting two corners.
|
|
232
|
+
* Each corner may be specified by clicking on the canvas or typing "x,y".
|
|
233
|
+
* A live HTML overlay rectangle previews the box as the user moves the mouse.
|
|
234
|
+
*/
|
|
235
|
+
AcEdInputManager.prototype.getBox = function () {
|
|
236
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
237
|
+
var message1, options1, p1, cwcsP1, previewEl, cleanup, drawPreview, message2, options2, p2;
|
|
238
|
+
return __generator(this, function (_a) {
|
|
239
|
+
switch (_a.label) {
|
|
240
|
+
case 0:
|
|
241
|
+
message1 = AcApI18n.t('main.inputManager.firstCorner');
|
|
242
|
+
options1 = new AcEdPromptPointOptions(message1);
|
|
243
|
+
options1.useDashedLine = false;
|
|
244
|
+
options1.useBasePoint = false;
|
|
245
|
+
return [4 /*yield*/, this.getPoint(options1)];
|
|
246
|
+
case 1:
|
|
247
|
+
p1 = _a.sent();
|
|
248
|
+
cwcsP1 = this.view.wcs2Cwcs(p1);
|
|
249
|
+
previewEl = document.createElement('div');
|
|
250
|
+
previewEl.className = 'ml-jig-preview-rect';
|
|
251
|
+
document.body.appendChild(previewEl);
|
|
252
|
+
cleanup = function () {
|
|
253
|
+
previewEl.remove();
|
|
254
|
+
};
|
|
255
|
+
drawPreview = function (x, y) {
|
|
256
|
+
var left = Math.min(x, cwcsP1.x);
|
|
257
|
+
var top = Math.min(y, cwcsP1.y);
|
|
258
|
+
var width = Math.abs(x - cwcsP1.x);
|
|
259
|
+
var height = Math.abs(y - cwcsP1.y);
|
|
260
|
+
Object.assign(previewEl.style, {
|
|
261
|
+
left: "".concat(left, "px"),
|
|
262
|
+
top: "".concat(top, "px"),
|
|
263
|
+
width: "".concat(width, "px"),
|
|
264
|
+
height: "".concat(height, "px")
|
|
265
|
+
});
|
|
266
|
+
};
|
|
267
|
+
message2 = AcApI18n.t('main.inputManager.secondCorner');
|
|
268
|
+
options2 = new AcEdPromptPointOptions(message2);
|
|
269
|
+
options2.useDashedLine = false;
|
|
270
|
+
options2.useBasePoint = false;
|
|
271
|
+
return [4 /*yield*/, this.getPointInternal(options2, cleanup, drawPreview)];
|
|
272
|
+
case 2:
|
|
273
|
+
p2 = _a.sent();
|
|
274
|
+
return [2 /*return*/, new AcGeBox2d().expandByPoint(p1).expandByPoint(p2)];
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
});
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* Shared point input logic used by getPoint() and getBox(). Accepts "x,y"
|
|
281
|
+
* typed input OR mouse click.
|
|
282
|
+
*/
|
|
283
|
+
AcEdInputManager.prototype.getPointInternal = function (options, cleanup, drawPreview) {
|
|
284
|
+
var _this = this;
|
|
285
|
+
var getDynamicValue = function (x, y) {
|
|
286
|
+
var mouseWorld = _this.view.cwcs2Wcs({ x: x, y: y });
|
|
287
|
+
return {
|
|
288
|
+
value: __assign(__assign({}, mouseWorld), { z: 0 }),
|
|
289
|
+
raw: {
|
|
290
|
+
x: _this.formatNumber(mouseWorld.x, 'point'),
|
|
291
|
+
y: _this.formatNumber(mouseWorld.y, 'point')
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
var handler = new AcEdPointHandler(options);
|
|
296
|
+
return this.makePromise({
|
|
297
|
+
message: options.message,
|
|
298
|
+
twoInputs: true,
|
|
299
|
+
jig: options.jig,
|
|
300
|
+
showBaseLineOnly: !options.useDashedLine,
|
|
301
|
+
useBasePoint: options.useBasePoint,
|
|
302
|
+
cleanup: cleanup,
|
|
303
|
+
handler: handler,
|
|
304
|
+
getDynamicValue: getDynamicValue,
|
|
305
|
+
drawPreview: drawPreview
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
/**
|
|
309
|
+
* Creates a Promise that will be resolved or rejected by user input.
|
|
310
|
+
*
|
|
311
|
+
* This method centralizes the lifecycle of an interactive input operation,
|
|
312
|
+
* including handling the Escape key to cancel, resolving with user-provided
|
|
313
|
+
* values, and guaranteeing cleanup of UI elements and event handlers.
|
|
314
|
+
*/
|
|
315
|
+
AcEdInputManager.prototype.makePromise = function (options) {
|
|
316
|
+
var _this = this;
|
|
317
|
+
return new Promise(function (resolve, reject) {
|
|
318
|
+
_this.active = true;
|
|
319
|
+
var validate = function (raw) {
|
|
320
|
+
var value = options.handler.parse(raw.x, raw.y);
|
|
321
|
+
return {
|
|
322
|
+
isValid: value != null,
|
|
323
|
+
value: value !== null && value !== void 0 ? value : undefined
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
// OSNAP marker manager to display and hide OSNAP marker
|
|
327
|
+
var osnapMarkerManager = undefined;
|
|
328
|
+
if (!options.disableOSnap) {
|
|
329
|
+
osnapMarkerManager = new AcEdMarkerManager(_this.view);
|
|
330
|
+
}
|
|
331
|
+
var floatingInput = new AcEdFloatingInput({
|
|
332
|
+
parent: _this.view.canvas,
|
|
333
|
+
twoInputs: options.twoInputs,
|
|
334
|
+
message: options.message,
|
|
335
|
+
validate: validate,
|
|
336
|
+
getDynamicValue: options.getDynamicValue,
|
|
337
|
+
drawPreview: function (x, y) {
|
|
338
|
+
var _a;
|
|
339
|
+
if (options.jig) {
|
|
340
|
+
var defaults = options.getDynamicValue(x, y);
|
|
341
|
+
options.jig.update(defaults.value);
|
|
342
|
+
options.jig.render();
|
|
343
|
+
}
|
|
344
|
+
if (rubberBand) {
|
|
345
|
+
var cur = _this.view.cwcs2Wcs({ x: x, y: y });
|
|
346
|
+
rubberBand === null || rubberBand === void 0 ? void 0 : rubberBand.update(cur);
|
|
347
|
+
}
|
|
348
|
+
// Show OSNAP Point
|
|
349
|
+
if (osnapMarkerManager) {
|
|
350
|
+
osnapMarkerManager.hideMarker();
|
|
351
|
+
_this.lastOSnapPoint = _this.getOSnapPoint();
|
|
352
|
+
if (_this.lastOSnapPoint) {
|
|
353
|
+
osnapMarkerManager.showMarker(_this.lastOSnapPoint);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
(_a = options.drawPreview) === null || _a === void 0 ? void 0 : _a.call(options, x, y);
|
|
357
|
+
},
|
|
358
|
+
onCommit: function (val) {
|
|
359
|
+
resolver(val);
|
|
360
|
+
if (floatingInput.mousePos) {
|
|
361
|
+
_this.lastPoint = __assign(__assign({}, _this.view.cwcs2Wcs(floatingInput.mousePos)), { z: 0 });
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
onCancel: function () { return rejector(); }
|
|
365
|
+
});
|
|
366
|
+
var rubberBand = undefined;
|
|
367
|
+
if (_this.lastPoint && options.useBasePoint) {
|
|
368
|
+
rubberBand = new AcEdRubberBand(_this.view);
|
|
369
|
+
rubberBand.start(_this.lastPoint, {
|
|
370
|
+
color: '#0f0',
|
|
371
|
+
showBaseLineOnly: options.showBaseLineOnly
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
var cleanup = function () {
|
|
375
|
+
var _a, _b;
|
|
376
|
+
_this.active = false;
|
|
377
|
+
(_a = options.cleanup) === null || _a === void 0 ? void 0 : _a.call(options);
|
|
378
|
+
(_b = options.jig) === null || _b === void 0 ? void 0 : _b.end();
|
|
379
|
+
document.removeEventListener('keydown', escHandler);
|
|
380
|
+
osnapMarkerManager === null || osnapMarkerManager === void 0 ? void 0 : osnapMarkerManager.clear();
|
|
381
|
+
rubberBand === null || rubberBand === void 0 ? void 0 : rubberBand.dispose();
|
|
382
|
+
floatingInput.dispose();
|
|
383
|
+
};
|
|
384
|
+
var resolver = function (value) {
|
|
385
|
+
cleanup();
|
|
386
|
+
resolve(value);
|
|
387
|
+
};
|
|
388
|
+
var rejector = function () {
|
|
389
|
+
cleanup();
|
|
390
|
+
reject(new Error('cancelled'));
|
|
391
|
+
};
|
|
392
|
+
var escHandler = function (e) {
|
|
393
|
+
if (e.key === 'Escape') {
|
|
394
|
+
rejector();
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
document.addEventListener('keydown', escHandler);
|
|
398
|
+
floatingInput.showAt(_this.view.curMousePos);
|
|
399
|
+
});
|
|
400
|
+
};
|
|
401
|
+
/**
|
|
402
|
+
* Picks entities that intersect a hit-region centered at the specified point
|
|
403
|
+
* in world coordinates.
|
|
404
|
+
*
|
|
405
|
+
* The hit-region is defined as a square (or bounding box) centered at the
|
|
406
|
+
* input point, whose half-size is determined by the `hitRadius` parameter.
|
|
407
|
+
* Only entities whose geometry intersects this region are returned.
|
|
408
|
+
*
|
|
409
|
+
* @param point The center point of the hit-region in world coordinates.
|
|
410
|
+
* If omitted, the current cursor position is used.
|
|
411
|
+
*
|
|
412
|
+
* @param hitRadius The half-width (in world coordinate system) of the
|
|
413
|
+
* hit-region around the point. This creates a square bounding box:
|
|
414
|
+
* [point.x ± hitRadius, point.y ± hitRadius].
|
|
415
|
+
* A larger value increases the pick sensitivity. If omitted, a reasonable
|
|
416
|
+
* default is used.
|
|
417
|
+
* @returns - Returns The OSNAP point in the specified position in world coordinate system
|
|
418
|
+
* if found. Return undefined if no OSNAP point found.
|
|
419
|
+
*/
|
|
420
|
+
/**
|
|
421
|
+
* Gets OSNAP point of entities that intersect a hit-region centered at the
|
|
422
|
+
* specified point in world coordinates.
|
|
423
|
+
*
|
|
424
|
+
* The hit-region is defined as a square (or bounding box) centered at the
|
|
425
|
+
* input point, whose half-size is determined by the `hitRadius` parameter.
|
|
426
|
+
* Only entities whose geometry intersects this region are returned.
|
|
427
|
+
*
|
|
428
|
+
* @param point The center point of the hit-region in world coordinates.
|
|
429
|
+
* If omitted, the current cursor position is used.
|
|
430
|
+
*
|
|
431
|
+
* @param hitRadius The half-width (in pixel size) of the hit-region around
|
|
432
|
+
* the point. It will be converted on one value in the world
|
|
433
|
+
* coordinate 'wcsHitRadius' and creates a square bounding box:
|
|
434
|
+
* [point.x ± wcsHitRadius, point.y ± wcsHitRadius].
|
|
435
|
+
* A larger value increases the pick sensitivity. If omitted, a reasonable
|
|
436
|
+
* default is used.
|
|
437
|
+
*
|
|
438
|
+
* @returns An array of object IDs representing the entities that intersect
|
|
439
|
+
* the hit-region.
|
|
440
|
+
*/
|
|
441
|
+
AcEdInputManager.prototype.getOSnapPoint = function (point, hitRadius) {
|
|
442
|
+
if (hitRadius === void 0) { hitRadius = 20; }
|
|
443
|
+
var results = this.view.pick(point, hitRadius);
|
|
444
|
+
if (results.length > 0) {
|
|
445
|
+
// TODO: Is there one better way to get current working database
|
|
446
|
+
var db = acdbHostApplicationServices().workingDatabase;
|
|
447
|
+
var entity = db.tables.blockTable.modelSpace.getIdAt(results[0]);
|
|
448
|
+
if (entity) {
|
|
449
|
+
var snapPoints = [];
|
|
450
|
+
entity.subGetOsnapPoints(AcDbOsnapMode.EndPoint, __assign(__assign({}, this.view.curPos), { z: 0 }), this.lastPoint, snapPoints);
|
|
451
|
+
// Find the nearest osnap point
|
|
452
|
+
var minDist = Number.MAX_VALUE;
|
|
453
|
+
var minDistIndex = -1;
|
|
454
|
+
for (var i = 0; i < snapPoints.length; ++i) {
|
|
455
|
+
var distance = this.view.curPos.distanceTo(snapPoints[i]);
|
|
456
|
+
if (distance < minDist) {
|
|
457
|
+
minDist = distance;
|
|
458
|
+
minDistIndex = i;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
if (minDistIndex != -1) {
|
|
462
|
+
var p1 = this.view.cwcs2Wcs({ x: 0, y: 0 });
|
|
463
|
+
var p2 = this.view.cwcs2Wcs({ x: hitRadius, y: 0 });
|
|
464
|
+
if (minDist < p2.x - p1.x) {
|
|
465
|
+
return snapPoints[minDistIndex];
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
return undefined;
|
|
471
|
+
};
|
|
472
|
+
/** Inject styles only once */
|
|
473
|
+
AcEdInputManager.stylesInjected = false;
|
|
474
|
+
return AcEdInputManager;
|
|
475
|
+
}());
|
|
476
|
+
export { AcEdInputManager };
|
|
477
|
+
//# sourceMappingURL=AcEdInputManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdInputManager.js","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdInputManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,2BAA2B,EAC3B,aAAa,EACb,SAAS,EAIV,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAGxC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EAEjB,kBAAkB,EAElB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAKL,sBAAsB,EAEvB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAMvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD;;;;;;GAMG;AACH;IAmBE;;;;;OAKG;IACH,0BAAY,IAAkB;QAlB9B,8DAA8D;QACtD,cAAS,GAA2B,IAAI,CAAA;QAKhD;;;WAGG;QACK,WAAM,GAAY,KAAK,CAAA;QAS7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,SAAS,EAAE,CAAA;IAClB,CAAC;IAMD,sBAAI,sCAAQ;QAJZ;;;WAGG;aACH;YACE,OAAO,IAAI,CAAC,MAAM,CAAA;QACpB,CAAC;;;OAAA;IAED;;;OAGG;IACK,oCAAS,GAAjB;QACE,IAAI,gBAAgB,CAAC,cAAc;YAAE,OAAM;QAC3C,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAA;QAEtC,IAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA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AC,CAAC,CAAA;oBAC3D,IAAI,QAAQ,GAAG,OAAO,EAAE,CAAC;wBACvB,OAAO,GAAG,QAAQ,CAAA;wBAClB,YAAY,GAAG,CAAC,CAAA;oBAClB,CAAC;gBACH,CAAC;gBACD,IAAI,YAAY,IAAI,CAAC,CAAC,EAAE,CAAC;oBACvB,IAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;oBAC7C,IAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;oBACrD,IAAI,OAAO,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;wBAC1B,OAAO,UAAU,CAAC,YAAY,CAAC,CAAA;oBACjC,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAheD,8BAA8B;IACf,+BAAc,GAAG,KAAK,AAAR,CAAQ;IAgevC,uBAAC;CAAA,AAleD,IAkeC;SAleY,gBAAgB"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { AcGePoint2dLike, AcGePoint3dLike } from '@mlightcad/data-model';
|
|
2
|
+
import { AcEdBaseView } from '../..';
|
|
3
|
+
/**
|
|
4
|
+
* Options for the AcEdRubberBand preview.
|
|
5
|
+
*/
|
|
6
|
+
export interface AcEdRubberBandOptions {
|
|
7
|
+
/**
|
|
8
|
+
* The color used for the rubber-band lines and label. Defaults to green (#0f0).
|
|
9
|
+
*/
|
|
10
|
+
color?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The length of the perpendicular lines (perpLineAtBase and perpLineAtCursor)
|
|
13
|
+
* in pixels or world units. Defaults to 50.
|
|
14
|
+
*/
|
|
15
|
+
perpendicularLength?: number;
|
|
16
|
+
/**
|
|
17
|
+
* If true, only the baseLine will be shown. Other lines are hidden.
|
|
18
|
+
*/
|
|
19
|
+
showBaseLineOnly?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* AcEdRubberBand provides a temporary CAD-style rubber-band preview.
|
|
23
|
+
*
|
|
24
|
+
* It can draws a CAD-like reference rectangle:
|
|
25
|
+
* 1. baseLine: solid line from the last point to the cursor.
|
|
26
|
+
* 2. perpLineAtBase: dashed perpendicular line at the base point.
|
|
27
|
+
* 3. perpLineAtCursor: dashed perpendicular line at the cursor.
|
|
28
|
+
* 4. connectorLine: dashed line connecting the ends of the two perpendicular lines.
|
|
29
|
+
* 5. distance label displayed near connectorLine
|
|
30
|
+
*
|
|
31
|
+
* And draw one arc:
|
|
32
|
+
* 1. xAxisLine: horizontal reference line starting at base point
|
|
33
|
+
* 2. angleArc: arc showing angle between baseLine and x-axis (radius = baseLine length)
|
|
34
|
+
* 3. angle label shown at midpoint of the arc
|
|
35
|
+
*/
|
|
36
|
+
export declare class AcEdRubberBand {
|
|
37
|
+
private view;
|
|
38
|
+
private basePoint?;
|
|
39
|
+
private container;
|
|
40
|
+
private baseLine;
|
|
41
|
+
private perpLineAtBase;
|
|
42
|
+
private perpLineAtCursor;
|
|
43
|
+
private connectorLine;
|
|
44
|
+
private labelEl;
|
|
45
|
+
private angleLabelEl;
|
|
46
|
+
private xAxisLine;
|
|
47
|
+
private angleSvg;
|
|
48
|
+
private anglePath;
|
|
49
|
+
private options;
|
|
50
|
+
/** Returns the parent container element that holds all rubber-band HTML elements. */
|
|
51
|
+
get element(): HTMLDivElement | null;
|
|
52
|
+
constructor(view: AcEdBaseView);
|
|
53
|
+
/**
|
|
54
|
+
* Starts the rubber-band preview.
|
|
55
|
+
* @param basePoint The starting point in world coordinates.
|
|
56
|
+
*/
|
|
57
|
+
start(basePoint: AcGePoint3dLike, options?: AcEdRubberBandOptions): void;
|
|
58
|
+
/**
|
|
59
|
+
* Updates the rubber-band lines to a new target point.
|
|
60
|
+
* @param targetPoint The current cursor position in world coordinates.
|
|
61
|
+
*/
|
|
62
|
+
update(targetPoint: AcGePoint2dLike): void;
|
|
63
|
+
/** Disposes all HTML elements associated with this rubber-band. */
|
|
64
|
+
dispose(): void;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=AcEdRubberBand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdRubberBand.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdRubberBand.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,eAAe,EAChB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAE5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,IAAI,CAAc;IAC1B,OAAO,CAAC,SAAS,CAAC,CAAa;IAE/B,OAAO,CAAC,SAAS,CAA8B;IAG/C,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,cAAc,CAA8B;IACpD,OAAO,CAAC,gBAAgB,CAA8B;IACtD,OAAO,CAAC,aAAa,CAA8B;IAGnD,OAAO,CAAC,OAAO,CAA8B;IAC7C,OAAO,CAAC,YAAY,CAA8B;IAGlD,OAAO,CAAC,SAAS,CAA8B;IAC/C,OAAO,CAAC,QAAQ,CAA6B;IAC7C,OAAO,CAAC,SAAS,CAA8B;IAE/C,OAAO,CAAC,OAAO,CAA4B;IAE3C,qFAAqF;IACrF,IAAI,OAAO,0BAEV;gBAEW,IAAI,EAAE,YAAY;IAI9B;;;OAGG;IACH,KAAK,CAAC,SAAS,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,qBAAqB;IA0FjE;;;OAGG;IACH,MAAM,CAAC,WAAW,EAAE,eAAe;IAkKnC,mEAAmE;IACnE,OAAO;CAgBR"}
|