hart-estate-widget 0.0.40 → 0.0.41

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.
@@ -11,10 +11,12 @@ require("core-js/modules/es.regexp.exec.js");
11
11
 
12
12
  require("core-js/modules/es.string.replace.js");
13
13
 
14
- require("core-js/modules/web.dom-collections.iterator.js");
14
+ require("core-js/modules/es.string.split.js");
15
15
 
16
16
  require("core-js/modules/es.string.includes.js");
17
17
 
18
+ require("core-js/modules/web.dom-collections.iterator.js");
19
+
18
20
  var _react = _interopRequireWildcard(require("react"));
19
21
 
20
22
  var _store = _interopRequireDefault(require("../store"));
@@ -88,7 +90,13 @@ const getPanoramas = (json, images, setLoadingState) => {
88
90
  const panoramaIdIndex = img.indexOf(pathName) + pathName.length;
89
91
  if (panoramaIdIndex < pathName.length) return false;
90
92
  const indexAsString = String(index);
91
- const panoramaId = String(removeExtention(img.substring(panoramaIdIndex)));
93
+ let panoramaId = String(removeExtention(img.substring(panoramaIdIndex))).split('.')[0];
94
+
95
+ if (panoramaId.includes(cameraIdBeginning)) {
96
+ const cameraIdIndex = panoramaId.indexOf(cameraIdBeginning) - 1;
97
+ panoramaId = panoramaId.slice(0, cameraIdIndex);
98
+ }
99
+
92
100
  const maxIndexLength = Math.max(indexAsString.length, panoramaId.length);
93
101
  const imageInRoom = (0, _panoramaHelpers.getArrayFromNumber)(maxIndexLength).every(i => {
94
102
  return panoramaId[i] === indexAsString[i];
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "HART Estate widget",
4
4
  "author": "HART",
5
5
  "keywords": [],
6
- "version": "0.0.40",
6
+ "version": "0.0.41",
7
7
  "private": false,
8
8
  "main": "build/index.js",
9
9
  "module": "build/index.js",