@mlightcad/cad-simple-viewer 1.7.5 → 1.7.6
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/cad-simple-viewer.js +9270 -8077
- package/dist/cad-simple-viewer.umd.cjs +83 -83
- package/dist/mtext-renderer-worker.js +2987 -2815
- package/find.ts +7 -0
- package/lib/app/AcApDocManager.d.ts +5 -0
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +39 -21
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcApOpenDatabaseOptions.d.ts +8 -6
- package/lib/app/AcApOpenDatabaseOptions.d.ts.map +1 -1
- package/lib/app/AcApOpenFileProgressController.d.ts +17 -9
- package/lib/app/AcApOpenFileProgressController.d.ts.map +1 -1
- package/lib/app/AcApOpenFileProgressController.js +41 -20
- package/lib/app/AcApOpenFileProgressController.js.map +1 -1
- package/lib/app/AcApProgress.d.ts +5 -0
- package/lib/app/AcApProgress.d.ts.map +1 -1
- package/lib/app/AcApProgress.js +10 -0
- package/lib/app/AcApProgress.js.map +1 -1
- package/lib/app/openFileProgress.d.ts +8 -1
- package/lib/app/openFileProgress.d.ts.map +1 -1
- package/lib/app/openFileProgress.js +13 -2
- package/lib/app/openFileProgress.js.map +1 -1
- package/lib/app/syncCurrentSpaceFromTileMode.d.ts +25 -0
- package/lib/app/syncCurrentSpaceFromTileMode.d.ts.map +1 -0
- package/lib/app/syncCurrentSpaceFromTileMode.js +85 -0
- package/lib/app/syncCurrentSpaceFromTileMode.js.map +1 -0
- package/lib/editor/input/AcEdOsnapCenterMarks.d.ts +15 -2
- package/lib/editor/input/AcEdOsnapCenterMarks.d.ts.map +1 -1
- package/lib/editor/input/AcEdOsnapCenterMarks.js +63 -13
- package/lib/editor/input/AcEdOsnapCenterMarks.js.map +1 -1
- package/lib/editor/input/AcEdOsnapResolver.d.ts +14 -0
- package/lib/editor/input/AcEdOsnapResolver.d.ts.map +1 -1
- package/lib/editor/input/AcEdOsnapResolver.js +246 -32
- package/lib/editor/input/AcEdOsnapResolver.js.map +1 -1
- package/lib/editor/input/AcEdSelectionFilter.d.ts +6 -0
- package/lib/editor/input/AcEdSelectionFilter.d.ts.map +1 -1
- package/lib/editor/input/AcEdSelectionFilter.js +19 -2
- package/lib/editor/input/AcEdSelectionFilter.js.map +1 -1
- package/lib/editor/input/AcEditor.d.ts +6 -0
- package/lib/editor/input/AcEditor.d.ts.map +1 -1
- package/lib/editor/input/AcEditor.js +9 -0
- package/lib/editor/input/AcEditor.js.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.d.ts +12 -0
- package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.js +54 -16
- package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.d.ts +15 -0
- package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.js +41 -10
- package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
- package/lib/editor/view/AcEdBaseView.d.ts +34 -0
- package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
- package/lib/editor/view/AcEdBaseView.js +35 -44
- package/lib/editor/view/AcEdBaseView.js.map +1 -1
- package/lib/editor/view/AcEdSpatialQueryResult.d.ts +7 -0
- package/lib/editor/view/AcEdSpatialQueryResult.d.ts.map +1 -1
- package/lib/editor/view/AcEdSpatialQueryResult.js.map +1 -1
- package/lib/find/AcApFindNavigator.d.ts +59 -0
- package/lib/find/AcApFindNavigator.d.ts.map +1 -0
- package/lib/find/AcApFindNavigator.js +145 -0
- package/lib/find/AcApFindNavigator.js.map +1 -0
- package/lib/find/findDrawing.d.ts +100 -0
- package/lib/find/findDrawing.d.ts.map +1 -0
- package/lib/find/findDrawing.js +183 -0
- package/lib/find/findDrawing.js.map +1 -0
- package/lib/find/findText.d.ts +147 -0
- package/lib/find/findText.d.ts.map +1 -0
- package/lib/find/findText.js +561 -0
- package/lib/find/findText.js.map +1 -0
- package/lib/find/index.d.ts +3 -0
- package/lib/find/index.d.ts.map +1 -0
- package/lib/find/index.js +3 -0
- package/lib/find/index.js.map +1 -0
- package/lib/i18n/ar/jig.d.ts +2 -0
- package/lib/i18n/ar/jig.d.ts.map +1 -1
- package/lib/i18n/ar/jig.js +1 -1
- package/lib/i18n/ar/jig.js.map +1 -1
- package/lib/i18n/cs/jig.d.ts +2 -0
- package/lib/i18n/cs/jig.d.ts.map +1 -1
- package/lib/i18n/cs/jig.js +2 -0
- package/lib/i18n/cs/jig.js.map +1 -1
- package/lib/i18n/en/jig.d.ts +2 -0
- package/lib/i18n/en/jig.d.ts.map +1 -1
- package/lib/i18n/en/jig.js +2 -0
- package/lib/i18n/en/jig.js.map +1 -1
- package/lib/i18n/tr/jig.d.ts +2 -0
- package/lib/i18n/tr/jig.d.ts.map +1 -1
- package/lib/i18n/tr/jig.js +2 -0
- package/lib/i18n/tr/jig.js.map +1 -1
- package/lib/i18n/zh/jig.d.ts +2 -0
- package/lib/i18n/zh/jig.d.ts.map +1 -1
- package/lib/i18n/zh/jig.js +2 -0
- package/lib/i18n/zh/jig.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts +29 -7
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js +77 -38
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js.map +1 -1
- package/lib/view/AcTrConvertQueue.d.ts +78 -0
- package/lib/view/AcTrConvertQueue.d.ts.map +1 -0
- package/lib/view/AcTrConvertQueue.js +143 -0
- package/lib/view/AcTrConvertQueue.js.map +1 -0
- package/lib/view/AcTrGroupWcsBboxAssert.d.ts +9 -0
- package/lib/view/AcTrGroupWcsBboxAssert.d.ts.map +1 -1
- package/lib/view/AcTrGroupWcsBboxAssert.js +12 -0
- package/lib/view/AcTrGroupWcsBboxAssert.js.map +1 -1
- package/lib/view/AcTrLayer.d.ts.map +1 -1
- package/lib/view/AcTrLayer.js +5 -1
- package/lib/view/AcTrLayer.js.map +1 -1
- package/lib/view/AcTrLayout.d.ts.map +1 -1
- package/lib/view/AcTrLayout.js +15 -0
- package/lib/view/AcTrLayout.js.map +1 -1
- package/lib/view/AcTrLayoutView.d.ts.map +1 -1
- package/lib/view/AcTrLayoutView.js +3 -1
- package/lib/view/AcTrLayoutView.js.map +1 -1
- package/lib/view/AcTrProgressiveOpenFitController.d.ts +1 -0
- package/lib/view/AcTrProgressiveOpenFitController.d.ts.map +1 -1
- package/lib/view/AcTrProgressiveOpenFitController.js +2 -1
- package/lib/view/AcTrProgressiveOpenFitController.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +210 -20
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +962 -273
- package/lib/view/AcTrView2d.js.map +1 -1
- package/package.json +17 -10
- package/src/find/AcApFindNavigator.ts +190 -0
- package/src/find/findDrawing.ts +211 -0
- package/src/find/findText.ts +624 -0
- package/src/find/index.ts +2 -0
|
@@ -21,6 +21,13 @@ export interface AcEdSpatialQueryResultItem {
|
|
|
21
21
|
*/
|
|
22
22
|
export interface AcEdSpatialQueryResultItemEx extends AcEdSpatialQueryResultItem {
|
|
23
23
|
children?: AcEdSpatialQueryResultItem[];
|
|
24
|
+
/**
|
|
25
|
+
* Set only on hits drilled through a paper-space viewport into model
|
|
26
|
+
* space ({@link AcTrView2d.pickThroughViewports}): the `AcDbViewport`'s own
|
|
27
|
+
* id. `minX`/`minY`/`maxX`/`maxY`/`id`/`children` are then in model-space
|
|
28
|
+
* WCS, not the active layout's paper-space WCS — see #746.
|
|
29
|
+
*/
|
|
30
|
+
viewportId?: AcDbObjectId;
|
|
24
31
|
}
|
|
25
32
|
/**
|
|
26
33
|
* Unions spatial-query child boxes into one axis-aligned WCS rectangle.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdSpatialQueryResult.d.ts","sourceRoot":"","sources":["../../../src/editor/view/AcEdSpatialQueryResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAIpD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,YAAY,CAAA;CACjB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,4BAA6B,SAAQ,0BAA0B;IAC9E,QAAQ,CAAC,EAAE,0BAA0B,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"AcEdSpatialQueryResult.d.ts","sourceRoot":"","sources":["../../../src/editor/view/AcEdSpatialQueryResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAIpD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,YAAY,CAAA;CACjB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,4BAA6B,SAAQ,0BAA0B;IAC9E,QAAQ,CAAC,EAAE,0BAA0B,EAAE,CAAA;IACvC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,YAAY,CAAA;CAC1B;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,aAAa,CAAC,0BAA0B,CAAC,EAChD,EAAE,CAAC,EAAE,YAAY,GAChB,0BAA0B,CAuB5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,4BAA4B,GACjC,OAAO,CAET;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,aAAa,CAAC,0BAA0B,CAAC,GAC/C,0BAA0B,EAAE,CAc9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdSpatialQueryResult.js","sourceRoot":"","sources":["../../../src/editor/view/AcEdSpatialQueryResult.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;
|
|
1
|
+
{"version":3,"file":"AcEdSpatialQueryResult.js","sourceRoot":"","sources":["../../../src/editor/view/AcEdSpatialQueryResult.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAkCvE;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CACpC,KAAgD,EAChD,EAAiB;;;IAEjB,IAAI,IAAI,GAAG,QAAQ,CAAA;IACnB,IAAI,IAAI,GAAG,QAAQ,CAAA;IACnB,IAAI,IAAI,GAAG,CAAC,QAAQ,CAAA;IACpB,IAAI,IAAI,GAAG,CAAC,QAAQ,CAAA;;QAEpB,KAAkB,IAAA,UAAA,SAAA,KAAK,CAAA,4BAAA,+CAAE,CAAC;YAArB,IAAM,GAAG,kBAAA;YACZ,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC9B,SAAQ;YACV,CAAC;YACD,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;YAC/B,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;YAC/B,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;YAC/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ager } from '../app/AcApDocManager';
|
|
2
|
+
import { type AcApFindLayoutHit } from './findDrawing';
|
|
3
|
+
/** Options for {@link acapNavigateToFindHit}. */
|
|
4
|
+
export interface AcApFindNavigateOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Activate the hit's layout when it is not the active one. Default `true`.
|
|
7
|
+
* When `false` a cross-layout hit is not navigated and `layout-mismatch`
|
|
8
|
+
* is returned.
|
|
9
|
+
*/
|
|
10
|
+
activateLayout?: boolean;
|
|
11
|
+
/** Margin passed to `zoomTo`. Default `1.1`. */
|
|
12
|
+
margin?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Maximum time (ms) to wait for the freshly activated layout to finish
|
|
15
|
+
* converting before zooming and selecting. Default 15000.
|
|
16
|
+
*/
|
|
17
|
+
idleTimeoutMs?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Canvas area (CSS pixels from each edge) covered by UI such as a docked
|
|
20
|
+
* palette. The hit is framed and centred in the remaining visible part of
|
|
21
|
+
* the canvas so it never ends up hidden behind the palette.
|
|
22
|
+
*/
|
|
23
|
+
insets?: AcApFindViewInsets;
|
|
24
|
+
}
|
|
25
|
+
/** Pixels of the canvas covered on each side; see {@link AcApFindNavigateOptions.insets}. */
|
|
26
|
+
export interface AcApFindViewInsets {
|
|
27
|
+
left?: number;
|
|
28
|
+
right?: number;
|
|
29
|
+
top?: number;
|
|
30
|
+
bottom?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Outcome of {@link acapNavigateToFindHit}.
|
|
34
|
+
*
|
|
35
|
+
* - `navigated`: layout (if needed) activated, view zoomed, entity selected
|
|
36
|
+
* - `layout-mismatch`: hit is in another layout and `activateLayout` is false
|
|
37
|
+
* - `layout-missing`: the hit's layout no longer exists in the drawing
|
|
38
|
+
* - `layout-switch-failed`: the layout manager refused / did not switch
|
|
39
|
+
* - `no-document`: no open drawing or view
|
|
40
|
+
* - `stale`: a newer navigation started while waiting; nothing was done
|
|
41
|
+
*/
|
|
42
|
+
export type AcApFindNavigateResult = 'navigated' | 'layout-mismatch' | 'layout-missing' | 'layout-switch-failed' | 'no-document' | 'stale';
|
|
43
|
+
/**
|
|
44
|
+
* Navigates to a FIND hit: activates its layout when needed, zooms to the text
|
|
45
|
+
* and selects the owning entity.
|
|
46
|
+
*
|
|
47
|
+
* Same-layout hits are handled synchronously (before the first `await`), so
|
|
48
|
+
* callers may ignore the returned promise in that case. For a hit in another
|
|
49
|
+
* layout the layout is activated through the document's layout manager; the
|
|
50
|
+
* first-visit auto zoom of that layout is suppressed (it would otherwise
|
|
51
|
+
* override this zoom), then the function waits for the layout's entities to
|
|
52
|
+
* be converted before selecting, because selection highlighting needs the
|
|
53
|
+
* entity to be present in the scene.
|
|
54
|
+
*
|
|
55
|
+
* @param editor - Document manager that owns the active view and drawing.
|
|
56
|
+
* @param hit - Hit returned by `acapFindText`.
|
|
57
|
+
*/
|
|
58
|
+
export declare function acapNavigateToFindHit(editor: AcApDocManager, hit: AcApFindLayoutHit, options?: AcApFindNavigateOptions): Promise<AcApFindNavigateResult>;
|
|
59
|
+
//# sourceMappingURL=AcApFindNavigator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApFindNavigator.d.ts","sourceRoot":"","sources":["../../src/find/AcApFindNavigator.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEtE,iDAAiD;AACjD,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAA;CAC5B;AAED,6FAA6F;AAC7F,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AA0ED;;;;;;;;;GASG;AACH,MAAM,MAAM,sBAAsB,GAC9B,WAAW,GACX,iBAAiB,GACjB,gBAAgB,GAChB,sBAAsB,GACtB,aAAa,GACb,OAAO,CAAA;AAIX;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,iBAAiB,EACtB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,sBAAsB,CAAC,CAsCjC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { acdbHostApplicationServices, AcGeBox2d, AcGePoint2d } from '@mlightcad/data-model';
|
|
38
|
+
import { acapFindHitBox } from './findDrawing';
|
|
39
|
+
/**
|
|
40
|
+
* Zooms to `box` so that it fits, centred, in the part of the canvas that
|
|
41
|
+
* `insets` leaves visible. Falls back to a plain `zoomTo` when the view
|
|
42
|
+
* cannot convert coordinates or the visible part is too small to matter.
|
|
43
|
+
*/
|
|
44
|
+
function zoomToVisible(view, box, margin, insets) {
|
|
45
|
+
var _a, _b, _c, _d;
|
|
46
|
+
var width = Number(view.width) || 0;
|
|
47
|
+
var height = Number(view.height) || 0;
|
|
48
|
+
var left = Math.max(0, (_a = insets === null || insets === void 0 ? void 0 : insets.left) !== null && _a !== void 0 ? _a : 0);
|
|
49
|
+
var right = Math.max(0, (_b = insets === null || insets === void 0 ? void 0 : insets.right) !== null && _b !== void 0 ? _b : 0);
|
|
50
|
+
var top = Math.max(0, (_c = insets === null || insets === void 0 ? void 0 : insets.top) !== null && _c !== void 0 ? _c : 0);
|
|
51
|
+
var bottom = Math.max(0, (_d = insets === null || insets === void 0 ? void 0 : insets.bottom) !== null && _d !== void 0 ? _d : 0);
|
|
52
|
+
var visibleW = width - left - right;
|
|
53
|
+
var visibleH = height - top - bottom;
|
|
54
|
+
var usable = width > 0 &&
|
|
55
|
+
height > 0 &&
|
|
56
|
+
left + right + top + bottom > 0 &&
|
|
57
|
+
visibleW >= width * 0.2 &&
|
|
58
|
+
visibleH >= height * 0.2 &&
|
|
59
|
+
!!view.worldToScreen &&
|
|
60
|
+
!!view.screenToWorld;
|
|
61
|
+
if (!usable) {
|
|
62
|
+
view.zoomTo(new AcGeBox2d(new AcGePoint2d(box.min.x, box.min.y), new AcGePoint2d(box.max.x, box.max.y)), margin);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
// Grow the box so that, fitted to the full canvas, its original part
|
|
66
|
+
// fits the visible part.
|
|
67
|
+
var cx = (box.min.x + box.max.x) / 2;
|
|
68
|
+
var cy = (box.min.y + box.max.y) / 2;
|
|
69
|
+
var halfW = ((box.max.x - box.min.x) / 2) * (width / visibleW);
|
|
70
|
+
var halfH = ((box.max.y - box.min.y) / 2) * (height / visibleH);
|
|
71
|
+
view.zoomTo(new AcGeBox2d(new AcGePoint2d(cx - halfW, cy - halfH), new AcGePoint2d(cx + halfW, cy + halfH)), margin);
|
|
72
|
+
// Then pan so the hit sits in the middle of the visible part.
|
|
73
|
+
var hitOnScreen = view.worldToScreen({ x: cx, y: cy });
|
|
74
|
+
var targetX = left + visibleW / 2;
|
|
75
|
+
var targetY = top + visibleH / 2;
|
|
76
|
+
var newCenter = view.screenToWorld({
|
|
77
|
+
x: width / 2 + (hitOnScreen.x - targetX),
|
|
78
|
+
y: height / 2 + (hitOnScreen.y - targetY)
|
|
79
|
+
});
|
|
80
|
+
if (isFinite(newCenter.x) && isFinite(newCenter.y)) {
|
|
81
|
+
view.center = new AcGePoint2d(newCenter.x, newCenter.y);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
var navigationTokens = new WeakMap();
|
|
85
|
+
/**
|
|
86
|
+
* Navigates to a FIND hit: activates its layout when needed, zooms to the text
|
|
87
|
+
* and selects the owning entity.
|
|
88
|
+
*
|
|
89
|
+
* Same-layout hits are handled synchronously (before the first `await`), so
|
|
90
|
+
* callers may ignore the returned promise in that case. For a hit in another
|
|
91
|
+
* layout the layout is activated through the document's layout manager; the
|
|
92
|
+
* first-visit auto zoom of that layout is suppressed (it would otherwise
|
|
93
|
+
* override this zoom), then the function waits for the layout's entities to
|
|
94
|
+
* be converted before selecting, because selection highlighting needs the
|
|
95
|
+
* entity to be present in the scene.
|
|
96
|
+
*
|
|
97
|
+
* @param editor - Document manager that owns the active view and drawing.
|
|
98
|
+
* @param hit - Hit returned by `acapFindText`.
|
|
99
|
+
*/
|
|
100
|
+
export function acapNavigateToFindHit(editor_1, hit_1) {
|
|
101
|
+
return __awaiter(this, arguments, void 0, function (editor, hit, options) {
|
|
102
|
+
var view, db, token, box;
|
|
103
|
+
var _a, _b, _c, _d;
|
|
104
|
+
if (options === void 0) { options = {}; }
|
|
105
|
+
return __generator(this, function (_e) {
|
|
106
|
+
switch (_e.label) {
|
|
107
|
+
case 0:
|
|
108
|
+
view = editor.curView;
|
|
109
|
+
db = (_a = editor.curDocument) === null || _a === void 0 ? void 0 : _a.database;
|
|
110
|
+
if (!view || !db)
|
|
111
|
+
return [2 /*return*/, 'no-document'];
|
|
112
|
+
token = ((_b = navigationTokens.get(view)) !== null && _b !== void 0 ? _b : 0) + 1;
|
|
113
|
+
navigationTokens.set(view, token);
|
|
114
|
+
if (!(view.activeLayoutBtrId !== hit.layoutId)) return [3 /*break*/, 2];
|
|
115
|
+
if (options.activateLayout === false)
|
|
116
|
+
return [2 /*return*/, 'layout-mismatch'];
|
|
117
|
+
if (!db.tables.blockTable.getIdAt(hit.layoutId))
|
|
118
|
+
return [2 /*return*/, 'layout-missing'];
|
|
119
|
+
if (!view.isLayoutInitialized(hit.layoutId)) {
|
|
120
|
+
// We frame the layout ourselves; keep its first-visit auto zoom from
|
|
121
|
+
// running afterwards and overriding the zoom to the hit.
|
|
122
|
+
view.markLayoutAsInitialized(hit.layoutId);
|
|
123
|
+
}
|
|
124
|
+
acdbHostApplicationServices().layoutManager.setCurrentLayoutBtrId(hit.layoutId, db);
|
|
125
|
+
if (view.activeLayoutBtrId !== hit.layoutId)
|
|
126
|
+
return [2 /*return*/, 'layout-switch-failed'];
|
|
127
|
+
return [4 /*yield*/, view.waitUntilIdle((_c = options.idleTimeoutMs) !== null && _c !== void 0 ? _c : 15000)];
|
|
128
|
+
case 1:
|
|
129
|
+
_e.sent();
|
|
130
|
+
if (navigationTokens.get(view) !== token)
|
|
131
|
+
return [2 /*return*/, 'stale'];
|
|
132
|
+
if (view.activeLayoutBtrId !== hit.layoutId)
|
|
133
|
+
return [2 /*return*/, 'stale'];
|
|
134
|
+
_e.label = 2;
|
|
135
|
+
case 2:
|
|
136
|
+
box = acapFindHitBox(db, hit.layoutId, hit);
|
|
137
|
+
zoomToVisible(view, box, (_d = options.margin) !== null && _d !== void 0 ? _d : 1.1, options.insets);
|
|
138
|
+
view.selectionSet.clear();
|
|
139
|
+
view.selectionSet.add(hit.entityId);
|
|
140
|
+
return [2 /*return*/, 'navigated'];
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=AcApFindNavigator.js.map
|
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AAA,OAAO,CAAC,MAAM,mCAAI,GAAG,EACrB,OAAO,CAAC,MAAM,CACf,CAAA;oBACD,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAA;oBACzB,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;oBACnC,sBAAO,WAAW,EAAA;;;;CACnB"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whole-drawing text search (FIND across layouts).
|
|
3
|
+
*
|
|
4
|
+
* Builds on {@link acapFindTextInLayout}: every layout of the drawing (model
|
|
5
|
+
* space and each paper space, in tab order) is searched with the same rules,
|
|
6
|
+
* and every hit is tagged with the layout it lives in so a UI can show it and
|
|
7
|
+
* navigate there.
|
|
8
|
+
*
|
|
9
|
+
* Pure TypeScript with no runtime imports (structural database shape), shared
|
|
10
|
+
* by cad-simple-ui-plugin and the Vue cad-viewer.
|
|
11
|
+
*/
|
|
12
|
+
import { type AcApFindDatabaseLike, type AcApFindHit, type AcApFindOptions } from './findText';
|
|
13
|
+
/**
|
|
14
|
+
* Where to search.
|
|
15
|
+
*
|
|
16
|
+
* - `drawing` (default): every layout of the drawing
|
|
17
|
+
* - `layout`: only the layout that is currently active in the view
|
|
18
|
+
*/
|
|
19
|
+
export type AcApFindScope = 'drawing' | 'layout';
|
|
20
|
+
/** One layout of the drawing (model space or paper space). */
|
|
21
|
+
export interface AcApFindLayoutInfo {
|
|
22
|
+
/** Layout name as shown on the layout tab (e.g. `Model`, `Layout1`). */
|
|
23
|
+
name: string;
|
|
24
|
+
/** Block table record id of the layout. */
|
|
25
|
+
btrId: string;
|
|
26
|
+
/** Tab order; layouts are searched and listed in this order. */
|
|
27
|
+
tabOrder: number;
|
|
28
|
+
}
|
|
29
|
+
/** A hit that also identifies the layout that contains it. */
|
|
30
|
+
export interface AcApFindLayoutHit extends AcApFindHit {
|
|
31
|
+
/** Block table record id of the layout containing the hit. */
|
|
32
|
+
layoutId: string;
|
|
33
|
+
/** Name of the layout containing the hit. */
|
|
34
|
+
layoutName: string;
|
|
35
|
+
}
|
|
36
|
+
/** Result of one drawing-level search. */
|
|
37
|
+
export interface AcApFindDrawingResult {
|
|
38
|
+
hits: AcApFindLayoutHit[];
|
|
39
|
+
/** True when more than `maxResults` entities matched. */
|
|
40
|
+
truncated: boolean;
|
|
41
|
+
}
|
|
42
|
+
/** Options for {@link acapFindText}. */
|
|
43
|
+
export interface AcApFindDrawingOptions extends AcApFindOptions {
|
|
44
|
+
/** Search scope; defaults to `drawing`. */
|
|
45
|
+
scope?: AcApFindScope;
|
|
46
|
+
/**
|
|
47
|
+
* Block table record id of the layout currently shown. Required for the
|
|
48
|
+
* `layout` scope; also used as the only layout when the drawing exposes no
|
|
49
|
+
* layout objects.
|
|
50
|
+
*/
|
|
51
|
+
currentLayoutId: string;
|
|
52
|
+
}
|
|
53
|
+
interface LayoutLike {
|
|
54
|
+
layoutName?: string;
|
|
55
|
+
tabOrder?: number;
|
|
56
|
+
blockTableRecordId?: string;
|
|
57
|
+
}
|
|
58
|
+
/** Database shape used to enumerate layouts. */
|
|
59
|
+
export interface AcApFindLayoutsDatabaseLike {
|
|
60
|
+
objects?: {
|
|
61
|
+
layout?: {
|
|
62
|
+
newIterator?(): Iterable<LayoutLike>;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Lists the layouts of a drawing sorted by tab order (model space first in
|
|
68
|
+
* practice). Returns an empty list when the drawing has no layout objects.
|
|
69
|
+
*/
|
|
70
|
+
export declare function acapListFindLayouts(db: AcApFindLayoutsDatabaseLike): AcApFindLayoutInfo[];
|
|
71
|
+
/**
|
|
72
|
+
* Finds text in the whole drawing or in the current layout only.
|
|
73
|
+
*
|
|
74
|
+
* Layouts are visited in tab order and the result cap is shared, so
|
|
75
|
+
* `truncated` is true as soon as any match beyond `maxResults` exists in any
|
|
76
|
+
* searched layout. Search runs on the database, not on the rendered scene, so
|
|
77
|
+
* layouts that were never opened in the view are searched too.
|
|
78
|
+
*/
|
|
79
|
+
export declare function acapFindText(db: AcApFindDatabaseLike & AcApFindLayoutsDatabaseLike, query: string, options: AcApFindDrawingOptions): AcApFindDrawingResult;
|
|
80
|
+
/** Axis-aligned 2D box in WCS (plain numbers; no geometry library needed). */
|
|
81
|
+
export interface AcApFindBox {
|
|
82
|
+
min: {
|
|
83
|
+
x: number;
|
|
84
|
+
y: number;
|
|
85
|
+
};
|
|
86
|
+
max: {
|
|
87
|
+
x: number;
|
|
88
|
+
y: number;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* View box for a hit: the text extents (`hit.extents` for nested text), widened so a short label does not
|
|
93
|
+
* zoom in absurdly far (at least ~10 text heights wide). Falls back to the
|
|
94
|
+
* hit position when the entity has no usable extents.
|
|
95
|
+
*
|
|
96
|
+
* @param layoutBtrId - Layout that contains the hit (`hit.layoutId`).
|
|
97
|
+
*/
|
|
98
|
+
export declare function acapFindHitBox(db: AcApFindDatabaseLike, layoutBtrId: string, hit: AcApFindHit): AcApFindBox;
|
|
99
|
+
export {};
|
|
100
|
+
//# sourceMappingURL=findDrawing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findDrawing.d.ts","sourceRoot":"","sources":["../../src/find/findDrawing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,eAAe,EAErB,MAAM,YAAY,CAAA;AAEnB;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAA;AAEhD,8DAA8D;AAC9D,MAAM,WAAW,kBAAkB;IACjC,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAA;IACZ,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,8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H,wBAAgB,cAAc,CAC5B,EAAE,EAAE,oBAAoB,EACxB,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,WAAW,GACf,WAAW,CAwCb"}
|
|
@@ -0,0 +1,183 @@
|
|
|
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 __values = (this && this.__values) || function(o) {
|
|
13
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
14
|
+
if (m) return m.call(o);
|
|
15
|
+
if (o && typeof o.length === "number") return {
|
|
16
|
+
next: function () {
|
|
17
|
+
if (o && i >= o.length) o = void 0;
|
|
18
|
+
return { value: o && o[i++], done: !o };
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Whole-drawing text search (FIND across layouts).
|
|
25
|
+
*
|
|
26
|
+
* Builds on {@link acapFindTextInLayout}: every layout of the drawing (model
|
|
27
|
+
* space and each paper space, in tab order) is searched with the same rules,
|
|
28
|
+
* and every hit is tagged with the layout it lives in so a UI can show it and
|
|
29
|
+
* navigate there.
|
|
30
|
+
*
|
|
31
|
+
* Pure TypeScript with no runtime imports (structural database shape), shared
|
|
32
|
+
* by cad-simple-ui-plugin and the Vue cad-viewer.
|
|
33
|
+
*/
|
|
34
|
+
import { ACAP_FIND_MAX_RESULTS, acapFindTextInLayout } from './findText';
|
|
35
|
+
/**
|
|
36
|
+
* Lists the layouts of a drawing sorted by tab order (model space first in
|
|
37
|
+
* practice). Returns an empty list when the drawing has no layout objects.
|
|
38
|
+
*/
|
|
39
|
+
export function acapListFindLayouts(db) {
|
|
40
|
+
var e_1, _a;
|
|
41
|
+
var _b, _c;
|
|
42
|
+
var table = (_b = db.objects) === null || _b === void 0 ? void 0 : _b.layout;
|
|
43
|
+
if (!(table === null || table === void 0 ? void 0 : table.newIterator))
|
|
44
|
+
return [];
|
|
45
|
+
var layouts = [];
|
|
46
|
+
try {
|
|
47
|
+
for (var _d = __values(table.newIterator()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
48
|
+
var layout = _e.value;
|
|
49
|
+
if (!layout.blockTableRecordId)
|
|
50
|
+
continue;
|
|
51
|
+
layouts.push({
|
|
52
|
+
name: (_c = layout.layoutName) !== null && _c !== void 0 ? _c : '',
|
|
53
|
+
btrId: layout.blockTableRecordId,
|
|
54
|
+
tabOrder: Number(layout.tabOrder) || 0
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
59
|
+
finally {
|
|
60
|
+
try {
|
|
61
|
+
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
|
|
62
|
+
}
|
|
63
|
+
finally { if (e_1) throw e_1.error; }
|
|
64
|
+
}
|
|
65
|
+
return layouts.sort(function (a, b) { return a.tabOrder - b.tabOrder || a.name.localeCompare(b.name); });
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Finds text in the whole drawing or in the current layout only.
|
|
69
|
+
*
|
|
70
|
+
* Layouts are visited in tab order and the result cap is shared, so
|
|
71
|
+
* `truncated` is true as soon as any match beyond `maxResults` exists in any
|
|
72
|
+
* searched layout. Search runs on the database, not on the rendered scene, so
|
|
73
|
+
* layouts that were never opened in the view are searched too.
|
|
74
|
+
*/
|
|
75
|
+
export function acapFindText(db, query, options) {
|
|
76
|
+
var e_2, _a, e_3, _b;
|
|
77
|
+
var _c;
|
|
78
|
+
var max = (_c = options.maxResults) !== null && _c !== void 0 ? _c : ACAP_FIND_MAX_RESULTS;
|
|
79
|
+
var known = acapListFindLayouts(db);
|
|
80
|
+
var nameOf = function (btrId) { var _a, _b; return (_b = (_a = known.find(function (layout) { return layout.btrId === btrId; })) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : ''; };
|
|
81
|
+
var targets;
|
|
82
|
+
if (options.scope === 'layout' || known.length === 0) {
|
|
83
|
+
targets = [
|
|
84
|
+
{ btrId: options.currentLayoutId, name: nameOf(options.currentLayoutId) }
|
|
85
|
+
];
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
targets = known.map(function (layout) { return ({ btrId: layout.btrId, name: layout.name }); });
|
|
89
|
+
}
|
|
90
|
+
var result = { hits: [], truncated: false };
|
|
91
|
+
try {
|
|
92
|
+
for (var targets_1 = __values(targets), targets_1_1 = targets_1.next(); !targets_1_1.done; targets_1_1 = targets_1.next()) {
|
|
93
|
+
var target = targets_1_1.value;
|
|
94
|
+
var found = acapFindTextInLayout(db, target.btrId, query, {
|
|
95
|
+
matchCase: options.matchCase,
|
|
96
|
+
maxResults: max - result.hits.length
|
|
97
|
+
});
|
|
98
|
+
try {
|
|
99
|
+
for (var _d = (e_3 = void 0, __values(found.hits)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
100
|
+
var hit = _e.value;
|
|
101
|
+
result.hits.push(__assign(__assign({}, hit), { layoutId: target.btrId, layoutName: target.name }));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
105
|
+
finally {
|
|
106
|
+
try {
|
|
107
|
+
if (_e && !_e.done && (_b = _d.return)) _b.call(_d);
|
|
108
|
+
}
|
|
109
|
+
finally { if (e_3) throw e_3.error; }
|
|
110
|
+
}
|
|
111
|
+
if (found.truncated) {
|
|
112
|
+
result.truncated = true;
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
118
|
+
finally {
|
|
119
|
+
try {
|
|
120
|
+
if (targets_1_1 && !targets_1_1.done && (_a = targets_1.return)) _a.call(targets_1);
|
|
121
|
+
}
|
|
122
|
+
finally { if (e_2) throw e_2.error; }
|
|
123
|
+
}
|
|
124
|
+
return result;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* View box for a hit: the text extents (`hit.extents` for nested text), widened so a short label does not
|
|
128
|
+
* zoom in absurdly far (at least ~10 text heights wide). Falls back to the
|
|
129
|
+
* hit position when the entity has no usable extents.
|
|
130
|
+
*
|
|
131
|
+
* @param layoutBtrId - Layout that contains the hit (`hit.layoutId`).
|
|
132
|
+
*/
|
|
133
|
+
export function acapFindHitBox(db, layoutBtrId, hit) {
|
|
134
|
+
var e_4, _a;
|
|
135
|
+
var _b, _c;
|
|
136
|
+
var btr = db.tables.blockTable.getIdAt(layoutBtrId);
|
|
137
|
+
var owner = (_b = btr === null || btr === void 0 ? void 0 : btr.getIdAt) === null || _b === void 0 ? void 0 : _b.call(btr, hit.entityId);
|
|
138
|
+
var target = owner;
|
|
139
|
+
if (hit.kind === 'attribute' && (owner === null || owner === void 0 ? void 0 : owner.attributeIterator)) {
|
|
140
|
+
try {
|
|
141
|
+
for (var _d = __values(owner.attributeIterator()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
142
|
+
var attribute = _e.value;
|
|
143
|
+
if (attribute.objectId === hit.textEntityId) {
|
|
144
|
+
target = attribute;
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
150
|
+
finally {
|
|
151
|
+
try {
|
|
152
|
+
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
|
|
153
|
+
}
|
|
154
|
+
finally { if (e_4) throw e_4.error; }
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
var min;
|
|
158
|
+
var max;
|
|
159
|
+
try {
|
|
160
|
+
// Text nested in a block / dimension / table: the search already
|
|
161
|
+
// resolved its WCS extents (the owner's extents are the whole block).
|
|
162
|
+
var extents = (_c = hit.extents) !== null && _c !== void 0 ? _c : target === null || target === void 0 ? void 0 : target.geometricExtents;
|
|
163
|
+
if (!extents || !isFinite(extents.min.x) || !isFinite(extents.max.x)) {
|
|
164
|
+
throw new Error('no extents');
|
|
165
|
+
}
|
|
166
|
+
min = extents.min;
|
|
167
|
+
max = extents.max;
|
|
168
|
+
}
|
|
169
|
+
catch (_f) {
|
|
170
|
+
min = max = hit.position;
|
|
171
|
+
}
|
|
172
|
+
var cx = (min.x + max.x) / 2;
|
|
173
|
+
var cy = (min.y + max.y) / 2;
|
|
174
|
+
var w = max.x - min.x;
|
|
175
|
+
var h = max.y - min.y;
|
|
176
|
+
var width = Math.max(w * 3, h * 10, 1e-3);
|
|
177
|
+
var height = Math.max(h * 3, width / 4, 1e-3);
|
|
178
|
+
return {
|
|
179
|
+
min: { x: cx - width / 2, y: cy - height / 2 },
|
|
180
|
+
max: { x: cx + width / 2, y: cy + height / 2 }
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=findDrawing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findDrawing.js","sourceRoot":"","sources":["../../src/find/findDrawing.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,qBAAqB,EAIrB,oBAAoB,EACrB,MAAM,YAAY,CAAA;AA4DnB;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,EAA+B;;;IAE/B,IAAM,KAAK,GAAG,MAAA,EAAE,CAAC,OAAO,0CAAE,MAAM,CAAA;IAChC,IAAI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,CAAA;QAAE,OAAO,EAAE,CAAA;IAClC,IAAM,OAAO,GA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