@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
|
@@ -2230,7 +2230,7 @@ class ViewerStream extends bundle_esm$1.StreamApi {
|
|
|
2230
2230
|
: this.frameBgColor;
|
|
2231
2231
|
if (fields.dimensions != null && fields.dimensions !== this.dimensions) {
|
|
2232
2232
|
this.dimensions = fields.dimensions;
|
|
2233
|
-
this.ifState('connected', () => this.updateDimensions({ dimensions: this.
|
|
2233
|
+
this.ifState('connected', () => this.updateDimensions({ dimensions: this.getDimensions() }));
|
|
2234
2234
|
}
|
|
2235
2235
|
if (fields.streamAttributes != null &&
|
|
2236
2236
|
this.streamAttributes !== fields.streamAttributes) {
|
|
@@ -2376,7 +2376,7 @@ class ViewerStream extends bundle_esm$1.StreamApi {
|
|
|
2376
2376
|
const suppliedIdQuery = resource.queries.find((q) => q.type === 'supplied-id');
|
|
2377
2377
|
const res = streamAttributes.fromPbStartStreamResponseOrThrow(await this.startStream({
|
|
2378
2378
|
streamKey: { value: resource.resource.id },
|
|
2379
|
-
dimensions: this.
|
|
2379
|
+
dimensions: this.getDimensions(),
|
|
2380
2380
|
frameBackgroundColor: toPbColorOrThrow(this.frameBgColor),
|
|
2381
2381
|
streamAttributes: toPbStreamAttributesOrThrow(this.streamAttributes),
|
|
2382
2382
|
sceneViewStateId: ((_a = resource.subResource) === null || _a === void 0 ? void 0 : _a.type) === 'scene-view-state' &&
|
|
@@ -2402,7 +2402,7 @@ class ViewerStream extends bundle_esm$1.StreamApi {
|
|
|
2402
2402
|
async requestReconnectStream(state) {
|
|
2403
2403
|
const res = streamAttributes.fromPbReconnectResponseOrThrow(await this.reconnect({
|
|
2404
2404
|
streamId: { hex: state.streamId },
|
|
2405
|
-
dimensions: this.
|
|
2405
|
+
dimensions: this.getDimensions(),
|
|
2406
2406
|
frameBackgroundColor: toPbColorOrThrow(this.frameBgColor),
|
|
2407
2407
|
streamAttributes: toPbStreamAttributesOrThrow(this.streamAttributes),
|
|
2408
2408
|
}));
|
|
@@ -2519,6 +2519,14 @@ class ViewerStream extends bundle_esm$1.StreamApi {
|
|
|
2519
2519
|
this.stateChanged.emit(this.state);
|
|
2520
2520
|
}
|
|
2521
2521
|
}
|
|
2522
|
+
getDimensions() {
|
|
2523
|
+
if (bundle_esm.dimensions.area(this.dimensions) === 0) {
|
|
2524
|
+
// Ensure we always request at least a 1-pixel frame, even if the dimensions
|
|
2525
|
+
// haven't been set higher than zero.
|
|
2526
|
+
return bundle_esm.dimensions.create(1, 1);
|
|
2527
|
+
}
|
|
2528
|
+
return this.dimensions;
|
|
2529
|
+
}
|
|
2522
2530
|
ifState(state, f) {
|
|
2523
2531
|
if (this.state.type === state) {
|
|
2524
2532
|
return f();
|