@vertexvis/viewer 0.19.2-canary.4 → 0.19.2
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/dist/cjs/vertex-viewer.cjs.entry.js +11 -3
- package/dist/cjs/vertex-viewer.cjs.entry.js.map +1 -1
- package/dist/collection/lib/stream/stream.js +11 -3
- package/dist/collection/lib/stream/stream.js.map +1 -1
- package/dist/components/vertex-viewer.js +11 -3
- package/dist/components/vertex-viewer.js.map +1 -1
- package/dist/esm/vertex-viewer.entry.js +11 -3
- package/dist/esm/vertex-viewer.entry.js.map +1 -1
- package/dist/types/lib/stream/stream.d.ts +1 -0
- package/dist/viewer/{p-c1152e45.entry.js → p-bf732093.entry.js} +2 -2
- package/dist/viewer/p-bf732093.entry.js.map +1 -0
- package/dist/viewer/viewer.esm.js +1 -1
- package/package.json +7 -7
- package/readme.md +4 -4
- package/dist/viewer/p-c1152e45.entry.js.map +0 -1
|
@@ -2226,7 +2226,7 @@ class ViewerStream extends StreamApi {
|
|
|
2226
2226
|
: this.frameBgColor;
|
|
2227
2227
|
if (fields.dimensions != null && fields.dimensions !== this.dimensions) {
|
|
2228
2228
|
this.dimensions = fields.dimensions;
|
|
2229
|
-
this.ifState('connected', () => this.updateDimensions({ dimensions: this.
|
|
2229
|
+
this.ifState('connected', () => this.updateDimensions({ dimensions: this.getDimensions() }));
|
|
2230
2230
|
}
|
|
2231
2231
|
if (fields.streamAttributes != null &&
|
|
2232
2232
|
this.streamAttributes !== fields.streamAttributes) {
|
|
@@ -2372,7 +2372,7 @@ class ViewerStream extends StreamApi {
|
|
|
2372
2372
|
const suppliedIdQuery = resource.queries.find((q) => q.type === 'supplied-id');
|
|
2373
2373
|
const res = fromPbStartStreamResponseOrThrow(await this.startStream({
|
|
2374
2374
|
streamKey: { value: resource.resource.id },
|
|
2375
|
-
dimensions: this.
|
|
2375
|
+
dimensions: this.getDimensions(),
|
|
2376
2376
|
frameBackgroundColor: toPbColorOrThrow(this.frameBgColor),
|
|
2377
2377
|
streamAttributes: toPbStreamAttributesOrThrow(this.streamAttributes),
|
|
2378
2378
|
sceneViewStateId: ((_a = resource.subResource) === null || _a === void 0 ? void 0 : _a.type) === 'scene-view-state' &&
|
|
@@ -2398,7 +2398,7 @@ class ViewerStream extends StreamApi {
|
|
|
2398
2398
|
async requestReconnectStream(state) {
|
|
2399
2399
|
const res = fromPbReconnectResponseOrThrow(await this.reconnect({
|
|
2400
2400
|
streamId: { hex: state.streamId },
|
|
2401
|
-
dimensions: this.
|
|
2401
|
+
dimensions: this.getDimensions(),
|
|
2402
2402
|
frameBackgroundColor: toPbColorOrThrow(this.frameBgColor),
|
|
2403
2403
|
streamAttributes: toPbStreamAttributesOrThrow(this.streamAttributes),
|
|
2404
2404
|
}));
|
|
@@ -2515,6 +2515,14 @@ class ViewerStream extends StreamApi {
|
|
|
2515
2515
|
this.stateChanged.emit(this.state);
|
|
2516
2516
|
}
|
|
2517
2517
|
}
|
|
2518
|
+
getDimensions() {
|
|
2519
|
+
if (dimensions.area(this.dimensions) === 0) {
|
|
2520
|
+
// Ensure we always request at least a 1-pixel frame, even if the dimensions
|
|
2521
|
+
// haven't been set higher than zero.
|
|
2522
|
+
return dimensions.create(1, 1);
|
|
2523
|
+
}
|
|
2524
|
+
return this.dimensions;
|
|
2525
|
+
}
|
|
2518
2526
|
ifState(state, f) {
|
|
2519
2527
|
if (this.state.type === state) {
|
|
2520
2528
|
return f();
|