diff --git a/src/lang/std/engineConnection.ts b/src/lang/std/engineConnection.ts index 09c76ceb23..774354fb38 100644 --- a/src/lang/std/engineConnection.ts +++ b/src/lang/std/engineConnection.ts @@ -1406,6 +1406,8 @@ export class EngineCommandManager extends EventTarget { commandId: string } settings: SettingsViaQueryString + width: number = 1337 + height: number = 1337 /** * Export intent traxcks the intent of the export. If it is null there is no @@ -1511,6 +1513,9 @@ export class EngineCommandManager extends EventTarget { return } + this.width = width + this.height = height + // If we already have an engine connection, just need to resize the stream. if (this.engineConnection) { this.handleResize({ @@ -1823,6 +1828,9 @@ export class EngineCommandManager extends EventTarget { return } + this.width = streamWidth + this.height = streamHeight + const resizeCmd: EngineCommand = { type: 'modeling_cmd_req', cmd_id: uuidv4(), diff --git a/src/lib/selections.ts b/src/lib/selections.ts index 848310dccb..f9b27d7564 100644 --- a/src/lib/selections.ts +++ b/src/lib/selections.ts @@ -819,8 +819,8 @@ export async function sendSelectEventToEngine( clientX: e.clientX, clientY: e.clientY, el, - streamWidth: el.clientWidth, - streamHeight: el.clientHeight, + streamWidth: engineCommandManager.width, + streamHeight: engineCommandManager.height, }) const res = await engineCommandManager.sendSceneCommand({ type: 'modeling_cmd_req',