@mlightcad/cad-simple-viewer 1.1.12 → 1.2.1
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 +19289 -8012
- package/dist/index.umd.cjs +44 -34
- package/dist/mtext-renderer-worker.js +19377 -8127
- package/lib/app/AcApDocManager.d.ts +32 -13
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +33 -20
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcApDocument.d.ts +1 -1
- package/lib/app/AcApDocument.d.ts.map +1 -1
- package/lib/app/AcApDocument.js.map +1 -1
- package/lib/app/AcApFontLoader.d.ts +0 -2
- package/lib/app/AcApFontLoader.d.ts.map +1 -1
- package/lib/app/AcApFontLoader.js +5 -13
- package/lib/app/AcApFontLoader.js.map +1 -1
- package/lib/command/AcApRegenCmd.d.ts +21 -0
- package/lib/command/AcApRegenCmd.d.ts.map +1 -0
- package/lib/command/AcApRegenCmd.js +45 -0
- package/lib/command/AcApRegenCmd.js.map +1 -0
- package/lib/command/index.d.ts +1 -0
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +1 -0
- package/lib/command/index.js.map +1 -1
- package/package.json +7 -7
|
@@ -9,6 +9,27 @@ export interface AcDbDocumentEventArgs {
|
|
|
9
9
|
/** The document involved in the event */
|
|
10
10
|
doc: AcApDocument;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Options for creating AcApDocManager instance
|
|
14
|
+
*/
|
|
15
|
+
export interface AcApDocManagerOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Optional HTML canvas element for rendering. If not provided, a new canvas will be created
|
|
18
|
+
*/
|
|
19
|
+
canvas?: HTMLCanvasElement;
|
|
20
|
+
/**
|
|
21
|
+
* Base URL to load resources (such as fonts annd drawing templates) needed
|
|
22
|
+
*/
|
|
23
|
+
baseUrl?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The flag whether to use main thread or webwork to render drawing.
|
|
26
|
+
* - true: use main thread to render drawing. This approach take less memory and take longer time to show
|
|
27
|
+
* rendering results.
|
|
28
|
+
* - false: use web worker to render drawing. This approach take more memory and take shorter time to show
|
|
29
|
+
* rendering results.
|
|
30
|
+
*/
|
|
31
|
+
useMainThreadDraw?: boolean;
|
|
32
|
+
}
|
|
12
33
|
/**
|
|
13
34
|
* Document manager that handles CAD document lifecycle and provides the main entry point for the CAD viewer.
|
|
14
35
|
*
|
|
@@ -43,7 +64,7 @@ export declare class AcApDocManager {
|
|
|
43
64
|
* Creates an empty document with a 2D view and sets up the application context.
|
|
44
65
|
* Registers default commands and creates an example document.
|
|
45
66
|
*
|
|
46
|
-
* @param
|
|
67
|
+
* @param options -Options for creating AcApDocManager instance
|
|
47
68
|
* @private
|
|
48
69
|
*/
|
|
49
70
|
private constructor();
|
|
@@ -53,16 +74,10 @@ export declare class AcApDocManager {
|
|
|
53
74
|
* This method should be called before accessing the `instance` property
|
|
54
75
|
* if you want to provide a specific canvas element.
|
|
55
76
|
*
|
|
56
|
-
* @param
|
|
77
|
+
* @param options -Options for creating AcApDocManager instance
|
|
57
78
|
* @returns The singleton instance
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* ```typescript
|
|
61
|
-
* const canvas = document.getElementById('my-canvas') as HTMLCanvasElement;
|
|
62
|
-
* const docManager = AcApDocManager.createInstance(canvas);
|
|
63
|
-
* ```
|
|
64
79
|
*/
|
|
65
|
-
static createInstance(
|
|
80
|
+
static createInstance(options?: AcApDocManagerOptions): AcApDocManager | undefined;
|
|
66
81
|
/**
|
|
67
82
|
* Gets the singleton instance of the document manager.
|
|
68
83
|
*
|
|
@@ -110,7 +125,6 @@ export declare class AcApDocManager {
|
|
|
110
125
|
* Base URL to load fonts
|
|
111
126
|
*/
|
|
112
127
|
get baseUrl(): string;
|
|
113
|
-
set baseUrl(value: string);
|
|
114
128
|
/**
|
|
115
129
|
* Gets the list of available fonts that can be loaded.
|
|
116
130
|
*
|
|
@@ -183,12 +197,12 @@ export declare class AcApDocManager {
|
|
|
183
197
|
/**
|
|
184
198
|
* Opens a CAD document from file content.
|
|
185
199
|
*
|
|
186
|
-
* This method loads a document from the provided file content (
|
|
200
|
+
* This method loads a document from the provided file content (binary data)
|
|
187
201
|
* and replaces the current document. It handles the complete document lifecycle
|
|
188
202
|
* including before/after open events.
|
|
189
203
|
*
|
|
190
204
|
* @param fileName - The name of the file being opened (used for format detection)
|
|
191
|
-
* @param content - The file content
|
|
205
|
+
* @param content - The file content
|
|
192
206
|
* @param options - Database opening options including font loader settings
|
|
193
207
|
* @returns Promise that resolves to true if the document was successfully opened, false otherwise
|
|
194
208
|
*
|
|
@@ -198,7 +212,12 @@ export declare class AcApDocManager {
|
|
|
198
212
|
* const success = await docManager.openDocument('drawing.dwg', fileContent, options);
|
|
199
213
|
* ```
|
|
200
214
|
*/
|
|
201
|
-
openDocument(fileName: string, content:
|
|
215
|
+
openDocument(fileName: string, content: ArrayBuffer, options: AcDbOpenDatabaseOptions): Promise<boolean>;
|
|
216
|
+
/**
|
|
217
|
+
* Redraws the current view. Currently it is used once you modified font mapping
|
|
218
|
+
* for missed fonts so that the drawing can apply new fonts.
|
|
219
|
+
*/
|
|
220
|
+
regen(): void;
|
|
202
221
|
/**
|
|
203
222
|
* Registers all default commands available in the CAD viewer.
|
|
204
223
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApDocManager.d.ts","sourceRoot":"","sources":["../../src/app/AcApDocManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAEhB,uBAAuB,EAExB,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"AcApDocManager.d.ts","sourceRoot":"","sources":["../../src/app/AcApDocManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAEhB,uBAAuB,EAExB,MAAM,uBAAuB,CAAA;AAe9B,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAA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;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACG,gBAAgB,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE;IAQvC;;;;;;;;;;;;;;;;;OAiBG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,uBAAuB;IAS5D;;;;;;;;;;;;;;;;;OAiBG;IACG,YAAY,CAChB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,uBAAuB;IAclC;;;OAGG;IACH,KAAK;IAKL;;;;;;;;;;;;;OAaG;IACH,gBAAgB;IAoDhB;;;;;;;;;;;;;OAaG;IACH,mBAAmB,CAAC,MAAM,EAAE,MAAM;IAMlC;;;;;OAKG;IACH,eAAe;IAMf;;;;;;;OAOG;IACH,SAAS,CAAC,oBAAoB;IAI9B;;;;;;;;;OASG;IACH,SAAS,CAAC,mBAAmB,CAAC,SAAS,EAAE,OAAO;IAgBhD;;;;;;;;;;OAUG;IACH,OAAO,CAAC,UAAU;CAQnB"}
|
|
@@ -35,12 +35,14 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
import { AcCmEventManager, acdbHostApplicationServices, AcGeBox2d } from '@mlightcad/data-model';
|
|
38
|
-
import {
|
|
38
|
+
import { AcTrMTextRenderer } from '@mlightcad/three-renderer';
|
|
39
|
+
import { AcApConvertToSvgCmd, AcApOpenCmd, AcApPanCmd, AcApQNewCmd, AcApRegenCmd, AcApSelectCmd, AcApZoomCmd, AcApZoomToBoxCmd, AcEdCommandStack } from '../command';
|
|
39
40
|
import { eventBus } from '../editor';
|
|
40
41
|
import { AcTrView2d } from '../view';
|
|
41
42
|
import { AcApContext } from './AcApContext';
|
|
42
43
|
import { AcApDocument } from './AcApDocument';
|
|
43
44
|
import { AcApFontLoader } from './AcApFontLoader';
|
|
45
|
+
var DEFAULT_BASE_URL = 'https://mlightcad.gitlab.io/cad-data/';
|
|
44
46
|
/**
|
|
45
47
|
* Document manager that handles CAD document lifecycle and provides the main entry point for the CAD viewer.
|
|
46
48
|
*
|
|
@@ -60,10 +62,12 @@ var AcApDocManager = /** @class */ (function () {
|
|
|
60
62
|
* Creates an empty document with a 2D view and sets up the application context.
|
|
61
63
|
* Registers default commands and creates an example document.
|
|
62
64
|
*
|
|
63
|
-
* @param
|
|
65
|
+
* @param options -Options for creating AcApDocManager instance
|
|
64
66
|
* @private
|
|
65
67
|
*/
|
|
66
|
-
function AcApDocManager(
|
|
68
|
+
function AcApDocManager(options) {
|
|
69
|
+
if (options === void 0) { options = {}; }
|
|
70
|
+
var _a;
|
|
67
71
|
/** Events fired during document lifecycle */
|
|
68
72
|
this.events = {
|
|
69
73
|
/** Fired when a new document is created */
|
|
@@ -71,7 +75,13 @@ var AcApDocManager = /** @class */ (function () {
|
|
|
71
75
|
/** Fired when a document becomes active */
|
|
72
76
|
documentActivated: new AcCmEventManager()
|
|
73
77
|
};
|
|
74
|
-
this._baseUrl =
|
|
78
|
+
this._baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : DEFAULT_BASE_URL;
|
|
79
|
+
if (options.useMainThreadDraw) {
|
|
80
|
+
AcTrMTextRenderer.getInstance().setRenderMode('main');
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
AcTrMTextRenderer.getInstance().setRenderMode('worker');
|
|
84
|
+
}
|
|
75
85
|
// Create one empty drawing
|
|
76
86
|
var doc = new AcApDocument();
|
|
77
87
|
doc.database.events.openProgress.addEventListener(function (args) {
|
|
@@ -90,7 +100,10 @@ var AcApDocManager = /** @class */ (function () {
|
|
|
90
100
|
height: window.innerHeight - 30
|
|
91
101
|
};
|
|
92
102
|
};
|
|
93
|
-
var view = new AcTrView2d({
|
|
103
|
+
var view = new AcTrView2d({
|
|
104
|
+
canvas: options.canvas,
|
|
105
|
+
calculateSizeCallback: callback
|
|
106
|
+
});
|
|
94
107
|
this._context = new AcApContext(view, doc);
|
|
95
108
|
this._fontLoader = new AcApFontLoader();
|
|
96
109
|
this._fontLoader.baseUrl = this._baseUrl + 'fonts/';
|
|
@@ -103,18 +116,13 @@ var AcApDocManager = /** @class */ (function () {
|
|
|
103
116
|
* This method should be called before accessing the `instance` property
|
|
104
117
|
* if you want to provide a specific canvas element.
|
|
105
118
|
*
|
|
106
|
-
* @param
|
|
119
|
+
* @param options -Options for creating AcApDocManager instance
|
|
107
120
|
* @returns The singleton instance
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* ```typescript
|
|
111
|
-
* const canvas = document.getElementById('my-canvas') as HTMLCanvasElement;
|
|
112
|
-
* const docManager = AcApDocManager.createInstance(canvas);
|
|
113
|
-
* ```
|
|
114
121
|
*/
|
|
115
|
-
AcApDocManager.createInstance = function (
|
|
122
|
+
AcApDocManager.createInstance = function (options) {
|
|
123
|
+
if (options === void 0) { options = {}; }
|
|
116
124
|
if (AcApDocManager._instance == null) {
|
|
117
|
-
AcApDocManager._instance = new AcApDocManager(
|
|
125
|
+
AcApDocManager._instance = new AcApDocManager(options);
|
|
118
126
|
}
|
|
119
127
|
return this._instance;
|
|
120
128
|
};
|
|
@@ -207,10 +215,6 @@ var AcApDocManager = /** @class */ (function () {
|
|
|
207
215
|
get: function () {
|
|
208
216
|
return this._baseUrl;
|
|
209
217
|
},
|
|
210
|
-
set: function (value) {
|
|
211
|
-
this._baseUrl = value;
|
|
212
|
-
this._fontLoader.baseUrl = value + 'fonts/';
|
|
213
|
-
},
|
|
214
218
|
enumerable: false,
|
|
215
219
|
configurable: true
|
|
216
220
|
});
|
|
@@ -337,12 +341,12 @@ var AcApDocManager = /** @class */ (function () {
|
|
|
337
341
|
/**
|
|
338
342
|
* Opens a CAD document from file content.
|
|
339
343
|
*
|
|
340
|
-
* This method loads a document from the provided file content (
|
|
344
|
+
* This method loads a document from the provided file content (binary data)
|
|
341
345
|
* and replaces the current document. It handles the complete document lifecycle
|
|
342
346
|
* including before/after open events.
|
|
343
347
|
*
|
|
344
348
|
* @param fileName - The name of the file being opened (used for format detection)
|
|
345
|
-
* @param content - The file content
|
|
349
|
+
* @param content - The file content
|
|
346
350
|
* @param options - Database opening options including font loader settings
|
|
347
351
|
* @returns Promise that resolves to true if the document was successfully opened, false otherwise
|
|
348
352
|
*
|
|
@@ -369,6 +373,14 @@ var AcApDocManager = /** @class */ (function () {
|
|
|
369
373
|
});
|
|
370
374
|
});
|
|
371
375
|
};
|
|
376
|
+
/**
|
|
377
|
+
* Redraws the current view. Currently it is used once you modified font mapping
|
|
378
|
+
* for missed fonts so that the drawing can apply new fonts.
|
|
379
|
+
*/
|
|
380
|
+
AcApDocManager.prototype.regen = function () {
|
|
381
|
+
this.curView.clear();
|
|
382
|
+
this.context.doc.database.regen();
|
|
383
|
+
};
|
|
372
384
|
/**
|
|
373
385
|
* Registers all default commands available in the CAD viewer.
|
|
374
386
|
*
|
|
@@ -386,6 +398,7 @@ var AcApDocManager = /** @class */ (function () {
|
|
|
386
398
|
AcApDocManager.prototype.registerCommands = function () {
|
|
387
399
|
var register = AcEdCommandStack.instance;
|
|
388
400
|
register.addCommand(AcEdCommandStack.SYSTEMT_COMMAND_GROUP_NAME, 'pan', 'pan', new AcApPanCmd());
|
|
401
|
+
register.addCommand(AcEdCommandStack.SYSTEMT_COMMAND_GROUP_NAME, 'regen', 'regen', new AcApRegenCmd());
|
|
389
402
|
register.addCommand(AcEdCommandStack.SYSTEMT_COMMAND_GROUP_NAME, 'select', 'select', new AcApSelectCmd());
|
|
390
403
|
register.addCommand(AcEdCommandStack.SYSTEMT_COMMAND_GROUP_NAME, 'zoom', 'zoom', new AcApZoomCmd());
|
|
391
404
|
register.addCommand(AcEdCommandStack.SYSTEMT_COMMAND_GROUP_NAME, 'zoomw', 'zoomw', new AcApZoomToBoxCmd());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApDocManager.js","sourceRoot":"","sources":["../../src/app/AcApDocManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;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D,CAAC;QACH,CAAC;IACH,CAAC;IAED;;;;;;;;;;OAUG;IACK,mCAAU,GAAlB,UAAmB,OAAiC;QAClD,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;YACpB,OAAO,GAAG,EAAE,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE,CAAA;QAC5C,CAAC;aAAM,IAAI,OAAO,CAAC,UAAU,IAAI,IAAI,EAAE,CAAC;YACtC,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAA;QACvC,CAAC;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IACH,qBAAC;AAAD,CAAC,AAzbD,IAybC"}
|
|
@@ -56,7 +56,7 @@ export declare class AcApDocument {
|
|
|
56
56
|
* });
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
|
-
openDocument(fileName: string, content:
|
|
59
|
+
openDocument(fileName: string, content: ArrayBuffer, options: AcDbOpenDatabaseOptions): Promise<boolean>;
|
|
60
60
|
/**
|
|
61
61
|
* Gets the URI of the document if opened from a URI.
|
|
62
62
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApDocument.d.ts","sourceRoot":"","sources":["../../src/app/AcApDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,uBAAuB,EACxB,MAAM,uBAAuB,CAAA;AAI9B;;;;;;;;GAQG;AACH,qBAAa,YAAY;IACvB,2DAA2D;IAC3D,OAAO,CAAC,IAAI,CAAC,CAAQ;IACrB,8DAA8D;IAC9D,OAAO,CAAC,SAAS,CAAc;IAC/B,oCAAoC;IACpC,OAAO,CAAC,SAAS,CAAa;IAC9B,wCAAwC;IACxC,OAAO,CAAC,SAAS,CAAa;IAC9B,uDAAuD;IACvD,OAAO,CAAC,WAAW,CAAgB;IAEnC;;;;OAIG;;IAMH;;;;;;;;;;;;;OAaG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB;IAe3D;;;;;;;;;;;;;;;OAeG;IACG,YAAY,CAChB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"AcApDocument.d.ts","sourceRoot":"","sources":["../../src/app/AcApDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,uBAAuB,EACxB,MAAM,uBAAuB,CAAA;AAI9B;;;;;;;;GAQG;AACH,qBAAa,YAAY;IACvB,2DAA2D;IAC3D,OAAO,CAAC,IAAI,CAAC,CAAQ;IACrB,8DAA8D;IAC9D,OAAO,CAAC,SAAS,CAAc;IAC/B,oCAAoC;IACpC,OAAO,CAAC,SAAS,CAAa;IAC9B,wCAAwC;IACxC,OAAO,CAAC,SAAS,CAAa;IAC9B,uDAAuD;IACvD,OAAO,CAAC,WAAW,CAAgB;IAEnC;;;;OAIG;;IAMH;;;;;;;;;;;;;OAaG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB;IAe3D;;;;;;;;;;;;;;;OAeG;IACG,YAAY,CAChB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,uBAAuB;IAoBlC;;;;OAIG;IACH,IAAI,GAAG,uBAEN;IAED;;;;OAIG;IACH,IAAI,QAAQ,iBAEX;IAED;;;;OAIG;IACH,IAAI,QAAQ,IAWQ,MAAM,CATzB;IAED;;;;;;OAMG;IACH,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAMzB;IAED;;;;OAIG;IACH,IAAI,UAAU,YAEb;IAED;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;CAa3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApDocument.js","sourceRoot":"","sources":["../../src/app/AcApDocument.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,YAAY,EACZ,YAAY,EAEb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,E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,GAAG,CAAC,CAAA;YACxB,gCAAgC;YAChC,IAAM,SAAS,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YACzC,wDAAwD;YACxD,OAAO,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,CAAA;QAC9C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAA;YACpC,OAAO,EAAE,CAAA;QACX,CAAC;IACH,CAAC;IACH,mBAAC;AAAD,CAAC,AAjKD,IAiKC"}
|
|
@@ -27,8 +27,6 @@ import { AcDbFontInfo, AcDbFontLoader } from '@mlightcad/data-model';
|
|
|
27
27
|
export declare class AcApFontLoader implements AcDbFontLoader {
|
|
28
28
|
/** Font loader in mtext-render */
|
|
29
29
|
private _loader;
|
|
30
|
-
/** Cache of available fonts fetched from the CDN */
|
|
31
|
-
private _avaiableFonts;
|
|
32
30
|
/**
|
|
33
31
|
* Creates a new font loader instance.
|
|
34
32
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApFontLoader.d.ts","sourceRoot":"","sources":["../../src/app/AcApFontLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAKpE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,cAAe,YAAW,cAAc;IACnD,kCAAkC;IAClC,OAAO,CAAC,OAAO,CAAgB;
|
|
1
|
+
{"version":3,"file":"AcApFontLoader.d.ts","sourceRoot":"","sources":["../../src/app/AcApFontLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAKpE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,cAAe,YAAW,cAAc;IACnD,kCAAkC;IAClC,OAAO,CAAC,OAAO,CAAgB;IAE/B;;;;OAIG;;IAKH;;OAEG;IACH,IAAI,OAAO,IAGQ,MAAM,CADxB;IACD,IAAI,OAAO,CAAC,KAAK,EAAE,MAAM,EAExB;IAED;;OAEG;IACH,IAAI,aAAa,IAAI,YAAY,EAAE,CAElC;IAED;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAIjD;;OAEG;IACG,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE;CAyB/B"}
|
|
@@ -69,7 +69,6 @@ var AcApFontLoader = /** @class */ (function () {
|
|
|
69
69
|
*/
|
|
70
70
|
function AcApFontLoader() {
|
|
71
71
|
this._loader = new AcTrFontLoader();
|
|
72
|
-
this._avaiableFonts = [];
|
|
73
72
|
}
|
|
74
73
|
Object.defineProperty(AcApFontLoader.prototype, "baseUrl", {
|
|
75
74
|
/**
|
|
@@ -89,7 +88,7 @@ var AcApFontLoader = /** @class */ (function () {
|
|
|
89
88
|
* Avaiable fonts to load.
|
|
90
89
|
*/
|
|
91
90
|
get: function () {
|
|
92
|
-
return this.
|
|
91
|
+
return this._loader.avaiableFonts;
|
|
93
92
|
},
|
|
94
93
|
enumerable: false,
|
|
95
94
|
configurable: true
|
|
@@ -99,17 +98,10 @@ var AcApFontLoader = /** @class */ (function () {
|
|
|
99
98
|
*/
|
|
100
99
|
AcApFontLoader.prototype.getAvaiableFonts = function () {
|
|
101
100
|
return __awaiter(this, void 0, void 0, function () {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
case
|
|
106
|
-
if (!(this._avaiableFonts.length == 0)) return [3 /*break*/, 2];
|
|
107
|
-
_a = this;
|
|
108
|
-
return [4 /*yield*/, this._loader.getAvaiableFonts()];
|
|
109
|
-
case 1:
|
|
110
|
-
_a._avaiableFonts = _b.sent();
|
|
111
|
-
_b.label = 2;
|
|
112
|
-
case 2: return [2 /*return*/, this._avaiableFonts];
|
|
101
|
+
return __generator(this, function (_a) {
|
|
102
|
+
switch (_a.label) {
|
|
103
|
+
case 0: return [4 /*yield*/, this._loader.getAvailableFonts()];
|
|
104
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
113
105
|
}
|
|
114
106
|
});
|
|
115
107
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApFontLoader.js","sourceRoot":"","sources":["../../src/app/AcApFontLoader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE1D,OAAO,EAAyB,QAAQ,EAAE,MAAM,WAAW,CAAA;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;
|
|
1
|
+
{"version":3,"file":"AcApFontLoader.js","sourceRoot":"","sources":["../../src/app/AcApFontLoader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE1D,OAAO,EAAyB,QAAQ,EAAE,MAAM,WAAW,CAAA;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;IAIE;;;;OAIG;IACH;QACE,IAAI,CAAC,OAAO,GAAG,IAAI,cAAc,EAAE,CAAA;IACrC,CAAC;IAKD,sBAAI,mCAAO;QAHX;;WAEG;aACH;YACE,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAA;QAC7B,CAAC;aACD,UAAY,KAAa;YACvB,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,KAAK,CAAA;QAC9B,CAAC;;;OAHA;IAQD,sBAAI,yCAAa;QAHjB;;WAEG;aACH;YACE,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAA;QACnC,CAAC;;;OAAA;IAED;;OAEG;IACG,yCAAgB,GAAtB;;;;4BACS,qBAAM,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAA;4BAA7C,sBAAO,SAAsC,EAAA;;;;KAC9C;IAED;;OAEG;IACG,6BAAI,GAAV,UAAW,SAAmB;;;;;4BACT,qBAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,EAAA;;wBAA/C,UAAU,GAAG,SAAkC;wBAC/C,aAAa,GAAa,EAAE,CAAA;wBAC5B,cAAc,GAA4B,EAAE,CAAA;wBAClD,UAAU,CAAC,OAAO,CAAC,UAAA,IAAI;4BACrB,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;gCAC/B,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;4BACnC,CAAC;iCAAM,IAAI,IAAI,CAAC,MAAM,KAAK,cAAc,EAAE,CAAC;gCAC1C,cAAc,CAAC,IAAI,CAAC;oCAClB,QAAQ,EAAE,IAAI,CAAC,QAAQ;oCACvB,GAAG,EAAE,IAAI,CAAC,GAAG;iCACd,CAAC,CAAA;4BACJ,CAAC;wBACH,CAAC,CAAC,CAAA;wBACF,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;4BAC7B,QAAQ,CAAC,IAAI,CAAC,iBAAiB,EAAE;gCAC/B,KAAK,EAAE,aAAa;6BACrB,CAAC,CAAA;wBACJ,CAAC;wBACD,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;4BAC9B,QAAQ,CAAC,IAAI,CAAC,kBAAkB,EAAE;gCAChC,KAAK,EAAE,cAAc;6BACtB,CAAC,CAAA;wBACJ,CAAC;;;;;KACF;IACH,qBAAC;AAAD,CAAC,AAjED,IAiEC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AcEdCommand } from '.';
|
|
2
|
+
/**
|
|
3
|
+
* Command to redraw the current drawing in the CAD viewer.
|
|
4
|
+
*
|
|
5
|
+
* This command redraws the current drawing. It can be used after users set font
|
|
6
|
+
* mapping for missed fonts so that the current drawing can display texts with
|
|
7
|
+
* correct fonts.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const regenCmd = new AcApRegenCmd();
|
|
12
|
+
* regenCmd.execute(context); // Redraw the current drawing
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare class AcApRegenCmd extends AcEdCommand {
|
|
16
|
+
/**
|
|
17
|
+
* Executes the regen command to redraw the current drawing
|
|
18
|
+
*/
|
|
19
|
+
execute(): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=AcApRegenCmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApRegenCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApRegenCmd.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,CAAA;AAE/B;;;;;;;;;;;;GAYG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,OAAO;CAGR"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import { AcApDocManager } from '../app';
|
|
17
|
+
import { AcEdCommand } from '.';
|
|
18
|
+
/**
|
|
19
|
+
* Command to redraw the current drawing in the CAD viewer.
|
|
20
|
+
*
|
|
21
|
+
* This command redraws the current drawing. It can be used after users set font
|
|
22
|
+
* mapping for missed fonts so that the current drawing can display texts with
|
|
23
|
+
* correct fonts.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const regenCmd = new AcApRegenCmd();
|
|
28
|
+
* regenCmd.execute(context); // Redraw the current drawing
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
var AcApRegenCmd = /** @class */ (function (_super) {
|
|
32
|
+
__extends(AcApRegenCmd, _super);
|
|
33
|
+
function AcApRegenCmd() {
|
|
34
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Executes the regen command to redraw the current drawing
|
|
38
|
+
*/
|
|
39
|
+
AcApRegenCmd.prototype.execute = function () {
|
|
40
|
+
AcApDocManager.instance.regen();
|
|
41
|
+
};
|
|
42
|
+
return AcApRegenCmd;
|
|
43
|
+
}(AcEdCommand));
|
|
44
|
+
export { AcApRegenCmd };
|
|
45
|
+
//# sourceMappingURL=AcApRegenCmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApRegenCmd.js","sourceRoot":"","sources":["../../src/command/AcApRegenCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,CAAA;AAE/B;;;;;;;;;;;;GAYG;AACH;IAAkC,gCAAW;IAA7C;;IAOA,CAAC;IANC;;OAEG;IACH,8BAAO,GAAP;QACE,cAAc,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAA;IACjC,CAAC;IACH,mBAAC;AAAD,CAAC,AAPD,CAAkC,WAAW,GAO5C"}
|
package/lib/command/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from '../editor/command/AcEdCommandStack';
|
|
|
3
3
|
export * from './AcApConvertToSvgCmd';
|
|
4
4
|
export * from './AcApOpenCmd';
|
|
5
5
|
export * from './AcApQNewCmd';
|
|
6
|
+
export * from './AcApRegenCmd';
|
|
6
7
|
export * from './AcApSelectCmd';
|
|
7
8
|
export * from './AcApZoomCmd';
|
|
8
9
|
export * from './AcApZoomToBoxCmd';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oCAAoC,CAAA;AAClD,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oCAAoC,CAAA;AAClD,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA"}
|
package/lib/command/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export * from '../editor/command/AcEdCommandStack';
|
|
|
3
3
|
export * from './AcApConvertToSvgCmd';
|
|
4
4
|
export * from './AcApOpenCmd';
|
|
5
5
|
export * from './AcApQNewCmd';
|
|
6
|
+
export * from './AcApRegenCmd';
|
|
6
7
|
export * from './AcApSelectCmd';
|
|
7
8
|
export * from './AcApZoomCmd';
|
|
8
9
|
export * from './AcApZoomToBoxCmd';
|
package/lib/command/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oCAAoC,CAAA;AAClD,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oCAAoC,CAAA;AAClD,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlightcad/cad-simple-viewer",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "
|
|
8
|
+
"url": "https://gitlab.com/mlightcad/cad-viewer.git"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [
|
|
11
11
|
"autocad",
|
|
@@ -33,21 +33,21 @@
|
|
|
33
33
|
"require": "./dist/index.umd.cjs"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@mlightcad/mtext-renderer": "0.
|
|
36
|
+
"@mlightcad/mtext-renderer": "^0.7.1",
|
|
37
37
|
"@mlightcad/three-viewcube": "0.0.9",
|
|
38
38
|
"@types/lodash-es": "^4.17.12",
|
|
39
39
|
"@types/rbush": "^3.0.4",
|
|
40
40
|
"@types/three": "^0.172.0",
|
|
41
|
-
"@mlightcad/svg-renderer": "
|
|
42
|
-
"@mlightcad/three-renderer": "1.1
|
|
41
|
+
"@mlightcad/svg-renderer": "1.2.1",
|
|
42
|
+
"@mlightcad/three-renderer": "1.2.1"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@mlightcad/libredwg-converter": "3.
|
|
45
|
+
"@mlightcad/libredwg-converter": "3.1.4",
|
|
46
46
|
"mitt": "^3.0.1",
|
|
47
47
|
"rbush": "^4.0.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@mlightcad/data-model": "1.
|
|
50
|
+
"@mlightcad/data-model": "1.3.4",
|
|
51
51
|
"three": "^0.172.0",
|
|
52
52
|
"lodash-es": "4.17.21"
|
|
53
53
|
},
|