@mlightcad/cad-simple-viewer 1.0.0

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.
Files changed (189) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +26 -0
  3. package/dist/index.js +2422 -0
  4. package/dist/index.umd.cjs +9 -0
  5. package/lib/app/AcApContext.d.ts +15 -0
  6. package/lib/app/AcApContext.d.ts.map +1 -0
  7. package/lib/app/AcApContext.js +56 -0
  8. package/lib/app/AcApContext.js.map +1 -0
  9. package/lib/app/AcApDocCreator.d.ts +17 -0
  10. package/lib/app/AcApDocCreator.d.ts.map +1 -0
  11. package/lib/app/AcApDocCreator.js +140 -0
  12. package/lib/app/AcApDocCreator.js.map +1 -0
  13. package/lib/app/AcApDocManager.d.ts +60 -0
  14. package/lib/app/AcApDocManager.d.ts.map +1 -0
  15. package/lib/app/AcApDocManager.js +275 -0
  16. package/lib/app/AcApDocManager.js.map +1 -0
  17. package/lib/app/AcApDocument.d.ts +27 -0
  18. package/lib/app/AcApDocument.d.ts.map +1 -0
  19. package/lib/app/AcApDocument.js +165 -0
  20. package/lib/app/AcApDocument.js.map +1 -0
  21. package/lib/app/AcApFontLoader.d.ts +20 -0
  22. package/lib/app/AcApFontLoader.d.ts.map +1 -0
  23. package/lib/app/AcApFontLoader.js +135 -0
  24. package/lib/app/AcApFontLoader.js.map +1 -0
  25. package/lib/app/AcApSettingManager.d.ts +44 -0
  26. package/lib/app/AcApSettingManager.d.ts.map +1 -0
  27. package/lib/app/AcApSettingManager.js +122 -0
  28. package/lib/app/AcApSettingManager.js.map +1 -0
  29. package/lib/app/index.d.ts +5 -0
  30. package/lib/app/index.d.ts.map +1 -0
  31. package/lib/app/index.js +5 -0
  32. package/lib/app/index.js.map +1 -0
  33. package/lib/command/AcApConvertToSvgCmd.d.ts +6 -0
  34. package/lib/command/AcApConvertToSvgCmd.d.ts.map +1 -0
  35. package/lib/command/AcApConvertToSvgCmd.js +30 -0
  36. package/lib/command/AcApConvertToSvgCmd.js.map +1 -0
  37. package/lib/command/AcApOpenCmd.d.ts +6 -0
  38. package/lib/command/AcApOpenCmd.d.ts.map +1 -0
  39. package/lib/command/AcApOpenCmd.js +29 -0
  40. package/lib/command/AcApOpenCmd.js.map +1 -0
  41. package/lib/command/AcApPanCmd.d.ts +6 -0
  42. package/lib/command/AcApPanCmd.d.ts.map +1 -0
  43. package/lib/command/AcApPanCmd.js +30 -0
  44. package/lib/command/AcApPanCmd.js.map +1 -0
  45. package/lib/command/AcApQNewCmd.d.ts +6 -0
  46. package/lib/command/AcApQNewCmd.d.ts.map +1 -0
  47. package/lib/command/AcApQNewCmd.js +30 -0
  48. package/lib/command/AcApQNewCmd.js.map +1 -0
  49. package/lib/command/AcApSelectCmd.d.ts +6 -0
  50. package/lib/command/AcApSelectCmd.d.ts.map +1 -0
  51. package/lib/command/AcApSelectCmd.js +30 -0
  52. package/lib/command/AcApSelectCmd.js.map +1 -0
  53. package/lib/command/AcApSvgConvertor.d.ts +5 -0
  54. package/lib/command/AcApSvgConvertor.d.ts.map +1 -0
  55. package/lib/command/AcApSvgConvertor.js +55 -0
  56. package/lib/command/AcApSvgConvertor.js.map +1 -0
  57. package/lib/command/AcApZoomCmd.d.ts +6 -0
  58. package/lib/command/AcApZoomCmd.d.ts.map +1 -0
  59. package/lib/command/AcApZoomCmd.js +28 -0
  60. package/lib/command/AcApZoomCmd.js.map +1 -0
  61. package/lib/command/AcApZoomToBoxCmd.d.ts +11 -0
  62. package/lib/command/AcApZoomToBoxCmd.d.ts.map +1 -0
  63. package/lib/command/AcApZoomToBoxCmd.js +101 -0
  64. package/lib/command/AcApZoomToBoxCmd.js.map +1 -0
  65. package/lib/command/index.d.ts +10 -0
  66. package/lib/command/index.d.ts.map +1 -0
  67. package/lib/command/index.js +10 -0
  68. package/lib/command/index.js.map +1 -0
  69. package/lib/editor/command/AcEdCommand.d.ts +42 -0
  70. package/lib/editor/command/AcEdCommand.d.ts.map +1 -0
  71. package/lib/editor/command/AcEdCommand.js +60 -0
  72. package/lib/editor/command/AcEdCommand.js.map +1 -0
  73. package/lib/editor/command/AcEdCommandIterator.d.ts +36 -0
  74. package/lib/editor/command/AcEdCommandIterator.d.ts.map +1 -0
  75. package/lib/editor/command/AcEdCommandIterator.js +65 -0
  76. package/lib/editor/command/AcEdCommandIterator.js.map +1 -0
  77. package/lib/editor/command/AcEdCommandStack.d.ts +66 -0
  78. package/lib/editor/command/AcEdCommandStack.d.ts.map +1 -0
  79. package/lib/editor/command/AcEdCommandStack.js +192 -0
  80. package/lib/editor/command/AcEdCommandStack.js.map +1 -0
  81. package/lib/editor/command/index.d.ts +3 -0
  82. package/lib/editor/command/index.d.ts.map +1 -0
  83. package/lib/editor/command/index.js +3 -0
  84. package/lib/editor/command/index.js.map +1 -0
  85. package/lib/editor/global/AcEdGlobalFunc.d.ts +8 -0
  86. package/lib/editor/global/AcEdGlobalFunc.d.ts.map +1 -0
  87. package/lib/editor/global/AcEdGlobalFunc.js +14 -0
  88. package/lib/editor/global/AcEdGlobalFunc.js.map +1 -0
  89. package/lib/editor/global/AcEdMessage.d.ts +5 -0
  90. package/lib/editor/global/AcEdMessage.d.ts.map +1 -0
  91. package/lib/editor/global/AcEdMessage.js +6 -0
  92. package/lib/editor/global/AcEdMessage.js.map +1 -0
  93. package/lib/editor/global/eventBus.d.ts +34 -0
  94. package/lib/editor/global/eventBus.d.ts.map +1 -0
  95. package/lib/editor/global/eventBus.js +3 -0
  96. package/lib/editor/global/eventBus.js.map +1 -0
  97. package/lib/editor/global/index.d.ts +3 -0
  98. package/lib/editor/global/index.d.ts.map +1 -0
  99. package/lib/editor/global/index.js +3 -0
  100. package/lib/editor/global/index.js.map +1 -0
  101. package/lib/editor/index.d.ts +5 -0
  102. package/lib/editor/index.d.ts.map +1 -0
  103. package/lib/editor/index.js +5 -0
  104. package/lib/editor/index.js.map +1 -0
  105. package/lib/editor/input/AcEdBaseInput.d.ts +25 -0
  106. package/lib/editor/input/AcEdBaseInput.d.ts.map +1 -0
  107. package/lib/editor/input/AcEdBaseInput.js +105 -0
  108. package/lib/editor/input/AcEdBaseInput.js.map +1 -0
  109. package/lib/editor/input/AcEdBoxSelector.d.ts +27 -0
  110. package/lib/editor/input/AcEdBoxSelector.d.ts.map +1 -0
  111. package/lib/editor/input/AcEdBoxSelector.js +140 -0
  112. package/lib/editor/input/AcEdBoxSelector.js.map +1 -0
  113. package/lib/editor/input/AcEdCursorManager.d.ts +43 -0
  114. package/lib/editor/input/AcEdCursorManager.d.ts.map +1 -0
  115. package/lib/editor/input/AcEdCursorManager.js +71 -0
  116. package/lib/editor/input/AcEdCursorManager.js.map +1 -0
  117. package/lib/editor/input/AcEdInputPoint.d.ts +14 -0
  118. package/lib/editor/input/AcEdInputPoint.d.ts.map +1 -0
  119. package/lib/editor/input/AcEdInputPoint.js +41 -0
  120. package/lib/editor/input/AcEdInputPoint.js.map +1 -0
  121. package/lib/editor/input/AcEdJig.d.ts +14 -0
  122. package/lib/editor/input/AcEdJig.d.ts.map +1 -0
  123. package/lib/editor/input/AcEdJig.js +92 -0
  124. package/lib/editor/input/AcEdJig.js.map +1 -0
  125. package/lib/editor/input/AcEdJigLoop.d.ts +14 -0
  126. package/lib/editor/input/AcEdJigLoop.d.ts.map +1 -0
  127. package/lib/editor/input/AcEdJigLoop.js +43 -0
  128. package/lib/editor/input/AcEdJigLoop.js.map +1 -0
  129. package/lib/editor/input/AcEdSelectionSet.d.ts +26 -0
  130. package/lib/editor/input/AcEdSelectionSet.d.ts.map +1 -0
  131. package/lib/editor/input/AcEdSelectionSet.js +63 -0
  132. package/lib/editor/input/AcEdSelectionSet.js.map +1 -0
  133. package/lib/editor/input/AcEditor.d.ts +27 -0
  134. package/lib/editor/input/AcEditor.d.ts.map +1 -0
  135. package/lib/editor/input/AcEditor.js +103 -0
  136. package/lib/editor/input/AcEditor.js.map +1 -0
  137. package/lib/editor/input/index.d.ts +5 -0
  138. package/lib/editor/input/index.d.ts.map +1 -0
  139. package/lib/editor/input/index.js +5 -0
  140. package/lib/editor/input/index.js.map +1 -0
  141. package/lib/editor/view/AcEdBaseView.d.ts +261 -0
  142. package/lib/editor/view/AcEdBaseView.d.ts.map +1 -0
  143. package/lib/editor/view/AcEdBaseView.js +260 -0
  144. package/lib/editor/view/AcEdBaseView.js.map +1 -0
  145. package/lib/editor/view/index.d.ts +2 -0
  146. package/lib/editor/view/index.d.ts.map +1 -0
  147. package/lib/editor/view/index.js +2 -0
  148. package/lib/editor/view/index.js.map +1 -0
  149. package/lib/index.d.ts +5 -0
  150. package/lib/index.d.ts.map +1 -0
  151. package/lib/index.js +5 -0
  152. package/lib/index.js.map +1 -0
  153. package/lib/util/AcTrGeometryUtil.d.ts +18 -0
  154. package/lib/util/AcTrGeometryUtil.d.ts.map +1 -0
  155. package/lib/util/AcTrGeometryUtil.js +33 -0
  156. package/lib/util/AcTrGeometryUtil.js.map +1 -0
  157. package/lib/util/index.d.ts +2 -0
  158. package/lib/util/index.d.ts.map +1 -0
  159. package/lib/util/index.js +2 -0
  160. package/lib/util/index.js.map +1 -0
  161. package/lib/view/AcTrLayer.d.ts +97 -0
  162. package/lib/view/AcTrLayer.d.ts.map +1 -0
  163. package/lib/view/AcTrLayer.js +170 -0
  164. package/lib/view/AcTrLayer.js.map +1 -0
  165. package/lib/view/AcTrLayout.d.ts +114 -0
  166. package/lib/view/AcTrLayout.d.ts.map +1 -0
  167. package/lib/view/AcTrLayout.js +344 -0
  168. package/lib/view/AcTrLayout.js.map +1 -0
  169. package/lib/view/AcTrLayoutView.d.ts +57 -0
  170. package/lib/view/AcTrLayoutView.d.ts.map +1 -0
  171. package/lib/view/AcTrLayoutView.js +151 -0
  172. package/lib/view/AcTrLayoutView.js.map +1 -0
  173. package/lib/view/AcTrLayoutViewManager.d.ts +43 -0
  174. package/lib/view/AcTrLayoutViewManager.d.ts.map +1 -0
  175. package/lib/view/AcTrLayoutViewManager.js +74 -0
  176. package/lib/view/AcTrLayoutViewManager.js.map +1 -0
  177. package/lib/view/AcTrScene.d.ts +115 -0
  178. package/lib/view/AcTrScene.d.ts.map +1 -0
  179. package/lib/view/AcTrScene.js +319 -0
  180. package/lib/view/AcTrScene.js.map +1 -0
  181. package/lib/view/AcTrView2d.d.ts +160 -0
  182. package/lib/view/AcTrView2d.d.ts.map +1 -0
  183. package/lib/view/AcTrView2d.js +473 -0
  184. package/lib/view/AcTrView2d.js.map +1 -0
  185. package/lib/view/index.d.ts +2 -0
  186. package/lib/view/index.d.ts.map +1 -0
  187. package/lib/view/index.js +2 -0
  188. package/lib/view/index.js.map +1 -0
  189. package/package.json +55 -0
