@mlightcad/libredwg-web 0.7.15 → 0.7.16

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.
@@ -3208,7 +3208,30 @@ class LibreEntityConverter {
3208
3208
  const snapAngle = libredwg.dwg_dynapi_entity_data(entity, "SNAPANG");
3209
3209
  const viewTwistAngle = libredwg.dwg_dynapi_entity_data(entity, "twist_angle");
3210
3210
  const circleZoomPercent = libredwg.dwg_dynapi_entity_data(entity, "circle_zoom");
3211
+ const numFrozenLayers = libredwg.dwg_dynapi_entity_data(
3212
+ entity,
3213
+ "num_frozen_layers"
3214
+ );
3215
+ let frozenLayerIds;
3216
+ if (numFrozenLayers > 0) {
3217
+ const frozenLayersPtr = libredwg.dwg_dynapi_entity_data(
3218
+ entity,
3219
+ "frozen_layers"
3220
+ );
3221
+ if (frozenLayersPtr) {
3222
+ const frozenLayers = libredwg.dwg_ptr_to_object_ref_ptr_array(
3223
+ frozenLayersPtr,
3224
+ numFrozenLayers
3225
+ );
3226
+ frozenLayerIds = frozenLayers.map((ref) => libredwg.dwg_ref_get_id(ref)).filter((id) => !!id);
3227
+ }
3228
+ }
3211
3229
  const statusBitFlags = libredwg.dwg_dynapi_entity_data(entity, "status_flag");
3230
+ const clip_boundary_ref = libredwg.dwg_dynapi_entity_data(
3231
+ entity,
3232
+ "clip_boundary"
3233
+ );
3234
+ const clippingBoundaryId = libredwg.dwg_ref_get_id(clip_boundary_ref);
3212
3235
  const sheetName = libredwg.dwg_dynapi_entity_data(entity, "style_sheet");
3213
3236
  const renderMode = libredwg.dwg_dynapi_entity_data(entity, "render_mode");
3214
3237
  const ucsPerViewport = libredwg.dwg_dynapi_entity_data(entity, "UCSVP");
@@ -3257,7 +3280,9 @@ class LibreEntityConverter {
3257
3280
  snapAngle,
3258
3281
  viewTwistAngle,
3259
3282
  circleZoomPercent,
3283
+ frozenLayerIds,
3260
3284
  statusBitFlags,
3285
+ clippingBoundaryId,
3261
3286
  sheetName,
3262
3287
  renderMode,
3263
3288
  ucsPerViewport,
@@ -3210,7 +3210,30 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
3210
3210
  const snapAngle = libredwg.dwg_dynapi_entity_data(entity, "SNAPANG");
3211
3211
  const viewTwistAngle = libredwg.dwg_dynapi_entity_data(entity, "twist_angle");
3212
3212
  const circleZoomPercent = libredwg.dwg_dynapi_entity_data(entity, "circle_zoom");
3213
+ const numFrozenLayers = libredwg.dwg_dynapi_entity_data(
3214
+ entity,
3215
+ "num_frozen_layers"
3216
+ );
3217
+ let frozenLayerIds;
3218
+ if (numFrozenLayers > 0) {
3219
+ const frozenLayersPtr = libredwg.dwg_dynapi_entity_data(
3220
+ entity,
3221
+ "frozen_layers"
3222
+ );
3223
+ if (frozenLayersPtr) {
3224
+ const frozenLayers = libredwg.dwg_ptr_to_object_ref_ptr_array(
3225
+ frozenLayersPtr,
3226
+ numFrozenLayers
3227
+ );
3228
+ frozenLayerIds = frozenLayers.map((ref) => libredwg.dwg_ref_get_id(ref)).filter((id) => !!id);
3229
+ }
3230
+ }
3213
3231
  const statusBitFlags = libredwg.dwg_dynapi_entity_data(entity, "status_flag");
3232
+ const clip_boundary_ref = libredwg.dwg_dynapi_entity_data(
3233
+ entity,
3234
+ "clip_boundary"
3235
+ );
3236
+ const clippingBoundaryId = libredwg.dwg_ref_get_id(clip_boundary_ref);
3214
3237
  const sheetName = libredwg.dwg_dynapi_entity_data(entity, "style_sheet");
3215
3238
  const renderMode = libredwg.dwg_dynapi_entity_data(entity, "render_mode");
3216
3239
  const ucsPerViewport = libredwg.dwg_dynapi_entity_data(entity, "UCSVP");
@@ -3259,7 +3282,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
3259
3282
  snapAngle,
3260
3283
  viewTwistAngle,
3261
3284
  circleZoomPercent,
3285
+ frozenLayerIds,
3262
3286
  statusBitFlags,
3287
+ clippingBoundaryId,
3263
3288
  sheetName,
3264
3289
  renderMode,
3265
3290
  ucsPerViewport,
@@ -1813,8 +1813,20 @@ export class LibreEntityConverter {
1813
1813
  const snapAngle = libredwg.dwg_dynapi_entity_data(entity, 'SNAPANG');
1814
1814
  const viewTwistAngle = libredwg.dwg_dynapi_entity_data(entity, 'twist_angle');
1815
1815
  const circleZoomPercent = libredwg.dwg_dynapi_entity_data(entity, 'circle_zoom');
1816
- // TODO: convert frozenLayerIds and clippingBoundaryId
1816
+ const numFrozenLayers = libredwg.dwg_dynapi_entity_data(entity, 'num_frozen_layers');
1817
+ let frozenLayerIds;
1818
+ if (numFrozenLayers > 0) {
1819
+ const frozenLayersPtr = libredwg.dwg_dynapi_entity_data(entity, 'frozen_layers');
1820
+ if (frozenLayersPtr) {
1821
+ const frozenLayers = libredwg.dwg_ptr_to_object_ref_ptr_array(frozenLayersPtr, numFrozenLayers);
1822
+ frozenLayerIds = frozenLayers
1823
+ .map(ref => libredwg.dwg_ref_get_id(ref))
1824
+ .filter((id) => !!id);
1825
+ }
1826
+ }
1817
1827
  const statusBitFlags = libredwg.dwg_dynapi_entity_data(entity, 'status_flag');
1828
+ const clip_boundary_ref = libredwg.dwg_dynapi_entity_data(entity, 'clip_boundary');
1829
+ const clippingBoundaryId = libredwg.dwg_ref_get_id(clip_boundary_ref);
1818
1830
  const sheetName = libredwg.dwg_dynapi_entity_data(entity, 'style_sheet');
1819
1831
  const renderMode = libredwg.dwg_dynapi_entity_data(entity, 'render_mode');
1820
1832
  // TODO: Not sure whether UCSVP in libredwg represents ucsPerViewport
@@ -1865,7 +1877,9 @@ export class LibreEntityConverter {
1865
1877
  snapAngle: snapAngle,
1866
1878
  viewTwistAngle: viewTwistAngle,
1867
1879
  circleZoomPercent: circleZoomPercent,
1880
+ frozenLayerIds,
1868
1881
  statusBitFlags: statusBitFlags,
1882
+ clippingBoundaryId,
1869
1883
  sheetName: sheetName,
1870
1884
  renderMode: renderMode,
1871
1885
  ucsPerViewport: ucsPerViewport,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "A DWG/DXF JavaScript parser based on libredwg",
4
4
  "license": "GPL-3.0",
5
5
  "private": false,
6
- "version": "0.7.15",
6
+ "version": "0.7.16",
7
7
  "author": "MLight Lee <mlight.lee@outlook.com>",
8
8
  "type": "module",
9
9
  "engines": {