@mlightcad/cad-simple-viewer 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/index.js +25678 -48997
- package/dist/index.umd.cjs +571 -603
- package/dist/libredwg-parser-worker.js +3955 -7422
- package/dist/mtext-renderer-worker.js +2727 -2539
- package/lib/app/AcApAnnotation.js +4 -4
- package/lib/app/AcApAnnotation.js.map +1 -1
- package/lib/app/AcApDocManager.d.ts +56 -2
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +182 -31
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/index.d.ts +1 -0
- package/lib/app/index.d.ts.map +1 -1
- package/lib/app/index.js +1 -0
- package/lib/app/index.js.map +1 -1
- package/lib/app/openFileProgress.d.ts +10 -0
- package/lib/app/openFileProgress.d.ts.map +1 -0
- package/lib/app/openFileProgress.js +20 -0
- package/lib/app/openFileProgress.js.map +1 -0
- package/lib/command/AcApSwitchBgCmd.d.ts +3 -0
- package/lib/command/AcApSwitchBgCmd.d.ts.map +1 -1
- package/lib/command/AcApSwitchBgCmd.js +14 -7
- package/lib/command/AcApSwitchBgCmd.js.map +1 -1
- package/lib/command/AcApZoomCmd.d.ts.map +1 -1
- package/lib/command/AcApZoomCmd.js +3 -3
- package/lib/command/AcApZoomCmd.js.map +1 -1
- package/lib/command/convert/index.d.ts +0 -1
- package/lib/command/convert/index.d.ts.map +1 -1
- package/lib/command/convert/index.js +0 -1
- package/lib/command/convert/index.js.map +1 -1
- package/lib/command/draw/AcApArcCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApArcCmd.js +47 -20
- package/lib/command/draw/AcApArcCmd.js.map +1 -1
- package/lib/command/draw/AcApCircleCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApCircleCmd.js +5 -6
- package/lib/command/draw/AcApCircleCmd.js.map +1 -1
- package/lib/command/draw/AcApEllipseCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApEllipseCmd.js +4 -6
- package/lib/command/draw/AcApEllipseCmd.js.map +1 -1
- package/lib/command/draw/AcApMLineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApMLineCmd.js +4 -7
- package/lib/command/draw/AcApMLineCmd.js.map +1 -1
- package/lib/command/draw/AcApMTextCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApMTextCmd.js +3 -1
- package/lib/command/draw/AcApMTextCmd.js.map +1 -1
- package/lib/command/draw/AcApPolygonCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApPolygonCmd.js +4 -5
- package/lib/command/draw/AcApPolygonCmd.js.map +1 -1
- package/lib/command/draw/AcApPolylineCmd.d.ts +49 -0
- package/lib/command/draw/AcApPolylineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApPolylineCmd.js +200 -18
- package/lib/command/draw/AcApPolylineCmd.js.map +1 -1
- package/lib/command/draw/AcApRayCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApRayCmd.js +2 -3
- package/lib/command/draw/AcApRayCmd.js.map +1 -1
- package/lib/command/draw/AcApRectCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApRectCmd.js +10 -10
- package/lib/command/draw/AcApRectCmd.js.map +1 -1
- package/lib/command/draw/AcApSplineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApSplineCmd.js +3 -6
- package/lib/command/draw/AcApSplineCmd.js.map +1 -1
- package/lib/command/draw/AcApXLineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApXLineCmd.js +2 -3
- package/lib/command/draw/AcApXLineCmd.js.map +1 -1
- package/lib/command/measure/AcApClearMeasurementsCmd.d.ts +11 -0
- package/lib/command/measure/AcApClearMeasurementsCmd.d.ts.map +1 -1
- package/lib/command/measure/AcApClearMeasurementsCmd.js +15 -4
- package/lib/command/measure/AcApClearMeasurementsCmd.js.map +1 -1
- package/lib/command/measure/AcApMeasureAngleCmd.d.ts.map +1 -1
- package/lib/command/measure/AcApMeasureAngleCmd.js +15 -6
- package/lib/command/measure/AcApMeasureAngleCmd.js.map +1 -1
- package/lib/command/measure/AcApMeasureArcCmd.d.ts.map +1 -1
- package/lib/command/measure/AcApMeasureArcCmd.js +11 -4
- package/lib/command/measure/AcApMeasureArcCmd.js.map +1 -1
- package/lib/command/measure/AcApMeasureAreaCmd.d.ts.map +1 -1
- package/lib/command/measure/AcApMeasureAreaCmd.js +11 -4
- package/lib/command/measure/AcApMeasureAreaCmd.js.map +1 -1
- package/lib/command/measure/AcApMeasureDistanceCmd.d.ts +3 -2
- package/lib/command/measure/AcApMeasureDistanceCmd.d.ts.map +1 -1
- package/lib/command/measure/AcApMeasureDistanceCmd.js +14 -6
- package/lib/command/measure/AcApMeasureDistanceCmd.js.map +1 -1
- package/lib/command/modify/AcApOffsetCmd.d.ts +30 -0
- package/lib/command/modify/AcApOffsetCmd.d.ts.map +1 -0
- package/lib/command/modify/AcApOffsetCmd.js +425 -0
- package/lib/command/modify/AcApOffsetCmd.js.map +1 -0
- package/lib/command/modify/AcApRotateCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApRotateCmd.js +3 -4
- package/lib/command/modify/AcApRotateCmd.js.map +1 -1
- package/lib/command/modify/index.d.ts +1 -0
- package/lib/command/modify/index.d.ts.map +1 -1
- package/lib/command/modify/index.js +1 -0
- package/lib/command/modify/index.js.map +1 -1
- package/lib/command/review/AcApRevCircleCmd.d.ts.map +1 -1
- package/lib/command/review/AcApRevCircleCmd.js +4 -1
- package/lib/command/review/AcApRevCircleCmd.js.map +1 -1
- package/lib/editor/global/AcEdUiColor.d.ts +183 -0
- package/lib/editor/global/AcEdUiColor.d.ts.map +1 -0
- package/lib/editor/global/AcEdUiColor.js +224 -0
- package/lib/editor/global/AcEdUiColor.js.map +1 -0
- package/lib/editor/global/AcEdUiTheme.d.ts +0 -1
- package/lib/editor/global/AcEdUiTheme.d.ts.map +1 -1
- package/lib/editor/global/AcEdUiTheme.js +0 -5
- package/lib/editor/global/AcEdUiTheme.js.map +1 -1
- package/lib/editor/global/eventBus.d.ts +3 -0
- package/lib/editor/global/eventBus.d.ts.map +1 -1
- package/lib/editor/global/eventBus.js.map +1 -1
- package/lib/editor/global/index.d.ts +1 -0
- package/lib/editor/global/index.d.ts.map +1 -1
- package/lib/editor/global/index.js +1 -0
- package/lib/editor/global/index.js.map +1 -1
- package/lib/editor/input/AcEdCursorManager.d.ts +4 -0
- package/lib/editor/input/AcEdCursorManager.d.ts.map +1 -1
- package/lib/editor/input/AcEdCursorManager.js +11 -8
- package/lib/editor/input/AcEdCursorManager.js.map +1 -1
- package/lib/editor/input/AcEdOrthoMode.d.ts +11 -0
- package/lib/editor/input/AcEdOrthoMode.d.ts.map +1 -0
- package/lib/editor/input/AcEdOrthoMode.js +22 -0
- package/lib/editor/input/AcEdOrthoMode.js.map +1 -0
- package/lib/editor/input/AcEdPolarTracking.d.ts +107 -0
- package/lib/editor/input/AcEdPolarTracking.d.ts.map +1 -0
- package/lib/editor/input/AcEdPolarTracking.js +398 -0
- package/lib/editor/input/AcEdPolarTracking.js.map +1 -0
- package/lib/editor/input/AcEdSelectionFilter.js +7 -6
- package/lib/editor/input/AcEdSelectionFilter.js.map +1 -1
- package/lib/editor/input/AcEditor.d.ts +4 -0
- package/lib/editor/input/AcEditor.d.ts.map +1 -1
- package/lib/editor/input/AcEditor.js +6 -0
- package/lib/editor/input/AcEditor.js.map +1 -1
- package/lib/editor/input/index.d.ts +2 -0
- package/lib/editor/input/index.d.ts.map +1 -1
- package/lib/editor/input/index.js +2 -0
- package/lib/editor/input/index.js.map +1 -1
- package/lib/editor/input/marker/AcEdMarker.d.ts.map +1 -1
- package/lib/editor/input/marker/AcEdMarker.js +3 -2
- package/lib/editor/input/marker/AcEdMarker.js.map +1 -1
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts +4 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.d.ts.map +1 -1
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.js +11 -0
- package/lib/editor/input/marker/AcEdOSnapMarkerManager.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js +1 -1
- package/lib/editor/input/prompt/AcEdPromptDistanceOptions.js.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.js +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts +13 -0
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInput.js +48 -3
- package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts +5 -0
- package/lib/editor/input/ui/AcEdFloatingInputTypes.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingMessage.js +1 -1
- package/lib/editor/input/ui/AcEdFloatingMessage.js.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.d.ts +25 -6
- package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.js +164 -63
- package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
- package/lib/editor/input/ui/AcEdMTextEditor.d.ts +67 -2
- package/lib/editor/input/ui/AcEdMTextEditor.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdMTextEditor.js +213 -21
- package/lib/editor/input/ui/AcEdMTextEditor.js.map +1 -1
- package/lib/editor/input/ui/AcEdRubberBand.d.ts +8 -0
- package/lib/editor/input/ui/AcEdRubberBand.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdRubberBand.js +62 -37
- package/lib/editor/input/ui/AcEdRubberBand.js.map +1 -1
- package/lib/i18n/en/command.d.ts +71 -11
- package/lib/i18n/en/command.d.ts.map +1 -1
- package/lib/i18n/en/command.js +74 -14
- 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 +71 -11
- package/lib/i18n/zh/command.d.ts.map +1 -1
- package/lib/i18n/zh/command.js +74 -14
- 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 +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/plugin/AcApLazyPluginRegistration.d.ts +28 -0
- package/lib/plugin/AcApLazyPluginRegistration.d.ts.map +1 -0
- package/lib/plugin/AcApLazyPluginRegistration.js +2 -0
- package/lib/plugin/AcApLazyPluginRegistration.js.map +1 -0
- package/lib/plugin/AcApPluginManager.d.ts +38 -0
- package/lib/plugin/AcApPluginManager.d.ts.map +1 -1
- package/lib/plugin/AcApPluginManager.js +147 -22
- package/lib/plugin/AcApPluginManager.js.map +1 -1
- package/lib/plugin/index.d.ts +1 -0
- package/lib/plugin/index.d.ts.map +1 -1
- package/lib/plugin/index.js +1 -0
- package/lib/plugin/index.js.map +1 -1
- package/lib/util/AcApExportFileNameUtil.d.ts +22 -0
- package/lib/util/AcApExportFileNameUtil.d.ts.map +1 -0
- package/lib/util/AcApExportFileNameUtil.js +49 -0
- package/lib/util/AcApExportFileNameUtil.js.map +1 -0
- package/lib/util/AcApFontUtil.d.ts +79 -0
- package/lib/util/AcApFontUtil.d.ts.map +1 -0
- package/lib/util/AcApFontUtil.js +173 -0
- package/lib/util/AcApFontUtil.js.map +1 -0
- package/lib/util/index.d.ts +3 -0
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +3 -0
- package/lib/util/index.js.map +1 -1
- package/lib/util/yieldToMain.d.ts +5 -0
- package/lib/util/yieldToMain.d.ts.map +1 -0
- package/lib/util/yieldToMain.js +11 -0
- package/lib/util/yieldToMain.js.map +1 -0
- package/lib/view/AcTrLayoutView.d.ts +13 -1
- package/lib/view/AcTrLayoutView.d.ts.map +1 -1
- package/lib/view/AcTrLayoutView.js +20 -1
- package/lib/view/AcTrLayoutView.js.map +1 -1
- package/lib/view/AcTrLayoutViewManager.d.ts +3 -1
- package/lib/view/AcTrLayoutViewManager.d.ts.map +1 -1
- package/lib/view/AcTrLayoutViewManager.js +4 -2
- package/lib/view/AcTrLayoutViewManager.js.map +1 -1
- package/lib/view/AcTrScene.d.ts +38 -6
- package/lib/view/AcTrScene.d.ts.map +1 -1
- package/lib/view/AcTrScene.js +57 -30
- package/lib/view/AcTrScene.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +184 -1
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +657 -104
- package/lib/view/AcTrView2d.js.map +1 -1
- package/lib/view/index.d.ts +1 -0
- package/lib/view/index.d.ts.map +1 -1
- package/lib/view/index.js +1 -0
- package/lib/view/index.js.map +1 -1
- package/package.json +12 -9
- package/lib/command/convert/AcApConvertToSvgCmd.d.ts +0 -32
- package/lib/command/convert/AcApConvertToSvgCmd.d.ts.map +0 -1
- package/lib/command/convert/AcApConvertToSvgCmd.js +0 -98
- package/lib/command/convert/AcApConvertToSvgCmd.js.map +0 -1
- package/lib/command/convert/AcApSvgConvertor.d.ts +0 -53
- package/lib/command/convert/AcApSvgConvertor.d.ts.map +0 -1
- package/lib/command/convert/AcApSvgConvertor.js +0 -103
- package/lib/command/convert/AcApSvgConvertor.js.map +0 -1
|
@@ -1,16 +1,39 @@
|
|
|
1
|
-
import { AcGePoint3dLike } from '@mlightcad/data-model';
|
|
2
|
-
import { type MTextToolbarColorPickerFactory } from '@mlightcad/mtext-input-box';
|
|
1
|
+
import { AcGePoint3dLike, AcGiMTextAttachmentPoint } from '@mlightcad/data-model';
|
|
2
|
+
import { MTextInputBox, type MTextToolbarColorPickerFactory } from '@mlightcad/mtext-input-box';
|
|
3
3
|
import { AcTrView2d } from '../../../view';
|
|
4
|
+
export type AcEdMTextEditorCurrentFormatChangeListener = () => void;
|
|
5
|
+
export interface AcEdMTextEditorCurrentFormatObservable {
|
|
6
|
+
addCurrentFormatChangeListener: (listener: AcEdMTextEditorCurrentFormatChangeListener) => void;
|
|
7
|
+
removeCurrentFormatChangeListener: (listener: AcEdMTextEditorCurrentFormatChangeListener) => void;
|
|
8
|
+
}
|
|
9
|
+
export type AcEdMTextEditorActiveInputBox = MTextInputBox & Partial<AcEdMTextEditorCurrentFormatObservable> & {
|
|
10
|
+
/**
|
|
11
|
+
* Returns keyboard focus to the hidden IME input used by the editor.
|
|
12
|
+
*
|
|
13
|
+
* Contextual ribbon controls use this after formatting commands so the
|
|
14
|
+
* inline editor keeps behaving like its built-in toolbar.
|
|
15
|
+
*/
|
|
16
|
+
focusEditor?: () => void;
|
|
17
|
+
/** Returns whether the current selection is a non-script stacked fraction. */
|
|
18
|
+
isStackSelectionActive?: () => boolean;
|
|
19
|
+
};
|
|
20
|
+
export type AcEdMTextEditorActiveInputBoxChangeListener = (inputBox: AcEdMTextEditorActiveInputBox | null) => void;
|
|
4
21
|
/**
|
|
5
22
|
* Result payload returned by the MTEXT editor when editing is finished.
|
|
6
23
|
*/
|
|
7
24
|
export interface AcEdMTextEditorResult {
|
|
8
25
|
/** Final MTEXT contents (including inline formatting codes). */
|
|
9
26
|
contents: string;
|
|
27
|
+
/** Final MTEXT insertion location in world coordinates. */
|
|
28
|
+
location: AcGePoint3dLike;
|
|
10
29
|
/** Final text box width in world units. */
|
|
11
30
|
width: number;
|
|
12
31
|
/** Final text box height in world units. */
|
|
13
32
|
height: number;
|
|
33
|
+
/** Line spacing factor used by the MTEXT input box renderer. */
|
|
34
|
+
lineSpacingFactor: number;
|
|
35
|
+
/** MTEXT attachment (DXF group 71) matching the editor justify control. */
|
|
36
|
+
attachmentPoint: AcGiMTextAttachmentPoint;
|
|
14
37
|
}
|
|
15
38
|
/**
|
|
16
39
|
* Options used to open an interactive MTEXT editor.
|
|
@@ -20,6 +43,11 @@ export interface AcEdMTextEditorOptions {
|
|
|
20
43
|
view: AcTrView2d;
|
|
21
44
|
/** Insertion location (top-left anchor) in world coordinates. */
|
|
22
45
|
location: AcGePoint3dLike;
|
|
46
|
+
/**
|
|
47
|
+
* Initial MTEXT attachment (DXF 71). When omitted, the editor uses top-left
|
|
48
|
+
* until the user changes justify in the ribbon.
|
|
49
|
+
*/
|
|
50
|
+
initialAttachmentPoint?: AcGiMTextAttachmentPoint;
|
|
23
51
|
/** Initial MTEXT box width in world units. */
|
|
24
52
|
width: number;
|
|
25
53
|
/** Default text height in world units. */
|
|
@@ -39,6 +67,11 @@ export interface AcEdMTextEditorOptions {
|
|
|
39
67
|
* color input in the MTEXT toolbar.
|
|
40
68
|
*/
|
|
41
69
|
toolbarColorPicker?: MTextToolbarColorPickerFactory;
|
|
70
|
+
/**
|
|
71
|
+
* Controls the built-in MTEXT input box toolbar for this editor instance.
|
|
72
|
+
* Defaults to {@link AcEdMTextEditor.defaultToolbarEnabled}.
|
|
73
|
+
*/
|
|
74
|
+
toolbarEnabled?: boolean;
|
|
42
75
|
}
|
|
43
76
|
/**
|
|
44
77
|
* Lightweight wrapper around `MTextInputBox` for CAD editor integration.
|
|
@@ -47,12 +80,21 @@ export interface AcEdMTextEditorOptions {
|
|
|
47
80
|
* render loop and handles lifecycle cleanup when the editor is closed.
|
|
48
81
|
*/
|
|
49
82
|
export declare class AcEdMTextEditor {
|
|
83
|
+
static readonly defaultLineSpacingFactor = 0.3;
|
|
84
|
+
private static activeInputBox;
|
|
85
|
+
private static readonly activeInputBoxChangeListeners;
|
|
50
86
|
/**
|
|
51
87
|
* Default toolbar color picker factory used when opening the editor if
|
|
52
88
|
* per-call options do not provide {@link AcEdMTextEditorOptions.toolbarColorPicker}.
|
|
53
89
|
* Set via {@link AcEdMTextEditor.setDefaultColorPicker}.
|
|
54
90
|
*/
|
|
55
91
|
static defaultColorPicker: MTextToolbarColorPickerFactory | null;
|
|
92
|
+
/**
|
|
93
|
+
* Default visibility for the built-in MTEXT input box toolbar. Applications
|
|
94
|
+
* with their own contextual ribbon can disable this while keeping the input
|
|
95
|
+
* box editor active.
|
|
96
|
+
*/
|
|
97
|
+
static defaultToolbarEnabled: boolean;
|
|
56
98
|
/**
|
|
57
99
|
* Registers a default toolbar color picker factory. The factory is used for
|
|
58
100
|
* every subsequent {@link open} call unless overridden by
|
|
@@ -61,6 +103,29 @@ export declare class AcEdMTextEditor {
|
|
|
61
103
|
* @param factory - Factory to use, or `null` to clear and use the built-in picker.
|
|
62
104
|
*/
|
|
63
105
|
static setDefaultColorPicker(factory: MTextToolbarColorPickerFactory | null): void;
|
|
106
|
+
/**
|
|
107
|
+
* Registers the default built-in toolbar visibility for subsequent
|
|
108
|
+
* {@link open} calls.
|
|
109
|
+
*
|
|
110
|
+
* @param enabled - `true` to show the MTEXT input box toolbar by default.
|
|
111
|
+
*/
|
|
112
|
+
static setDefaultToolbarEnabled(enabled: boolean): void;
|
|
113
|
+
/**
|
|
114
|
+
* Returns the MTEXT input box currently being edited, if any.
|
|
115
|
+
*/
|
|
116
|
+
static getActiveInputBox(): AcEdMTextEditorActiveInputBox | null;
|
|
117
|
+
/**
|
|
118
|
+
* Subscribes to active MTEXT input box changes.
|
|
119
|
+
*/
|
|
120
|
+
static addActiveInputBoxChangeListener(listener: AcEdMTextEditorActiveInputBoxChangeListener): void;
|
|
121
|
+
/**
|
|
122
|
+
* Removes an active MTEXT input box listener.
|
|
123
|
+
*/
|
|
124
|
+
static removeActiveInputBoxChangeListener(listener: AcEdMTextEditorActiveInputBoxChangeListener): void;
|
|
125
|
+
private static setActiveInputBox;
|
|
126
|
+
private static createHiddenToolbarContainer;
|
|
127
|
+
private static attachFormatBridge;
|
|
128
|
+
private static detachFormatBridge;
|
|
64
129
|
/**
|
|
65
130
|
* Opens the MTEXT editor and resolves when user closes the editor UI.
|
|
66
131
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdMTextEditor.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdMTextEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,eAAe,
|
|
1
|
+
{"version":3,"file":"AcEdMTextEditor.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdMTextEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,eAAe,EACf,wBAAwB,EACzB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,aAAa,EACb,KAAK,8BAA8B,EAEpC,MAAM,4BAA4B,CAAA;AAKnC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAkB1C,MAAM,MAAM,0CAA0C,GAAG,MAAM,IAAI,CAAA;AACnE,MAAM,WAAW,sCAAsC;IACrD,8BAA8B,EAAE,CAC9B,QAAQ,EAAE,0CAA0C,KACjD,IAAI,CAAA;IACT,iCAAiC,EAAE,CACjC,QAAQ,EAAE,0CAA0C,KACjD,IAAI,CAAA;CACV;AACD,MAAM,MAAM,6BAA6B,GAAG,aAAa,GACvD,OAAO,CAAC,sCAAsC,CAAC,GAAG;IAChD;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,8EAA8E;IAC9E,sBAAsB,CAAC,EAAE,MAAM,OAAO,CAAA;CACvC,CAAA;AACH,MAAM,MAAM,2CAA2C,GAAG,CACxD,QAAQ,EAAE,6BAA6B,GAAG,IAAI,KAC3C,IAAI,CAAA;AAkCT;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAA;IAChB,2DAA2D;IAC3D,QAAQ,EAAE,eAAe,CAAA;IACzB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,4CAA4C;IAC5C,MAAM,EAAE,MAAM,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;;OAEG;IACH,MAAM,CAAC,kCAAkC,CACvC,QAAQ,EAAE,2CAA2C,GACpD,IAAI;IAIP,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAQhC,OAAO,CAAC,MAAM,CAAC,4BAA4B;IAa3C,OAAO,CAAC,MAAM,CAAC,kBAAkB;IA8HjC,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAKjC;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC;CAyK7E"}
|
|
@@ -11,9 +11,22 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { AcDbSystemVariables, AcDbSysVarManager } from '@mlightcad/data-model';
|
|
13
13
|
import { MTextInputBox } from '@mlightcad/mtext-input-box';
|
|
14
|
-
import { MTextColor } from '@mlightcad/mtext-renderer';
|
|
14
|
+
import { MTextAttachmentPoint, MTextColor } from '@mlightcad/mtext-renderer';
|
|
15
15
|
import * as THREE from 'three';
|
|
16
16
|
import { AcApDocManager } from '../../../app';
|
|
17
|
+
import { isLightBackground } from '../../global/AcEdUiColor';
|
|
18
|
+
function acGiAttachmentToMText(ap) {
|
|
19
|
+
if (ap === undefined)
|
|
20
|
+
return undefined;
|
|
21
|
+
var v = ap;
|
|
22
|
+
if (v >= 1 && v <= 12)
|
|
23
|
+
return v;
|
|
24
|
+
return MTextAttachmentPoint.TopLeft;
|
|
25
|
+
}
|
|
26
|
+
function mTextAttachmentToAcGi(ap) {
|
|
27
|
+
return ap;
|
|
28
|
+
}
|
|
29
|
+
var mtextFormatBridgeKey = '__mlightcadMTextFormatBridge';
|
|
17
30
|
/**
|
|
18
31
|
* Lightweight wrapper around `MTextInputBox` for CAD editor integration.
|
|
19
32
|
*
|
|
@@ -33,6 +46,159 @@ var AcEdMTextEditor = /** @class */ (function () {
|
|
|
33
46
|
AcEdMTextEditor.setDefaultColorPicker = function (factory) {
|
|
34
47
|
AcEdMTextEditor.defaultColorPicker = factory;
|
|
35
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* Registers the default built-in toolbar visibility for subsequent
|
|
51
|
+
* {@link open} calls.
|
|
52
|
+
*
|
|
53
|
+
* @param enabled - `true` to show the MTEXT input box toolbar by default.
|
|
54
|
+
*/
|
|
55
|
+
AcEdMTextEditor.setDefaultToolbarEnabled = function (enabled) {
|
|
56
|
+
AcEdMTextEditor.defaultToolbarEnabled = enabled;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Returns the MTEXT input box currently being edited, if any.
|
|
60
|
+
*/
|
|
61
|
+
AcEdMTextEditor.getActiveInputBox = function () {
|
|
62
|
+
return AcEdMTextEditor.activeInputBox;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Subscribes to active MTEXT input box changes.
|
|
66
|
+
*/
|
|
67
|
+
AcEdMTextEditor.addActiveInputBoxChangeListener = function (listener) {
|
|
68
|
+
AcEdMTextEditor.activeInputBoxChangeListeners.add(listener);
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Removes an active MTEXT input box listener.
|
|
72
|
+
*/
|
|
73
|
+
AcEdMTextEditor.removeActiveInputBoxChangeListener = function (listener) {
|
|
74
|
+
AcEdMTextEditor.activeInputBoxChangeListeners.delete(listener);
|
|
75
|
+
};
|
|
76
|
+
AcEdMTextEditor.setActiveInputBox = function (inputBox) {
|
|
77
|
+
if (AcEdMTextEditor.activeInputBox === inputBox)
|
|
78
|
+
return;
|
|
79
|
+
AcEdMTextEditor.activeInputBox = inputBox;
|
|
80
|
+
AcEdMTextEditor.activeInputBoxChangeListeners.forEach(function (listener) {
|
|
81
|
+
listener(inputBox);
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
AcEdMTextEditor.createHiddenToolbarContainer = function (parent) {
|
|
85
|
+
var container = parent.ownerDocument.createElement('div');
|
|
86
|
+
container.setAttribute('aria-hidden', 'true');
|
|
87
|
+
Object.assign(container.style, {
|
|
88
|
+
display: 'none',
|
|
89
|
+
pointerEvents: 'none'
|
|
90
|
+
});
|
|
91
|
+
parent.appendChild(container);
|
|
92
|
+
return container;
|
|
93
|
+
};
|
|
94
|
+
AcEdMTextEditor.attachFormatBridge = function (inputBox) {
|
|
95
|
+
var runtime = inputBox;
|
|
96
|
+
if (runtime[mtextFormatBridgeKey])
|
|
97
|
+
return;
|
|
98
|
+
var listeners = new Set();
|
|
99
|
+
var restoreMethods = [];
|
|
100
|
+
var notifyFormatChanged = function () {
|
|
101
|
+
listeners.forEach(function (listener) {
|
|
102
|
+
listener();
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
var wrapMethod = function (methodName) {
|
|
106
|
+
var original = runtime[methodName];
|
|
107
|
+
if (typeof original !== 'function')
|
|
108
|
+
return;
|
|
109
|
+
runtime[methodName] = function () {
|
|
110
|
+
var args = [];
|
|
111
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
112
|
+
args[_i] = arguments[_i];
|
|
113
|
+
}
|
|
114
|
+
var result = original.apply(runtime, args);
|
|
115
|
+
notifyFormatChanged();
|
|
116
|
+
return result;
|
|
117
|
+
};
|
|
118
|
+
restoreMethods.push(function () {
|
|
119
|
+
runtime[methodName] = original;
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
[
|
|
123
|
+
'setCurrentFormat',
|
|
124
|
+
'refreshCurrentFormatFromDocument',
|
|
125
|
+
'toggleCase',
|
|
126
|
+
'toggleStackSelection',
|
|
127
|
+
'toggleScriptSelection',
|
|
128
|
+
'setParagraphAlignment',
|
|
129
|
+
'setAttachmentPoint',
|
|
130
|
+
'setLineSpacingFactor',
|
|
131
|
+
'clearLineSpacing'
|
|
132
|
+
].forEach(wrapMethod);
|
|
133
|
+
runtime.addCurrentFormatChangeListener = function (listener) {
|
|
134
|
+
listeners.add(listener);
|
|
135
|
+
};
|
|
136
|
+
runtime.removeCurrentFormatChangeListener = function (listener) {
|
|
137
|
+
listeners.delete(listener);
|
|
138
|
+
};
|
|
139
|
+
runtime.focusEditor = function () {
|
|
140
|
+
var runtimeMethods = runtime;
|
|
141
|
+
var focus = runtimeMethods.focusImeInput;
|
|
142
|
+
if (typeof focus === 'function') {
|
|
143
|
+
focus.call(runtime);
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
var refocusSoon = runtimeMethods.refocusImeInputSoon;
|
|
147
|
+
if (typeof refocusSoon === 'function') {
|
|
148
|
+
refocusSoon.call(runtime);
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
runtime.isStackSelectionActive = function () {
|
|
152
|
+
var _a, _b, _c, _d, _e;
|
|
153
|
+
var runtimeMethods = runtime;
|
|
154
|
+
var getSelectionRange = runtimeMethods.getSelectionRange;
|
|
155
|
+
var toDocumentIndexFromLogicalIndex = runtimeMethods.toDocumentIndexFromLogicalIndex;
|
|
156
|
+
var isScriptOnlyStack = runtimeMethods.isScriptOnlyStack;
|
|
157
|
+
var document = runtimeMethods.document;
|
|
158
|
+
if (typeof getSelectionRange !== 'function' ||
|
|
159
|
+
typeof toDocumentIndexFromLogicalIndex !== 'function') {
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
var selection = getSelectionRange.call(runtime);
|
|
163
|
+
if (!selection || selection.isCollapsed)
|
|
164
|
+
return false;
|
|
165
|
+
var start = toDocumentIndexFromLogicalIndex.call(runtime, selection.start, true);
|
|
166
|
+
var end = toDocumentIndexFromLogicalIndex.call(runtime, selection.end, false);
|
|
167
|
+
var selectedNodes = (_c = (_b = (_a = document === null || document === void 0 ? void 0 : document.ast) === null || _a === void 0 ? void 0 : _a.nodes) === null || _b === void 0 ? void 0 : _b.slice(start, end)) !== null && _c !== void 0 ? _c : [];
|
|
168
|
+
var stackNode = selectedNodes[0];
|
|
169
|
+
if (selectedNodes.length !== 1 || (stackNode === null || stackNode === void 0 ? void 0 : stackNode.type) !== 'stack') {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
if (typeof isScriptOnlyStack === 'function') {
|
|
173
|
+
return !isScriptOnlyStack.call(runtime, stackNode);
|
|
174
|
+
}
|
|
175
|
+
if (stackNode.divider !== '^')
|
|
176
|
+
return true;
|
|
177
|
+
var hasNumerator = ((_d = stackNode.numerator) !== null && _d !== void 0 ? _d : '').trim().length > 0;
|
|
178
|
+
var hasDenominator = ((_e = stackNode.denominator) !== null && _e !== void 0 ? _e : '').trim().length > 0;
|
|
179
|
+
return hasNumerator === hasDenominator;
|
|
180
|
+
};
|
|
181
|
+
runtime[mtextFormatBridgeKey] = {
|
|
182
|
+
addCurrentFormatChangeListener: runtime.addCurrentFormatChangeListener,
|
|
183
|
+
removeCurrentFormatChangeListener: runtime.removeCurrentFormatChangeListener,
|
|
184
|
+
dispose: function () {
|
|
185
|
+
restoreMethods.forEach(function (restore) {
|
|
186
|
+
restore();
|
|
187
|
+
});
|
|
188
|
+
listeners.clear();
|
|
189
|
+
delete runtime.addCurrentFormatChangeListener;
|
|
190
|
+
delete runtime.removeCurrentFormatChangeListener;
|
|
191
|
+
delete runtime.focusEditor;
|
|
192
|
+
delete runtime.isStackSelectionActive;
|
|
193
|
+
delete runtime[mtextFormatBridgeKey];
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
AcEdMTextEditor.detachFormatBridge = function (inputBox) {
|
|
198
|
+
var _a;
|
|
199
|
+
var runtime = inputBox;
|
|
200
|
+
(_a = runtime[mtextFormatBridgeKey]) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
201
|
+
};
|
|
36
202
|
/**
|
|
37
203
|
* Opens the MTEXT editor and resolves when user closes the editor UI.
|
|
38
204
|
*
|
|
@@ -48,10 +214,10 @@ var AcEdMTextEditor = /** @class */ (function () {
|
|
|
48
214
|
*/
|
|
49
215
|
AcEdMTextEditor.prototype.open = function (options) {
|
|
50
216
|
var _a, _b;
|
|
51
|
-
var view = options.view, location = options.location, width = options.width, textHeight = options.textHeight, _c = options.initialText, initialText = _c === void 0 ? '' : _c, _d = options.toolbarFontFamilies, toolbarFontFamilies = _d === void 0 ? [] : _d, toolbarColorPicker = options.toolbarColorPicker;
|
|
217
|
+
var view = options.view, location = options.location, width = options.width, textHeight = options.textHeight, _c = options.initialText, initialText = _c === void 0 ? '' : _c, _d = options.toolbarFontFamilies, toolbarFontFamilies = _d === void 0 ? [] : _d, toolbarColorPicker = options.toolbarColorPicker, _e = options.toolbarEnabled, toolbarEnabled = _e === void 0 ? AcEdMTextEditor.defaultToolbarEnabled : _e, initialAttachmentPoint = options.initialAttachmentPoint;
|
|
52
218
|
var origin = new THREE.Vector3(location.x, location.y, (_a = location.z) !== null && _a !== void 0 ? _a : 0);
|
|
53
|
-
var
|
|
54
|
-
var cursorColor =
|
|
219
|
+
var isLightBg = isLightBackground(view.backgroundColor);
|
|
220
|
+
var cursorColor = isLightBg ? '#000000' : '#ffffff';
|
|
55
221
|
var docManager = AcApDocManager.instance;
|
|
56
222
|
var database = docManager.curDocument.database;
|
|
57
223
|
var layerColor = docManager.resolveColors().layerColor;
|
|
@@ -76,33 +242,36 @@ var AcEdMTextEditor = /** @class */ (function () {
|
|
|
76
242
|
var layerTextStyle = resolveLayerTextStyle();
|
|
77
243
|
var defaultTextStyle = layerTextStyle
|
|
78
244
|
? __assign(__assign({}, layerTextStyle), { fixedTextHeight: normalizedTextHeight, lastHeight: normalizedTextHeight }) : undefined;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
245
|
+
// MTextInputBox still uses its shared toolbar object for internal format
|
|
246
|
+
// sync while editing. Keep that object alive when the app hides the built-in
|
|
247
|
+
// toolbar, but mount it into a hidden host so only the contextual ribbon is
|
|
248
|
+
// visible.
|
|
249
|
+
var hiddenToolbarContainer = toolbarEnabled
|
|
250
|
+
? null
|
|
251
|
+
: AcEdMTextEditor.createHiddenToolbarContainer(view.container);
|
|
252
|
+
var mtextAttachment = acGiAttachmentToMText(initialAttachmentPoint);
|
|
253
|
+
var mtextInputBox = new MTextInputBox(__assign(__assign({ scene: view.internalScene, camera: view.internalCamera, width: width, position: origin.clone(), initialText: initialText }, (mtextAttachment !== undefined
|
|
254
|
+
? { initialAttachmentPoint: mtextAttachment }
|
|
255
|
+
: {})), { textStyle: defaultTextStyle, cursorStyle: {
|
|
87
256
|
color: cursorColor,
|
|
88
257
|
glowColor: cursorColor
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
colorSettings: {
|
|
258
|
+
}, boundingBoxStyle: {
|
|
259
|
+
padding: 0
|
|
260
|
+
}, imeTarget: view.canvas, colorSettings: {
|
|
92
261
|
layer: database.clayer,
|
|
93
262
|
color: new MTextColor(),
|
|
94
263
|
byLayerColor: layerColor,
|
|
95
264
|
byBlockColor: layerColor
|
|
96
|
-
},
|
|
97
|
-
toolbar: {
|
|
265
|
+
}, toolbar: {
|
|
98
266
|
enabled: true,
|
|
99
267
|
theme: getToolbarTheme(),
|
|
100
268
|
fontFamilies: fontFamilies,
|
|
101
|
-
container: view.container,
|
|
269
|
+
container: hiddenToolbarContainer !== null && hiddenToolbarContainer !== void 0 ? hiddenToolbarContainer : view.container,
|
|
102
270
|
offsetY: 10,
|
|
103
271
|
colorPicker: (_b = toolbarColorPicker !== null && toolbarColorPicker !== void 0 ? toolbarColorPicker : AcEdMTextEditor.defaultColorPicker) !== null && _b !== void 0 ? _b : undefined
|
|
104
|
-
}
|
|
105
|
-
|
|
272
|
+
} }));
|
|
273
|
+
AcEdMTextEditor.attachFormatBridge(mtextInputBox);
|
|
274
|
+
AcEdMTextEditor.setActiveInputBox(mtextInputBox);
|
|
106
275
|
return new Promise(function (resolve) {
|
|
107
276
|
var done = false;
|
|
108
277
|
var onRenderFrame = function () {
|
|
@@ -120,7 +289,12 @@ var AcEdMTextEditor = /** @class */ (function () {
|
|
|
120
289
|
view.isDirty = true;
|
|
121
290
|
};
|
|
122
291
|
var cleanup = function () {
|
|
292
|
+
if (AcEdMTextEditor.activeInputBox === mtextInputBox) {
|
|
293
|
+
AcEdMTextEditor.setActiveInputBox(null);
|
|
294
|
+
}
|
|
295
|
+
AcEdMTextEditor.detachFormatBridge(mtextInputBox);
|
|
123
296
|
mtextInputBox.dispose();
|
|
297
|
+
hiddenToolbarContainer === null || hiddenToolbarContainer === void 0 ? void 0 : hiddenToolbarContainer.remove();
|
|
124
298
|
view.events.renderFrame.removeEventListener(onRenderFrame);
|
|
125
299
|
mtextInputBox.off('close', onClose);
|
|
126
300
|
AcDbSysVarManager.instance().events.sysVarChanged.removeEventListener(onSysVarChanged);
|
|
@@ -134,10 +308,19 @@ var AcEdMTextEditor = /** @class */ (function () {
|
|
|
134
308
|
resolve(result);
|
|
135
309
|
};
|
|
136
310
|
var onClose = function () {
|
|
311
|
+
var _a, _b;
|
|
312
|
+
var insertionPoint = mtextInputBox.getMTextInsertionPoint();
|
|
137
313
|
finish({
|
|
138
314
|
contents: mtextInputBox.getText(),
|
|
315
|
+
location: {
|
|
316
|
+
x: insertionPoint.x,
|
|
317
|
+
y: insertionPoint.y,
|
|
318
|
+
z: insertionPoint.z
|
|
319
|
+
},
|
|
139
320
|
width: width,
|
|
140
|
-
height:
|
|
321
|
+
height: normalizedTextHeight,
|
|
322
|
+
lineSpacingFactor: (_b = (_a = mtextInputBox.getLineSpacingFactor) === null || _a === void 0 ? void 0 : _a.call(mtextInputBox)) !== null && _b !== void 0 ? _b : AcEdMTextEditor.defaultLineSpacingFactor,
|
|
323
|
+
attachmentPoint: mTextAttachmentToAcGi(mtextInputBox.getMTextAttachmentPoint())
|
|
141
324
|
});
|
|
142
325
|
};
|
|
143
326
|
mtextInputBox.on('close', onClose);
|
|
@@ -145,12 +328,21 @@ var AcEdMTextEditor = /** @class */ (function () {
|
|
|
145
328
|
AcDbSysVarManager.instance().events.sysVarChanged.addEventListener(onSysVarChanged);
|
|
146
329
|
});
|
|
147
330
|
};
|
|
331
|
+
AcEdMTextEditor.defaultLineSpacingFactor = 0.3;
|
|
332
|
+
AcEdMTextEditor.activeInputBox = null;
|
|
333
|
+
AcEdMTextEditor.activeInputBoxChangeListeners = new Set();
|
|
148
334
|
/**
|
|
149
335
|
* Default toolbar color picker factory used when opening the editor if
|
|
150
336
|
* per-call options do not provide {@link AcEdMTextEditorOptions.toolbarColorPicker}.
|
|
151
337
|
* Set via {@link AcEdMTextEditor.setDefaultColorPicker}.
|
|
152
338
|
*/
|
|
153
339
|
AcEdMTextEditor.defaultColorPicker = null;
|
|
340
|
+
/**
|
|
341
|
+
* Default visibility for the built-in MTEXT input box toolbar. Applications
|
|
342
|
+
* with their own contextual ribbon can disable this while keeping the input
|
|
343
|
+
* box editor active.
|
|
344
|
+
*/
|
|
345
|
+
AcEdMTextEditor.defaultToolbarEnabled = true;
|
|
154
346
|
return AcEdMTextEditor;
|
|
155
347
|
}());
|
|
156
348
|
export { AcEdMTextEditor };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdMTextEditor.js","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdMTextEditor.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"AcEdMTextEditor.js","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdMTextEditor.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EAGlB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,aAAa,EAGd,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC5E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAE5D,SAAS,qBAAqB,CAC5B,EAAwC;IAExC,IAAI,EAAE,KAAK,SAA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CAAqB,GAAG,IAAI,CAAA;IAgYrC,sBAAC;CAAA,AAnZD,IAmZC;SAnZY,eAAe"}
|
|
@@ -64,6 +64,14 @@ export declare class AcEdRubberBand {
|
|
|
64
64
|
* @param view - View used to convert world coordinates to screen coordinates.
|
|
65
65
|
*/
|
|
66
66
|
constructor(view: AcEdBaseView);
|
|
67
|
+
/**
|
|
68
|
+
* Converts a world point to container-local screen coordinates.
|
|
69
|
+
*/
|
|
70
|
+
private toContainerPoint;
|
|
71
|
+
/**
|
|
72
|
+
* Ensures the overlay host can anchor absolutely positioned children.
|
|
73
|
+
*/
|
|
74
|
+
private ensureHostPositioned;
|
|
67
75
|
/**
|
|
68
76
|
* Starts the rubber-band preview.
|
|
69
77
|
* @param basePoint The starting point in world coordinates.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdRubberBand.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdRubberBand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAe,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"AcEdRubberBand.d.ts","sourceRoot":"","sources":["../../../../src/editor/input/ui/AcEdRubberBand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAe,MAAM,uBAAuB,CAAA;AAGpE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEzC;;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;IAE1B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,IAAI,CAAc;IAC1B,OAAO,CAAC,SAAS,CAAC,CAAa;IAE/B,OAAO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