@@ -0,0 +1,44 @@
1
+ import { AcCmEventManager } from '@mlightcad/data-model';
2
+ /**
3
+ * Font mappings.
4
+ * - The key is the original font name
5
+ * - The value is the mapped font name
6
+ */
7
+ export type AcApFontMapping = Record<string, string>;
8
+ export interface AcApSettings {
9
+ isDebug: boolean;
10
+ isShowCommandLine: boolean;
11
+ isShowCoordinate: boolean;
12
+ isShowToolbar: boolean;
13
+ isShowStats: boolean;
14
+ fontMapping: AcApFontMapping;
15
+ }
16
+ export interface AcApSettingManagerEventArgs<T extends AcApSettings = AcApSettings> {
17
+ key: keyof T;
18
+ value: unknown;
19
+ }
20
+ export declare class AcApSettingManager<T extends AcApSettings = AcApSettings> {
21
+ private static _instance?;
22
+ readonly events: {
23
+ modified: AcCmEventManager<AcApSettingManagerEventArgs<T>>;
24
+ };
25
+ static get instance(): AcApSettingManager<AcApSettings>;
26
+ set<K extends keyof T>(key: K, value: T[K]): void;
27
+ get<K extends keyof T>(key: K): NonNullable<AcApSettings & T>[K];
28
+ toggle<K extends keyof T>(key: K): void;
29
+ get isDebug(): boolean;
30
+ set isDebug(value: boolean);
31
+ get isShowCommandLine(): boolean;
32
+ set isShowCommandLine(value: boolean);
33
+ get isShowCoordinate(): boolean;
34
+ set isShowCoordinate(value: boolean);
35
+ get isShowToolbar(): boolean;
36
+ set isShowToolbar(value: boolean);
37
+ get isShowStats(): boolean;
38
+ set isShowStats(value: boolean);
39
+ get fontMapping(): AcApFontMapping;
40
+ set fontMapping(value: AcApFontMapping);
41
+ setFontMapping(originalFont: string, mappedFont: string): void;
42
+ get settings(): NonNullable<AcApSettings & T>;
43
+ }
44
+ //# sourceMappingURL=AcApSettingManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApSettingManager.d.ts","sourceRoot":"","sources":["../../src/app/AcApSettingManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAGxD;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAEpD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,gBAAgB,EAAE,OAAO,CAAA;IACzB,aAAa,EAAE,OAAO,CAAA;IACtB,WAAW,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,eAAe,CAAA;CAC7B;AAaD,MAAM,WAAW,2BAA2B,CAC1C,CAAC,SAAS,YAAY,GAAG,YAAY;IAErC,GAAG,EAAE,MAAM,CAAC,CAAA;IACZ,KAAK,EAAE,OAAO,CAAA;CACf;AAED,qBAAa,kBAAkB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY;IACnE,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAoB;IAE7C,SAAgB,MAAM;;MAErB;IAED,MAAM,KAAK,QAAQ,qCAKlB;IAED,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IAU1C,GAAG,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IAI7B,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IAMhC,IAAI,OAAO,IAIQ,OAAO,CAFzB;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,EAEzB;IAED,IAAI,iBAAiB,IAIQ,OAAO,CAFnC;IAED,IAAI,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAEnC;IAED,IAAI,gBAAgB,IAIQ,OAAO,CAFlC;IAED,IAAI,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAElC;IAED,IAAI,aAAa,IAIQ,OAAO,CAF/B;IAED,IAAI,aAAa,CAAC,KAAK,EAAE,OAAO,EAE/B;IAED,IAAI,WAAW,IAIQ,OAAO,CAF7B;IAED,IAAI,WAAW,CAAC,KAAK,EAAE,OAAO,EAE7B;IAED,IAAI,WAAW,IAIQ,eAAe,CAFrC;IAED,IAAI,WAAW,CAAC,KAAK,EAAE,eAAe,EAErC;IAED,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAMvD,IAAI,QAAQ,kCAIX;CACF"}
@@ -0,0 +1,122 @@
1
+ import { AcCmEventManager } from '@mlightcad/data-model';
2
+ import { defaults } from 'lodash-es';
3
+ var DEFAULT_VALUES = {
4
+ isDebug: false,
5
+ isShowCommandLine: true,
6
+ isShowCoordinate: true,
7
+ isShowToolbar: true,
8
+ isShowStats: false,
9
+ fontMapping: {}
10
+ };
11
+ var SETTINGS_LS_KEY = 'settings';
12
+ var AcApSettingManager = /** @class */ (function () {
13
+ function AcApSettingManager() {
14
+ this.events = {
15
+ modified: new AcCmEventManager()
16
+ };
17
+ }
18
+ Object.defineProperty(AcApSettingManager, "instance", {
19
+ get: function () {
20
+ if (!this._instance) {
21
+ this._instance = new AcApSettingManager();
22
+ }
23
+ return this._instance;
24
+ },
25
+ enumerable: false,
26
+ configurable: true
27
+ });
28
+ AcApSettingManager.prototype.set = function (key, value) {
29
+ var toggles = this.settings;
30
+ toggles[key] = value;
31
+ localStorage.setItem(SETTINGS_LS_KEY, JSON.stringify(toggles));
32
+ this.events.modified.dispatch({
33
+ key: key,
34
+ value: value
35
+ });
36
+ };
37
+ AcApSettingManager.prototype.get = function (key) {
38
+ return this.settings[key];
39
+ };
40
+ AcApSettingManager.prototype.toggle = function (key) {
41
+ var value = this.get(key);
42
+ // @ts-expect-error The caller should guarantee the correct feature name passed to this function
43
+ this.set(key, !value);
44
+ };
45
+ Object.defineProperty(AcApSettingManager.prototype, "isDebug", {
46
+ get: function () {
47
+ return this.get('isDebug');
48
+ },
49
+ set: function (value) {
50
+ this.set('isDebug', value);
51
+ },
52
+ enumerable: false,
53
+ configurable: true
54
+ });
55
+ Object.defineProperty(AcApSettingManager.prototype, "isShowCommandLine", {
56
+ get: function () {
57
+ return this.get('isShowCommandLine');
58
+ },
59
+ set: function (value) {
60
+ this.set('isShowCommandLine', value);
61
+ },
62
+ enumerable: false,
63
+ configurable: true
64
+ });
65
+ Object.defineProperty(AcApSettingManager.prototype, "isShowCoordinate", {
66
+ get: function () {
67
+ return this.get('isShowCoordinate');
68
+ },
69
+ set: function (value) {
70
+ this.set('isShowCoordinate', value);
71
+ },
72
+ enumerable: false,
73
+ configurable: true
74
+ });
75
+ Object.defineProperty(AcApSettingManager.prototype, "isShowToolbar", {
76
+ get: function () {
77
+ return this.get('isShowToolbar');
78
+ },
79
+ set: function (value) {
80
+ this.set('isShowToolbar', value);
81
+ },
82
+ enumerable: false,
83
+ configurable: true
84
+ });
85
+ Object.defineProperty(AcApSettingManager.prototype, "isShowStats", {
86
+ get: function () {
87
+ return this.get('isShowStats');
88
+ },
89
+ set: function (value) {
90
+ this.set('isShowStats', value);
91
+ },
92
+ enumerable: false,
93
+ configurable: true
94
+ });
95
+ Object.defineProperty(AcApSettingManager.prototype, "fontMapping", {
96
+ get: function () {
97
+ return this.get('fontMapping');
98
+ },
99
+ set: function (value) {
100
+ this.set('fontMapping', value);
101
+ },
102
+ enumerable: false,
103
+ configurable: true
104
+ });
105
+ AcApSettingManager.prototype.setFontMapping = function (originalFont, mappedFont) {
106
+ var mapping = this.get('fontMapping');
107
+ mapping[originalFont] = mappedFont;
108
+ this.set('fontMapping', mapping);
109
+ };
110
+ Object.defineProperty(AcApSettingManager.prototype, "settings", {
111
+ get: function () {
112
+ var values = localStorage.getItem(SETTINGS_LS_KEY);
113
+ var results = (values == null ? {} : JSON.parse(values));
114
+ return defaults(results, DEFAULT_VALUES);
115
+ },
116
+ enumerable: false,
117
+ configurable: true
118
+ });
119
+ return AcApSettingManager;
120
+ }());
121
+ export { AcApSettingManager };
122
+ //# sourceMappingURL=AcApSettingManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApSettingManager.js","sourceRoot":"","sources":["../../src/app/AcApSettingManager.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,5 @@
1
+ export * from './AcApContext';
2
+ export * from './AcApDocument';
3
+ export * from './AcApDocManager';
4
+ export * from './AcApSettingManager';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA"}
@@ -0,0 +1,5 @@
1
+ export * from './AcApContext';
2
+ export * from './AcApDocument';
3
+ export * from './AcApDocManager';
4
+ export * from './AcApSettingManager';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { AcApContext } from '../app';
2
+ import { AcEdCommand } from '../command';
3
+ export declare class AcApConvertToSvgCmd extends AcEdCommand {
4
+ execute(_context: AcApContext): void;
5
+ }
6
+ //# sourceMappingURL=AcApConvertToSvgCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApConvertToSvgCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApConvertToSvgCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,OAAO,CAAC,QAAQ,EAAE,WAAW;CAI9B"}
@@ -0,0 +1,30 @@
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 { AcEdCommand } from '../command';
17
+ import { AcApSvgConvertor } from './AcApSvgConvertor';
18
+ var AcApConvertToSvgCmd = /** @class */ (function (_super) {
19
+ __extends(AcApConvertToSvgCmd, _super);
20
+ function AcApConvertToSvgCmd() {
21
+ return _super !== null && _super.apply(this, arguments) || this;
22
+ }
23
+ AcApConvertToSvgCmd.prototype.execute = function (_context) {
24
+ var converter = new AcApSvgConvertor();
25
+ converter.convert();
26
+ };
27
+ return AcApConvertToSvgCmd;
28
+ }(AcEdCommand));
29
+ export { AcApConvertToSvgCmd };
30
+ //# sourceMappingURL=AcApConvertToSvgCmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApConvertToSvgCmd.js","sourceRoot":"","sources":["../../src/command/AcApConvertToSvgCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD;IAAyC,uCAAW;IAApD;;IAKA,CAAC;IAJC,qCAAO,GAAP,UAAQ,QAAqB;QAC3B,IAAM,SAAS,GAAG,IAAI,gBAAgB,EAAE,CAAA;QACxC,SAAS,CAAC,OAAO,EAAE,CAAA;IACrB,CAAC;IACH,0BAAC;AAAD,CAAC,AALD,CAAyC,WAAW,GAKnD"}
@@ -0,0 +1,6 @@
1
+ import { AcApContext } from '../app';
2
+ import { AcEdCommand } from '../command';
3
+ export declare class AcApOpenCmd extends AcEdCommand {
4
+ execute(_context: AcApContext): void;
5
+ }
6
+ //# sourceMappingURL=AcApOpenCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApOpenCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApOpenCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC,qBAAa,WAAY,SAAQ,WAAW;IAC1C,OAAO,CAAC,QAAQ,EAAE,WAAW;CAG9B"}
@@ -0,0 +1,29 @@
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 { AcEdCommand } from '../command';
17
+ import { eventBus } from '../editor';
18
+ var AcApOpenCmd = /** @class */ (function (_super) {
19
+ __extends(AcApOpenCmd, _super);
20
+ function AcApOpenCmd() {
21
+ return _super !== null && _super.apply(this, arguments) || this;
22
+ }
23
+ AcApOpenCmd.prototype.execute = function (_context) {
24
+ eventBus.emit('open-file', {});
25
+ };
26
+ return AcApOpenCmd;
27
+ }(AcEdCommand));
28
+ export { AcApOpenCmd };
29
+ //# sourceMappingURL=AcApOpenCmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApOpenCmd.js","sourceRoot":"","sources":["../../src/command/AcApOpenCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC;IAAiC,+BAAW;IAA5C;;IAIA,CAAC;IAHC,6BAAO,GAAP,UAAQ,QAAqB;QAC3B,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;IAChC,CAAC;IACH,kBAAC;AAAD,CAAC,AAJD,CAAiC,WAAW,GAI3C"}
@@ -0,0 +1,6 @@
1
+ import { AcApContext } from '../app';
2
+ import { AcEdCommand } from '../command';
3
+ export declare class AcApPanCmd extends AcEdCommand {
4
+ execute(context: AcApContext): void;
5
+ }
6
+ //# sourceMappingURL=AcApPanCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApPanCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApPanCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC,qBAAa,UAAW,SAAQ,WAAW;IACzC,OAAO,CAAC,OAAO,EAAE,WAAW;CAI7B"}
@@ -0,0 +1,30 @@
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 { AcEdCommand } from '../command';
17
+ import { AcEdCorsorType, AcEdViewMode } from '../editor';
18
+ var AcApPanCmd = /** @class */ (function (_super) {
19
+ __extends(AcApPanCmd, _super);
20
+ function AcApPanCmd() {
21
+ return _super !== null && _super.apply(this, arguments) || this;
22
+ }
23
+ AcApPanCmd.prototype.execute = function (context) {
24
+ context.view.mode = AcEdViewMode.PAN;
25
+ context.view.setCursor(AcEdCorsorType.Grab);
26
+ };
27
+ return AcApPanCmd;
28
+ }(AcEdCommand));
29
+ export { AcApPanCmd };
30
+ //# sourceMappingURL=AcApPanCmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApPanCmd.js","sourceRoot":"","sources":["../../src/command/AcApPanCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExD;IAAgC,8BAAW;IAA3C;;IAKA,CAAC;IAJC,4BAAO,GAAP,UAAQ,OAAoB;QAC1B,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,GAAG,CAAA;QACpC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;IAC7C,CAAC;IACH,iBAAC;AAAD,CAAC,AALD,CAAgC,WAAW,GAK1C"}
@@ -0,0 +1,6 @@
1
+ import { AcApContext } from '../app';
2
+ import { AcEdCommand } from '../command';
3
+ export declare class AcApQNewCmd extends AcEdCommand {
4
+ execute(_context: AcApContext): void;
5
+ }
6
+ //# sourceMappingURL=AcApQNewCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApQNewCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApQNewCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAExC,qBAAa,WAAY,SAAQ,WAAW;IAC1C,OAAO,CAAC,QAAQ,EAAE,WAAW;CAI9B"}
@@ -0,0 +1,30 @@
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 '../command';
18
+ var AcApQNewCmd = /** @class */ (function (_super) {
19
+ __extends(AcApQNewCmd, _super);
20
+ function AcApQNewCmd() {
21
+ return _super !== null && _super.apply(this, arguments) || this;
22
+ }
23
+ AcApQNewCmd.prototype.execute = function (_context) {
24
+ var baseUrl = 'https://cdn.jsdelivr.net/gh/mlight-lee/cad-data/templates/';
25
+ AcApDocManager.instance.openUrl(baseUrl + 'acadiso.dxf');
26
+ };
27
+ return AcApQNewCmd;
28
+ }(AcEdCommand));
29
+ export { AcApQNewCmd };
30
+ //# sourceMappingURL=AcApQNewCmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApQNewCmd.js","sourceRoot":"","sources":["../../src/command/AcApQNewCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAExC;IAAiC,+BAAW;IAA5C;;IAKA,CAAC;IAJC,6BAAO,GAAP,UAAQ,QAAqB;QAC3B,IAAM,OAAO,GAAG,4DAA4D,CAAA;QAC5E,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,GAAG,aAAa,CAAC,CAAA;IAC1D,CAAC;IACH,kBAAC;AAAD,CAAC,AALD,CAAiC,WAAW,GAK3C"}
@@ -0,0 +1,6 @@
1
+ import { AcApContext } from '../app';
2
+ import { AcEdCommand } from '../command';
3
+ export declare class AcApSelectCmd extends AcEdCommand {
4
+ execute(context: AcApContext): void;
5
+ }
6
+ //# sourceMappingURL=AcApSelectCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApSelectCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApSelectCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC,qBAAa,aAAc,SAAQ,WAAW;IAC5C,OAAO,CAAC,OAAO,EAAE,WAAW;CAI7B"}
@@ -0,0 +1,30 @@
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 { AcEdCommand } from '../command';
17
+ import { AcEdCorsorType, AcEdViewMode } from '../editor';
18
+ var AcApSelectCmd = /** @class */ (function (_super) {
19
+ __extends(AcApSelectCmd, _super);
20
+ function AcApSelectCmd() {
21
+ return _super !== null && _super.apply(this, arguments) || this;
22
+ }
23
+ AcApSelectCmd.prototype.execute = function (context) {
24
+ context.view.mode = AcEdViewMode.SELECTION;
25
+ context.view.setCursor(AcEdCorsorType.Crosshair);
26
+ };
27
+ return AcApSelectCmd;
28
+ }(AcEdCommand));
29
+ export { AcApSelectCmd };
30
+ //# sourceMappingURL=AcApSelectCmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApSelectCmd.js","sourceRoot":"","sources":["../../src/command/AcApSelectCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExD;IAAmC,iCAAW;IAA9C;;IAKA,CAAC;IAJC,+BAAO,GAAP,UAAQ,OAAoB;QAC1B,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,SAAS,CAAA;QAC1C,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,CAAA;IAClD,CAAC;IACH,oBAAC;AAAD,CAAC,AALD,CAAmC,WAAW,GAK7C"}
@@ -0,0 +1,5 @@
1
+ export declare class AcApSvgConvertor {
2
+ convert(): void;
3
+ private createFileAndDownloadIt;
4
+ }
5
+ //# sourceMappingURL=AcApSvgConvertor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApSvgConvertor.d.ts","sourceRoot":"","sources":["../../src/command/AcApSvgConvertor.ts"],"names":[],"mappings":"AAIA,qBAAa,gBAAgB;IAC3B,OAAO;IAUP,OAAO,CAAC,uBAAuB;CAoBhC"}
@@ -0,0 +1,55 @@
1
+ var __values = (this && this.__values) || function(o) {
2
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
3
+ if (m) return m.call(o);
4
+ if (o && typeof o.length === "number") return {
5
+ next: function () {
6
+ if (o && i >= o.length) o = void 0;
7
+ return { value: o && o[i++], done: !o };
8
+ }
9
+ };
10
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
11
+ };
12
+ import { AcSvgRenderer } from '@mlightcad/svg-renderer';
13
+ import { AcApDocManager } from '../app';
14
+ var AcApSvgConvertor = /** @class */ (function () {
15
+ function AcApSvgConvertor() {
16
+ }
17
+ AcApSvgConvertor.prototype.convert = function () {
18
+ var e_1, _a;
19
+ var entities = AcApDocManager.instance.curDocument.database.tables.blockTable.modelSpace.newIterator();
20
+ var renderer = new AcSvgRenderer();
21
+ try {
22
+ for (var entities_1 = __values(entities), entities_1_1 = entities_1.next(); !entities_1_1.done; entities_1_1 = entities_1.next()) {
23
+ var entity = entities_1_1.value;
24
+ entity.draw(renderer);
25
+ }
26
+ }
27
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
28
+ finally {
29
+ try {
30
+ if (entities_1_1 && !entities_1_1.done && (_a = entities_1.return)) _a.call(entities_1);
31
+ }
32
+ finally { if (e_1) throw e_1.error; }
33
+ }
34
+ this.createFileAndDownloadIt(renderer.export());
35
+ };
36
+ AcApSvgConvertor.prototype.createFileAndDownloadIt = function (svgContent) {
37
+ // Convert the SVG content into a Blob
38
+ var svgBlob = new Blob([svgContent], {
39
+ type: 'image/svg+xml;charset=utf-8'
40
+ });
41
+ // Create a URL for the Blob
42
+ var url = URL.createObjectURL(svgBlob);
43
+ // Create a download link and trigger the download
44
+ var downloadLink = document.createElement('a');
45
+ downloadLink.href = url;
46
+ downloadLink.download = 'example.svg';
47
+ // Append the link to the body (it needs to be in the DOM to work in some browsers)
48
+ document.body.appendChild(downloadLink);
49
+ // Trigger the download
50
+ downloadLink.click();
51
+ };
52
+ return AcApSvgConvertor;
53
+ }());
54
+ export { AcApSvgConvertor };
55
+ //# sourceMappingURL=AcApSvgConvertor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApSvgConvertor.js","sourceRoot":"","sources":["../../src/command/AcApSvgConvertor.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAEvC;IAAA;IA+BA,CAAC;IA9BC,kCAAO,GAAP;;QACE,IAAM,QAAQ,GACZ,cAAc,CAAC,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,EAAE,CAAA;QACzF,IAAM,QAAQ,GAAG,IAAI,aAAa,EAAE,CAAA;;YACpC,KAAqB,IAAA,aAAA,SAAA,QAAQ,CAAA,kCAAA,wDAAE,CAAC;gBAA3B,IAAM,MAAM,qBAAA;gBACf,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;YACvB,CAAC;;;;;;;;;QACD,IAAI,CAAC,uBAAuB,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;IACjD,CAAC;IAEO,kDAAuB,GAA/B,UAAgC,UAAkB;QAChD,sCAAsC;QACtC,IAAM,OAAO,GAAG,IAAI,IAAI,CAAC,CAAC,UAAU,CAAC,EAAE;YACrC,IAAI,EAAE,6BAA6B;SACpC,CAAC,CAAA;QAEF,4BAA4B;QAC5B,IAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;QAExC,kDAAkD;QAClD,IAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;QAChD,YAAY,CAAC,IAAI,GAAG,GAAG,CAAA;QACvB,YAAY,CAAC,QAAQ,GAAG,aAAa,CAAA;QAErC,mFAAmF;QACnF,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAA;QAEvC,uBAAuB;QACvB,YAAY,CAAC,KAAK,EAAE,CAAA;IACtB,CAAC;IACH,uBAAC;AAAD,CAAC,AA/BD,IA+BC"}
@@ -0,0 +1,6 @@
1
+ import { AcApContext } from '../app';
2
+ import { AcEdCommand } from '../command';
3
+ export declare class AcApZoomCmd extends AcEdCommand {
4
+ execute(context: AcApContext): void;
5
+ }
6
+ //# sourceMappingURL=AcApZoomCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApZoomCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApZoomCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAExC,qBAAa,WAAY,SAAQ,WAAW;IAC1C,OAAO,CAAC,OAAO,EAAE,WAAW;CAG7B"}
@@ -0,0 +1,28 @@
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 { AcEdCommand } from '../command';
17
+ var AcApZoomCmd = /** @class */ (function (_super) {
18
+ __extends(AcApZoomCmd, _super);
19
+ function AcApZoomCmd() {
20
+ return _super !== null && _super.apply(this, arguments) || this;
21
+ }
22
+ AcApZoomCmd.prototype.execute = function (context) {
23
+ context.view.zoomToFit();
24
+ };
25
+ return AcApZoomCmd;
26
+ }(AcEdCommand));
27
+ export { AcApZoomCmd };
28
+ //# sourceMappingURL=AcApZoomCmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApZoomCmd.js","sourceRoot":"","sources":["../../src/command/AcApZoomCmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAExC;IAAiC,+BAAW;IAA5C;;IAIA,CAAC;IAHC,6BAAO,GAAP,UAAQ,OAAoB;QAC1B,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,CAAA;IAC1B,CAAC;IACH,kBAAC;AAAD,CAAC,AAJD,CAAiC,WAAW,GAI3C"}
@@ -0,0 +1,11 @@
1
+ import { AcApContext } from '../app';
2
+ import { AcEdCommand } from '../command';
3
+ import { AcEdBaseView, AcEdJig } from '../editor';
4
+ export declare class AcApZoomToBoxJig extends AcEdJig<boolean> {
5
+ constructor(view: AcEdBaseView);
6
+ sampler(): Promise<void>;
7
+ }
8
+ export declare class AcApZoomToBoxCmd extends AcEdCommand {
9
+ execute(context: AcApContext): Promise<void>;
10
+ }
11
+ //# sourceMappingURL=AcApZoomToBoxCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApZoomToBoxCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApZoomToBoxCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEjD,qBAAa,gBAAiB,SAAQ,OAAO,CAAC,OAAO,CAAC;gBACxC,IAAI,EAAE,YAAY;IAIxB,OAAO;CAKd;AAED,qBAAa,gBAAiB,SAAQ,WAAW;IACzC,OAAO,CAAC,OAAO,EAAE,WAAW;CAInC"}