redhotmagma-visualization 1.31.1 → 1.31.4

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/Three/Three2D.js CHANGED
@@ -1083,7 +1083,15 @@ var Three2D = /*#__PURE__*/function (_ThreeBase) {
1083
1083
  }, {
1084
1084
  key: "getModelPathFromDesignView",
1085
1085
  value: function getModelPathFromDesignView(designView) {
1086
- return this._materialVariantPath ? (0, _get2["default"])(designView, "images[".concat(this._materialVariantPath, "]")) : (0, _get2["default"])(designView, "images[".concat(this._itemPath, "]"));
1086
+ var images = (0, _get2["default"])(designView, 'images');
1087
+
1088
+ if (this._materialVariantPath && images.hasOwnProperty(this._materialVariantPath)) {
1089
+ return images[this._materialVariantPath];
1090
+ } else if (images.hasOwnProperty(this._itemPath)) {
1091
+ return images[this._itemPath];
1092
+ } else {
1093
+ return this._materialVariantPath ? (0, _get2["default"])(designView, "images[".concat(this._materialVariantPath, "]")) : (0, _get2["default"])(designView, "images[".concat(this._itemPath, "]"));
1094
+ }
1087
1095
  }
1088
1096
  }, {
1089
1097
  key: "clearScene",
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "redhotmagma-visualization",
3
- "version": "1.31.1",
3
+ "version": "1.31.4",
4
4
  "license": "UNLICENSED",
5
5
  "private": false,
6
6
  "main": "./index.js",
7
7
  "dependencies": {
8
8
  "@babel/polyfill": "^7.12.1",
9
- "@configuratorware/scripts": "1.31.1",
9
+ "@configuratorware/scripts": "1.31.4",
10
10
  "@tweenjs/tween.js": "^17.6.0",
11
11
  "console-polyfill": "^0.3.0",
12
12
  "css-element-queries": "^1.2.3",
@@ -600,9 +600,18 @@ export class Three2D extends ThreeBase {
600
600
  }
601
601
 
602
602
  getModelPathFromDesignView(designView) {
603
- return this._materialVariantPath
604
- ? get(designView, `images[${this._materialVariantPath}]`)
605
- : get(designView, `images[${this._itemPath}]`);
603
+ const images = get(designView, 'images');
604
+ if (this._materialVariantPath && images.hasOwnProperty(this._materialVariantPath)) {
605
+ return images[this._materialVariantPath];
606
+ }
607
+ else if (images.hasOwnProperty(this._itemPath)) {
608
+ return images[this._itemPath];
609
+ }
610
+ else {
611
+ return this._materialVariantPath
612
+ ? get(designView, `images[${this._materialVariantPath}]`)
613
+ : get(designView, `images[${this._itemPath}]`);
614
+ }
606
615
  }
607
616
 
608
617
  updateView = syncCurrent(async (designView, options = {}) => {