@panoramax/web-viewer 3.1.1-develop-a3fa5272 → 3.1.1-develop-4687b4f6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoramax/web-viewer",
3
- "version": "3.1.1-develop-a3fa5272",
3
+ "version": "3.1.1-develop-4687b4f6",
4
4
  "description": "Panoramax web viewer for geolocated pictures",
5
5
  "main": "build/index.js",
6
6
  "author": "Panoramax team",
package/src/utils/Exif.js CHANGED
@@ -126,11 +126,11 @@ export function getSphereCorrection(picture) {
126
126
  roll = roll || 0;
127
127
 
128
128
  // Send result
129
- return {
129
+ return pitch !== 0 && roll !== 0 ? {
130
130
  pan: yaw * Math.PI / 180,
131
131
  tilt: pitch * Math.PI / 180,
132
132
  roll: roll * Math.PI / 180,
133
- };
133
+ } : {};
134
134
  }
135
135
 
136
136
  /**
package/src/utils/Map.js CHANGED
@@ -199,18 +199,19 @@ export function combineStyles(parent, options) {
199
199
  let capitalLayer = style.layers.find(l => l.id == "place_label_capital");
200
200
  if(citiesLayer && !capitalLayer) {
201
201
  // Create capital layer from original city style
202
+ citiesLayer.paint = {
203
+ "text-color": "hsl(0, 0%, 0%)",
204
+ "text-halo-blur": 0,
205
+ "text-halo-color": "hsla(0, 0%, 100%, 1)",
206
+ "text-halo-width": 3,
207
+ };
208
+ citiesLayer.layout["text-letter-spacing"] = 0.1;
202
209
  capitalLayer = JSON.parse(JSON.stringify(citiesLayer));
203
210
  capitalLayer.id = "place_label_capital";
204
211
  capitalLayer.filter.push(["<=", "capital", 2]);
205
212
 
206
213
  // Edit original city to make it less import
207
214
  citiesLayer.filter.push([">", "capital", 2]);
208
- citiesLayer.paint = {
209
- "text-color": "hsl(0,0%,15%)",
210
- "text-halo-blur": 0.5,
211
- "text-halo-color": "hsl(0,0%,100%)",
212
- "text-halo-width": 0.8,
213
- };
214
215
  style.layers.push(capitalLayer);
215
216
  }
216
217
 
@@ -386,7 +386,7 @@ export function apiFeatureToPSVNode(f, t, fastInternet=false, customLinkFilter=n
386
386
  };
387
387
  }
388
388
  // 360°
389
- else if(is360) {
389
+ else if(is360 && matrix) {
390
390
  panorama = {
391
391
  baseUrl,
392
392
  origBaseUrl: baseUrl,
@@ -431,7 +431,7 @@ export function apiFeatureToPSVNode(f, t, fastInternet=false, customLinkFilter=n
431
431
  };
432
432
  }
433
433
 
434
- return {
434
+ const node = {
435
435
  id: f.id,
436
436
  caption: getNodeCaption(f, t),
437
437
  panorama,
@@ -446,6 +446,8 @@ export function apiFeatureToPSVNode(f, t, fastInternet=false, customLinkFilter=n
446
446
  horizontalFov,
447
447
  properties: f.properties,
448
448
  };
449
+
450
+ return node;
449
451
  }
450
452
 
451
453
  /**
@@ -185,11 +185,7 @@ Object {
185
185
  "nextPic": undefined,
186
186
  "prevPic": undefined,
187
187
  },
188
- "sphereCorrection": Object {
189
- "pan": 0,
190
- "roll": 0,
191
- "tilt": 0,
192
- },
188
+ "sphereCorrection": Object {},
193
189
  }
194
190
  `;
195
191
 
@@ -104,11 +104,7 @@ Object {
104
104
  "nextPic": "ccf5f468-38b8-4b42-8d79-b97f5391e0a3",
105
105
  "prevPic": "127d9282-d082-46ca-bc09-4b0d8569dd2c",
106
106
  },
107
- "sphereCorrection": Object {
108
- "pan": 0,
109
- "roll": 0,
110
- "tilt": 0,
111
- },
107
+ "sphereCorrection": Object {},
112
108
  }
113
109
  `;
114
110
 
@@ -177,11 +173,7 @@ Object {
177
173
  "nextPic": "ccf5f468-38b8-4b42-8d79-b97f5391e0a3",
178
174
  "prevPic": "127d9282-d082-46ca-bc09-4b0d8569dd2c",
179
175
  },
180
- "sphereCorrection": Object {
181
- "pan": 0,
182
- "roll": 0,
183
- "tilt": 0,
184
- },
176
+ "sphereCorrection": Object {},
185
177
  }
186
178
  `;
187
179