@mlightcad/libredwg-web 0.6.0 → 0.6.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/dist/libredwg-web.js +21 -9
- package/dist/libredwg-web.umd.cjs +21 -9
- package/lib/converter/converter.js +3 -3
- package/lib/converter/entityConverter.js +8 -4
- package/lib/database/entities/image.d.ts +2 -2
- package/lib/database/entities/table.d.ts +1 -1
- package/lib/database/objects/common.d.ts +2 -2
- package/lib/database/tables/blockRecord.d.ts +1 -1
- package/package.json +1 -1
package/dist/libredwg-web.js
CHANGED
|
@@ -5834,12 +5834,12 @@ class LibreEntityConverter {
|
|
|
5834
5834
|
countBoundaryPoints
|
|
5835
5835
|
);
|
|
5836
5836
|
const imagedef_ref = libredwg.dwg_dynapi_entity_value(entity, "imagedef").data;
|
|
5837
|
-
const imageDefHandle = libredwg.dwg_ref_get_absref(imagedef_ref);
|
|
5837
|
+
const imageDefHandle = idToString(libredwg.dwg_ref_get_absref(imagedef_ref));
|
|
5838
5838
|
const imagedefreactor_ref = libredwg.dwg_dynapi_entity_value(
|
|
5839
5839
|
entity,
|
|
5840
5840
|
"imagedefreactor"
|
|
5841
5841
|
).data;
|
|
5842
|
-
const imageDefReactorHandle = libredwg.dwg_ref_get_absref(imagedefreactor_ref);
|
|
5842
|
+
const imageDefReactorHandle = idToString(libredwg.dwg_ref_get_absref(imagedefreactor_ref));
|
|
5843
5843
|
return {
|
|
5844
5844
|
type: "IMAGE",
|
|
5845
5845
|
...commonAttrs,
|
|
@@ -6530,6 +6530,20 @@ class LibreEntityConverter {
|
|
|
6530
6530
|
col_widths_ptr,
|
|
6531
6531
|
columnCount
|
|
6532
6532
|
);
|
|
6533
|
+
const table_style_ref = libredwg.dwg_dynapi_entity_value(
|
|
6534
|
+
entity,
|
|
6535
|
+
"tablestyle"
|
|
6536
|
+
).data;
|
|
6537
|
+
const tableStyleId = idToString(
|
|
6538
|
+
libredwg.dwg_ref_get_absref(table_style_ref)
|
|
6539
|
+
);
|
|
6540
|
+
const block_header_ref = libredwg.dwg_dynapi_entity_value(
|
|
6541
|
+
entity,
|
|
6542
|
+
"block_header"
|
|
6543
|
+
).data;
|
|
6544
|
+
const blockRecordHandle = idToString(
|
|
6545
|
+
libredwg.dwg_ref_get_absref(block_header_ref)
|
|
6546
|
+
);
|
|
6533
6547
|
const overrideFlag = libredwg.dwg_dynapi_entity_value(
|
|
6534
6548
|
entity,
|
|
6535
6549
|
"table_flag_override"
|
|
@@ -6565,10 +6579,8 @@ class LibreEntityConverter {
|
|
|
6565
6579
|
borderVisibilityOverrideFlag,
|
|
6566
6580
|
rowHeightArr,
|
|
6567
6581
|
columnWidthArr,
|
|
6568
|
-
tableStyleId
|
|
6569
|
-
|
|
6570
|
-
blockRecordHandle: 0,
|
|
6571
|
-
// TODO: Set the correct value
|
|
6582
|
+
tableStyleId,
|
|
6583
|
+
blockRecordHandle,
|
|
6572
6584
|
cells: this.convertTableCells(cells),
|
|
6573
6585
|
bmpPreview: ""
|
|
6574
6586
|
};
|
|
@@ -7118,7 +7130,7 @@ class LibreDwgConverter {
|
|
|
7118
7130
|
const explodability = libredwg.dwg_dynapi_entity_value(item, "explodable").data;
|
|
7119
7131
|
const scalability = libredwg.dwg_dynapi_entity_value(item, "block_scaling").data;
|
|
7120
7132
|
const layout_ptr = libredwg.dwg_dynapi_entity_value(item, "layout").data;
|
|
7121
|
-
const layout = libredwg.dwg_ref_get_absref(layout_ptr);
|
|
7133
|
+
const layout = idToString(libredwg.dwg_ref_get_absref(layout_ptr));
|
|
7122
7134
|
let bmpPreview = "";
|
|
7123
7135
|
const uint8ArrayToHexString = (bytes) => {
|
|
7124
7136
|
const hexChars = new Array(bytes.length);
|
|
@@ -7639,8 +7651,8 @@ class LibreDwgConverter {
|
|
|
7639
7651
|
const ownerhandle = libredwg.dwg_object_object_get_ownerhandle_object(object_tio);
|
|
7640
7652
|
const handle = libredwg.dwg_object_get_handle_object(obj);
|
|
7641
7653
|
return {
|
|
7642
|
-
handle: handle.value,
|
|
7643
|
-
ownerHandle: ownerhandle.absolute_ref
|
|
7654
|
+
handle: idToString(handle.value),
|
|
7655
|
+
ownerHandle: idToString(ownerhandle.absolute_ref)
|
|
7644
7656
|
};
|
|
7645
7657
|
}
|
|
7646
7658
|
}
|
|
@@ -5839,12 +5839,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5839
5839
|
countBoundaryPoints
|
|
5840
5840
|
);
|
|
5841
5841
|
const imagedef_ref = libredwg.dwg_dynapi_entity_value(entity, "imagedef").data;
|
|
5842
|
-
const imageDefHandle = libredwg.dwg_ref_get_absref(imagedef_ref);
|
|
5842
|
+
const imageDefHandle = idToString(libredwg.dwg_ref_get_absref(imagedef_ref));
|
|
5843
5843
|
const imagedefreactor_ref = libredwg.dwg_dynapi_entity_value(
|
|
5844
5844
|
entity,
|
|
5845
5845
|
"imagedefreactor"
|
|
5846
5846
|
).data;
|
|
5847
|
-
const imageDefReactorHandle = libredwg.dwg_ref_get_absref(imagedefreactor_ref);
|
|
5847
|
+
const imageDefReactorHandle = idToString(libredwg.dwg_ref_get_absref(imagedefreactor_ref));
|
|
5848
5848
|
return {
|
|
5849
5849
|
type: "IMAGE",
|
|
5850
5850
|
...commonAttrs,
|
|
@@ -6535,6 +6535,20 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
6535
6535
|
col_widths_ptr,
|
|
6536
6536
|
columnCount
|
|
6537
6537
|
);
|
|
6538
|
+
const table_style_ref = libredwg.dwg_dynapi_entity_value(
|
|
6539
|
+
entity,
|
|
6540
|
+
"tablestyle"
|
|
6541
|
+
).data;
|
|
6542
|
+
const tableStyleId = idToString(
|
|
6543
|
+
libredwg.dwg_ref_get_absref(table_style_ref)
|
|
6544
|
+
);
|
|
6545
|
+
const block_header_ref = libredwg.dwg_dynapi_entity_value(
|
|
6546
|
+
entity,
|
|
6547
|
+
"block_header"
|
|
6548
|
+
).data;
|
|
6549
|
+
const blockRecordHandle = idToString(
|
|
6550
|
+
libredwg.dwg_ref_get_absref(block_header_ref)
|
|
6551
|
+
);
|
|
6538
6552
|
const overrideFlag = libredwg.dwg_dynapi_entity_value(
|
|
6539
6553
|
entity,
|
|
6540
6554
|
"table_flag_override"
|
|
@@ -6570,10 +6584,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
6570
6584
|
borderVisibilityOverrideFlag,
|
|
6571
6585
|
rowHeightArr,
|
|
6572
6586
|
columnWidthArr,
|
|
6573
|
-
tableStyleId
|
|
6574
|
-
|
|
6575
|
-
blockRecordHandle: 0,
|
|
6576
|
-
// TODO: Set the correct value
|
|
6587
|
+
tableStyleId,
|
|
6588
|
+
blockRecordHandle,
|
|
6577
6589
|
cells: this.convertTableCells(cells),
|
|
6578
6590
|
bmpPreview: ""
|
|
6579
6591
|
};
|
|
@@ -7123,7 +7135,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
7123
7135
|
const explodability = libredwg.dwg_dynapi_entity_value(item, "explodable").data;
|
|
7124
7136
|
const scalability = libredwg.dwg_dynapi_entity_value(item, "block_scaling").data;
|
|
7125
7137
|
const layout_ptr = libredwg.dwg_dynapi_entity_value(item, "layout").data;
|
|
7126
|
-
const layout = libredwg.dwg_ref_get_absref(layout_ptr);
|
|
7138
|
+
const layout = idToString(libredwg.dwg_ref_get_absref(layout_ptr));
|
|
7127
7139
|
let bmpPreview = "";
|
|
7128
7140
|
const uint8ArrayToHexString = (bytes) => {
|
|
7129
7141
|
const hexChars = new Array(bytes.length);
|
|
@@ -7644,8 +7656,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
7644
7656
|
const ownerhandle = libredwg.dwg_object_object_get_ownerhandle_object(object_tio);
|
|
7645
7657
|
const handle = libredwg.dwg_object_get_handle_object(obj);
|
|
7646
7658
|
return {
|
|
7647
|
-
handle: handle.value,
|
|
7648
|
-
ownerHandle: ownerhandle.absolute_ref
|
|
7659
|
+
handle: idToString(handle.value),
|
|
7660
|
+
ownerHandle: idToString(ownerhandle.absolute_ref)
|
|
7649
7661
|
};
|
|
7650
7662
|
}
|
|
7651
7663
|
}
|
|
@@ -181,7 +181,7 @@ export class LibreDwgConverter {
|
|
|
181
181
|
.data;
|
|
182
182
|
const layout_ptr = libredwg.dwg_dynapi_entity_value(item, 'layout')
|
|
183
183
|
.data;
|
|
184
|
-
const layout = libredwg.dwg_ref_get_absref(layout_ptr);
|
|
184
|
+
const layout = idToString(libredwg.dwg_ref_get_absref(layout_ptr));
|
|
185
185
|
let bmpPreview = '';
|
|
186
186
|
const uint8ArrayToHexString = (bytes) => {
|
|
187
187
|
const hexChars = new Array(bytes.length);
|
|
@@ -836,8 +836,8 @@ export class LibreDwgConverter {
|
|
|
836
836
|
const ownerhandle = libredwg.dwg_object_object_get_ownerhandle_object(object_tio);
|
|
837
837
|
const handle = libredwg.dwg_object_get_handle_object(obj);
|
|
838
838
|
return {
|
|
839
|
-
handle: handle.value,
|
|
840
|
-
ownerHandle: ownerhandle.absolute_ref
|
|
839
|
+
handle: idToString(handle.value),
|
|
840
|
+
ownerHandle: idToString(ownerhandle.absolute_ref)
|
|
841
841
|
};
|
|
842
842
|
}
|
|
843
843
|
}
|
|
@@ -589,9 +589,9 @@ export class LibreEntityConverter {
|
|
|
589
589
|
const clippingBoundaryPath = libredwg.dwg_ptr_to_point3d_array(clip_verts, countBoundaryPoints);
|
|
590
590
|
const imagedef_ref = libredwg.dwg_dynapi_entity_value(entity, 'imagedef')
|
|
591
591
|
.data;
|
|
592
|
-
const imageDefHandle = libredwg.dwg_ref_get_absref(imagedef_ref);
|
|
592
|
+
const imageDefHandle = idToString(libredwg.dwg_ref_get_absref(imagedef_ref));
|
|
593
593
|
const imagedefreactor_ref = libredwg.dwg_dynapi_entity_value(entity, 'imagedefreactor').data;
|
|
594
|
-
const imageDefReactorHandle = libredwg.dwg_ref_get_absref(imagedefreactor_ref);
|
|
594
|
+
const imageDefReactorHandle = idToString(libredwg.dwg_ref_get_absref(imagedefreactor_ref));
|
|
595
595
|
return {
|
|
596
596
|
type: 'IMAGE',
|
|
597
597
|
...commonAttrs,
|
|
@@ -1192,6 +1192,10 @@ export class LibreEntityConverter {
|
|
|
1192
1192
|
const rowHeightArr = libredwg.dwg_ptr_to_double_array(row_heights_ptr, rowCount);
|
|
1193
1193
|
const col_widths_ptr = libredwg.dwg_dynapi_entity_value(entity, 'col_widths').data;
|
|
1194
1194
|
const columnWidthArr = libredwg.dwg_ptr_to_double_array(col_widths_ptr, columnCount);
|
|
1195
|
+
const table_style_ref = libredwg.dwg_dynapi_entity_value(entity, 'tablestyle').data;
|
|
1196
|
+
const tableStyleId = idToString(libredwg.dwg_ref_get_absref(table_style_ref));
|
|
1197
|
+
const block_header_ref = libredwg.dwg_dynapi_entity_value(entity, 'block_header').data;
|
|
1198
|
+
const blockRecordHandle = idToString(libredwg.dwg_ref_get_absref(block_header_ref));
|
|
1195
1199
|
const overrideFlag = libredwg.dwg_dynapi_entity_value(entity, 'table_flag_override').data;
|
|
1196
1200
|
const borderColorOverrideFlag = libredwg.dwg_dynapi_entity_value(entity, 'border_color_overrides_flag').data;
|
|
1197
1201
|
const borderLineWeightOverrideFlag = libredwg.dwg_dynapi_entity_value(entity, 'border_lineweight_overrides_flag').data;
|
|
@@ -1217,8 +1221,8 @@ export class LibreEntityConverter {
|
|
|
1217
1221
|
borderVisibilityOverrideFlag: borderVisibilityOverrideFlag,
|
|
1218
1222
|
rowHeightArr: rowHeightArr,
|
|
1219
1223
|
columnWidthArr: columnWidthArr,
|
|
1220
|
-
tableStyleId:
|
|
1221
|
-
blockRecordHandle:
|
|
1224
|
+
tableStyleId: tableStyleId,
|
|
1225
|
+
blockRecordHandle: blockRecordHandle,
|
|
1222
1226
|
cells: this.convertTableCells(cells),
|
|
1223
1227
|
bmpPreview: ''
|
|
1224
1228
|
};
|
|
@@ -21,13 +21,13 @@ export interface DwgImageEntity extends DwgEntity {
|
|
|
21
21
|
uPixel: DwgPoint3D;
|
|
22
22
|
vPixel: DwgPoint3D;
|
|
23
23
|
imageSize: DwgPoint2D;
|
|
24
|
-
imageDefHandle:
|
|
24
|
+
imageDefHandle: string;
|
|
25
25
|
flags: DwgImageFlags;
|
|
26
26
|
clipping: number;
|
|
27
27
|
brightness: number;
|
|
28
28
|
contrast: number;
|
|
29
29
|
fade: number;
|
|
30
|
-
imageDefReactorHandle:
|
|
30
|
+
imageDefReactorHandle: string;
|
|
31
31
|
clippingBoundaryType: DwgImageClippingBoundaryType;
|
|
32
32
|
countBoundaryPoints: number;
|
|
33
33
|
clippingBoundaryPath: DwgPoint3D[];
|
package/package.json
CHANGED