sctj-components 1.1.4 → 1.1.5

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.
@@ -12265,9 +12265,9 @@ function useBimfaceGIS(options = {}) {
12265
12265
  el.style.top = originalTop;
12266
12266
  return { width, height };
12267
12267
  }
12268
- const drawTextLabel = (options2) => {
12268
+ const textLabelGenerator = (options2) => {
12269
12269
  var _a;
12270
- let config = new Glodon.Bimface.Earth.Plugins.Drawable.CustomItemConfig({});
12270
+ let config = new Glodon.Bimface.Earth.Plugins.Drawable.CustomItemConfig();
12271
12271
  let html = document.createElement("div");
12272
12272
  html.style = handleObj2style(options2.style);
12273
12273
  html.style.width = "fit-content";
@@ -12277,17 +12277,14 @@ function useBimfaceGIS(options = {}) {
12277
12277
  config.visibleDistance = (_a = options2.visibleDistance) != null ? _a : 501;
12278
12278
  config.location = options2.location;
12279
12279
  const { width, height } = getElementSizeOffscreen(html);
12280
- console.log("width", width);
12281
- console.log("height", height);
12280
+ config.opacity = 1;
12282
12281
  config.offsetX = -(width / 2);
12283
12282
  config.offsetY = -height;
12284
- const customItem = new Glodon.Bimface.Earth.Plugins.Drawable.CustomItem(config);
12285
- drawableMng.value.addItem(customItem);
12286
- return customItem;
12283
+ return new Glodon.Bimface.Earth.Plugins.Drawable.CustomItem(config);
12287
12284
  };
12288
- const drawLeadLabel = (options2) => {
12285
+ const leadLabelGenerator = (options2) => {
12289
12286
  var _a;
12290
- let config = new Glodon.Bimface.Earth.Plugins.Drawable.LeadLabelConfig({});
12287
+ let config = new Glodon.Bimface.Earth.Plugins.Drawable.LeadLabelConfig();
12291
12288
  config.text = options2.text;
12292
12289
  config.height = options2.style.height;
12293
12290
  config.width = options2.style.width;
@@ -12306,19 +12303,71 @@ function useBimfaceGIS(options = {}) {
12306
12303
  );
12307
12304
  config.visibleDistance = (_a = options2.visibleDistance) != null ? _a : 501;
12308
12305
  config.worldPosition = options2.worldPosition;
12309
- const customItem = new Glodon.Bimface.Earth.Plugins.Drawable.LeadLabel(config);
12310
- drawableMng.value.addItem(customItem);
12311
- return customItem;
12306
+ return new Glodon.Bimface.Earth.Plugins.Drawable.LeadLabel(config);
12312
12307
  };
12313
- const drawMarker = (options2) => {
12308
+ const markerGenerator = (options2) => {
12314
12309
  let config = new Glodon.Bimface.Earth.Plugins.Marker3D.Marker3DConfig();
12315
12310
  config.src = options2.src;
12316
12311
  config.location = options2.location;
12317
12312
  config.size = options2.size;
12318
12313
  config.tooltip = options2.text;
12319
- let marker3d = new Glodon.Bimface.Earth.Plugins.Marker3D.Marker3D(config);
12320
- markerMng.value.addItem(marker3d);
12321
- return marker3d;
12314
+ return new Glodon.Bimface.Earth.Plugins.Marker3D.Marker3D(config);
12315
+ };
12316
+ const hideAllLabels = () => {
12317
+ drawableMng.value.hideAllItems();
12318
+ };
12319
+ const showAllLabels = () => {
12320
+ drawableMng.value.showAllItems();
12321
+ };
12322
+ const hideAllMarkers = () => {
12323
+ markerMng.value.hideAllItems();
12324
+ };
12325
+ const showAllMarkers = () => {
12326
+ markerMng.value.showAllItems();
12327
+ };
12328
+ const hideAll = () => {
12329
+ hideAllLabels();
12330
+ hideAllMarkers();
12331
+ };
12332
+ const showAll = () => {
12333
+ showAllLabels();
12334
+ showAllMarkers();
12335
+ };
12336
+ const drawTextLabel = (options2) => {
12337
+ const item = textLabelGenerator(options2);
12338
+ drawableMng.value.addItem(item);
12339
+ return item;
12340
+ };
12341
+ const drawLeadLabel = (options2) => {
12342
+ const item = leadLabelGenerator(options2);
12343
+ drawableMng.value.addItem(item);
12344
+ return item;
12345
+ };
12346
+ const drawMarker = (options2) => {
12347
+ const item = markerGenerator(options2);
12348
+ markerMng.value.addItem(item);
12349
+ return item;
12350
+ };
12351
+ const drawTextLabels = (optionList) => {
12352
+ const items = optionList.map((option) => {
12353
+ return textLabelGenerator(option);
12354
+ });
12355
+ drawableMng.value.addItems(items);
12356
+ return items;
12357
+ };
12358
+ const drawLeadLabels = (optionList) => {
12359
+ const items = optionList.map((option) => {
12360
+ return leadLabelGenerator(option);
12361
+ });
12362
+ drawableMng.value.addItems(items);
12363
+ return items;
12364
+ };
12365
+ const drawMarkers = (optionList) => {
12366
+ const items = optionList.map((option) => {
12367
+ return markerGenerator(option);
12368
+ });
12369
+ markerMng.value.addItems(items);
12370
+ return items;
12322
12371
  };
12323
12372
  return {
12324
12373
  viewer,
@@ -12387,13 +12436,22 @@ function useBimfaceGIS(options = {}) {
12387
12436
  closeModelEditor,
12388
12437
  clearAllEffects,
12389
12438
  drawTextLabel,
12439
+ drawTextLabels,
12390
12440
  drawLeadLabel,
12441
+ drawLeadLabels,
12391
12442
  drawMarker,
12443
+ drawMarkers,
12392
12444
  deleteLabelById,
12393
12445
  deleteLabelByIds,
12394
12446
  deleteMarkerById,
12395
12447
  deleteMarkerByIds,
12396
12448
  clearAllDraws,
12449
+ hideAllLabels,
12450
+ hideAllMarkers,
12451
+ showAllLabels,
12452
+ showAllMarkers,
12453
+ hideAll,
12454
+ showAll,
12397
12455
  swipe,
12398
12456
  isSwipeAdded,
12399
12457
  openSwipe,
@@ -12404,8 +12462,8 @@ function useBimfaceGIS(options = {}) {
12404
12462
  dispose
12405
12463
  };
12406
12464
  }
12407
- const index_vue_vue_type_style_index_0_scoped_9656d353_lang = "";
12408
- const _withScopeId = (n) => (pushScopeId("data-v-9656d353"), n = n(), popScopeId(), n);
12465
+ const index_vue_vue_type_style_index_0_scoped_14806784_lang = "";
12466
+ const _withScopeId = (n) => (pushScopeId("data-v-14806784"), n = n(), popScopeId(), n);
12409
12467
  const _hoisted_1 = {
12410
12468
  key: 0,
12411
12469
  class: "loading-mask"
@@ -12468,8 +12526,8 @@ const _sfc_main = {
12468
12526
  setup(__props, { expose, emit }) {
12469
12527
  const props = __props;
12470
12528
  useCssVars((_ctx) => ({
12471
- "5d362dc5": __props.width,
12472
- "2fc09108": __props.height
12529
+ "7a506c38": __props.width,
12530
+ "9423be16": __props.height
12473
12531
  }));
12474
12532
  const containerRef = ref$1(null);
12475
12533
  const {
@@ -12546,13 +12604,22 @@ const _sfc_main = {
12546
12604
  toggleSwipe,
12547
12605
  destroySwipe,
12548
12606
  drawTextLabel,
12607
+ drawTextLabels,
12549
12608
  drawLeadLabel,
12609
+ drawLeadLabels,
12550
12610
  drawMarker,
12611
+ drawMarkers,
12551
12612
  deleteLabelById,
12552
12613
  deleteLabelByIds,
12553
12614
  deleteMarkerById,
12554
12615
  deleteMarkerByIds,
12555
12616
  clearAllDraws,
12617
+ hideAllLabels,
12618
+ hideAllMarkers,
12619
+ showAllLabels,
12620
+ showAllMarkers,
12621
+ hideAll,
12622
+ showAll,
12556
12623
  dispose
12557
12624
  } = useBimfaceGIS({
12558
12625
  onModelTransformEnd: (data) => emit("model-transform-end", data)
@@ -12863,13 +12930,22 @@ const _sfc_main = {
12863
12930
  toggleSwipe,
12864
12931
  destroySwipe,
12865
12932
  drawTextLabel,
12933
+ drawTextLabels,
12866
12934
  drawLeadLabel,
12935
+ drawLeadLabels,
12867
12936
  drawMarker,
12937
+ drawMarkers,
12868
12938
  deleteLabelById,
12869
12939
  deleteLabelByIds,
12870
12940
  deleteMarkerById,
12871
12941
  deleteMarkerByIds,
12872
12942
  clearAllDraws,
12943
+ hideAllLabels,
12944
+ hideAllMarkers,
12945
+ showAllLabels,
12946
+ showAllMarkers,
12947
+ hideAll,
12948
+ showAll,
12873
12949
  dispose
12874
12950
  });
12875
12951
  return (_ctx, _cache) => {
@@ -12901,7 +12977,7 @@ const _sfc_main = {
12901
12977
  };
12902
12978
  }
12903
12979
  };
12904
- const SCTJGISViewer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9656d353"]]);
12980
+ const SCTJGISViewer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-14806784"]]);
12905
12981
  const components = [
12906
12982
  { component: SCTJDictTag, name: "SCTJDictTag" },
12907
12983
  { component: SCTJTreeSelect, name: "SCTJTreeSelect" },