architwin 1.3.9 → 1.4.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.
@@ -347,17 +347,17 @@ function handlePlaceTag() {
347
347
  iTag = yield renderTag({ tag: tag }, true);
348
348
  }
349
349
  log.info('iTag', iTag);
350
- // dispatch set tag icon event
351
- // const targetSubCat = targetCategory.subcategories.find(subcat => subcat.uuid === payload.tagSubcategoryId)
352
- // log.info('__@ JOTEST: icon: ', targetSubCat)
353
- // dispatchSpaceEvent(SPACE_EVENTS.SET_TAG_ICON, {tag : iTag, catUUID: targetCategory.uuid})
354
- // set tag icon
355
- const targetSubCat = targetCategory.subcategories.find(subcat => subcat.uuid === payload.tagSubcategoryId);
356
- log.info('__@ JOTEST: icon: ', targetSubCat.json_data.iconUrl);
357
- if ((targetSubCat.json_data.iconUrl !== '' || undefined) && targetSubCat.json_data.iconUrl.includes('https')) {
358
- log.info('__@ JOTEST: Setting tag icon...');
359
- yield setTagIcon({ tag: iTag, icon: (_a = targetSubCat.json_data.iconUrl) !== null && _a !== void 0 ? _a : '', color: iTag.color });
360
- log.info('__@ JOTEST: Tag icon set!');
350
+ try {
351
+ // set tag icon
352
+ const targetSubCat = targetCategory.subcategories.find(subcat => subcat.uuid === payload.tagSubcategoryId);
353
+ log.info('__@ [onMoveTag] Icon URL: ', targetSubCat.json_data.iconUrl);
354
+ if (targetSubCat.json_data && targetSubCat.json_data.iconUrl && targetSubCat.json_data.iconUrl !== '' && targetSubCat.json_data.iconUrl.includes('https')) {
355
+ yield setTagIcon({ tag: iTag, icon: (_a = targetSubCat.json_data.iconUrl) !== null && _a !== void 0 ? _a : '', color: iTag.color });
356
+ log.info('__@ [onMoveTag] Tag icon set!');
357
+ }
358
+ }
359
+ catch (error) {
360
+ log.info('__@ [onMoveTag] Error on setTagIcon: ', error);
361
361
  }
362
362
  moveTag(iTag.id, onTagPlaced);
363
363
  function onTagPlaced() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "architwin",
3
- "version": "1.3.9",
3
+ "version": "1.4.0",
4
4
  "description": "ArchiTwin Library for Matterport",
5
5
  "main": "./lib/architwin.js",
6
6
  "types": "./lib/architwin.d.ts",