hart-estate-widget 0.0.33 → 0.0.34
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.
@@ -50,14 +50,16 @@ const pathName = 'Panorama_0_0_';
|
|
50
50
|
(0, _panoramaHelpers.imageToUri)(_doorIcon.default, img => PANOLENS.DataImage.Door = img);
|
51
51
|
|
52
52
|
const getCameraFromSrc = (json, src) => {
|
53
|
+
var _json$Floors$0$Camera;
|
54
|
+
|
53
55
|
const cameraIdTimestamp = src.match(/(?<=CameraId)[\s\S]*?(?=\.png)/);
|
54
56
|
const cameraId = "CameraId".concat(cameraIdTimestamp);
|
55
|
-
return json.Floors[0].CameraPoints.find(_ref => {
|
57
|
+
return ((_json$Floors$0$Camera = json.Floors[0].CameraPoints) === null || _json$Floors$0$Camera === void 0 ? void 0 : _json$Floors$0$Camera.find(_ref => {
|
56
58
|
let {
|
57
59
|
ID
|
58
60
|
} = _ref;
|
59
61
|
return ID === cameraId;
|
60
|
-
});
|
62
|
+
})) || null;
|
61
63
|
};
|
62
64
|
|
63
65
|
const createPanorama = (image, index, setLoadingState) => {
|
@@ -141,6 +143,7 @@ const setPanoramaLinks = (json, currentRoom, center, panorama, panoramas) => {
|
|
141
143
|
return src === image;
|
142
144
|
});
|
143
145
|
const currentCamera = getCameraFromSrc(json, connectedPanorama.src);
|
146
|
+
if (!currentCamera) return;
|
144
147
|
connectPanorama(panorama, connectedPanorama, currentCamera.Location, center, false);
|
145
148
|
});
|
146
149
|
json.Floors[0].Doors.forEach(_ref3 => {
|