@smarterplan/ngx-smarterplan-core 0.4.21 → 0.4.24

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.
@@ -700,6 +700,7 @@ class MatterportService {
700
700
  this.sdk.Mattertag.registerIcon("icon-ticket", this.config.my_config.icon_ticket);
701
701
  this.sdk.Mattertag.registerIcon("icon-equipment", this.config.my_config.icon_equipment);
702
702
  this.sdk.Mattertag.registerIcon("icon-measure", this.config.my_config.icon_measure);
703
+ this.sdk.Mattertag.registerIcon("icon-data", this.config.my_config.icon_data);
703
704
  this.sdk.Measurements.data.subscribe({
704
705
  onAdded: function (index, item, collection) {
705
706
  // console.log(
@@ -721,16 +722,18 @@ class MatterportService {
721
722
  // console.log('Is measurement mode currently active? ', measurementModeState.active);
722
723
  }.bind(this));
723
724
  break;
725
+ case SpModule.MUSEUM:
726
+ this.sdk.Mattertag.registerIcon("icon-data", this.config.my_config.icon_data);
727
+ break;
724
728
  case SpModule.HOTEL:
725
- // @TODO: hm...
726
729
  this.sdk.Mattertag.registerIcon("icon_room_available", this.config.my_config.icon_room_available);
727
730
  this.sdk.Mattertag.registerIcon("icon_room_unavailable", this.config.my_config.icon_room_unavailable);
731
+ this.sdk.Mattertag.registerIcon("icon_room_chosen", this.config.my_config.icon_room_chosen);
728
732
  break;
729
733
  default:
730
734
  break;
731
735
  }
732
736
  // Load Mattertag icons
733
- this.sdk.Mattertag.registerIcon("icon-data", this.config.my_config.icon_data);
734
737
  this.sdk.Mattertag.registerIcon("icon-position", this.config.my_config.icon_position);
735
738
  // 3D position's pointer
736
739
  this.sdk.Pointer.intersection.subscribe(function (intersection) {
@@ -939,6 +942,10 @@ class MatterportService {
939
942
  this.pointerButton.style.display = "block";
940
943
  }
941
944
  }
945
+ async addNewIconAndSetForTag(mattertagID, iconPath) {
946
+ await this.sdk.Mattertag.registerIcon(`icon_${mattertagID}`, iconPath);
947
+ this.sdk.Mattertag.editIcon(mattertagID, `icon_${mattertagID}`);
948
+ }
942
949
  async editTagStyle(mattertagID, mattertagData) {
943
950
  if (this.SPModule === SpModule.HOTEL) {
944
951
  const room = mattertagData.getObject();
@@ -1754,6 +1761,14 @@ class ViewerService {
1754
1761
  }
1755
1762
  }
1756
1763
  }
1764
+ addIconAndSetForPoi(poi, iconPath) {
1765
+ if (this.checkMode("Matterport")) {
1766
+ const tagData = this.matterportService.getTagFromElementId(poi.elementID);
1767
+ if (tagData.tag) {
1768
+ this.matterportService.addNewIconAndSetForTag(tagData.tag, iconPath);
1769
+ }
1770
+ }
1771
+ }
1757
1772
  /**
1758
1773
  * Move an existing poi in Matterport
1759
1774
  * @param poi
@@ -9182,7 +9197,7 @@ class FeatureService extends BaseObjectService {
9182
9197
  }
9183
9198
  async getFeature(id) {
9184
9199
  const feature = (await this.API.__proto__.GetFeature(id));
9185
- feature.events.items.sort((a, b) => b.realStartDate - a.realStartDate);
9200
+ feature.events?.items.sort((a, b) => b.realStartDate - a.realStartDate);
9186
9201
  this.setCoverImage(feature);
9187
9202
  this.setImages(feature);
9188
9203
  this.setVideos(feature);