Fix resizing view breaking app on high DPI displays (#5275)
* Fix resizing view breaking app on high DPI displays * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
This commit is contained in:
@ -1406,6 +1406,8 @@ export class EngineCommandManager extends EventTarget {
|
|||||||
commandId: string
|
commandId: string
|
||||||
}
|
}
|
||||||
settings: SettingsViaQueryString
|
settings: SettingsViaQueryString
|
||||||
|
width: number = 1337
|
||||||
|
height: number = 1337
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export intent traxcks the intent of the export. If it is null there is no
|
* 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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.width = width
|
||||||
|
this.height = height
|
||||||
|
|
||||||
// If we already have an engine connection, just need to resize the stream.
|
// If we already have an engine connection, just need to resize the stream.
|
||||||
if (this.engineConnection) {
|
if (this.engineConnection) {
|
||||||
this.handleResize({
|
this.handleResize({
|
||||||
@ -1823,6 +1828,9 @@ export class EngineCommandManager extends EventTarget {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.width = streamWidth
|
||||||
|
this.height = streamHeight
|
||||||
|
|
||||||
const resizeCmd: EngineCommand = {
|
const resizeCmd: EngineCommand = {
|
||||||
type: 'modeling_cmd_req',
|
type: 'modeling_cmd_req',
|
||||||
cmd_id: uuidv4(),
|
cmd_id: uuidv4(),
|
||||||
|
@ -819,8 +819,8 @@ export async function sendSelectEventToEngine(
|
|||||||
clientX: e.clientX,
|
clientX: e.clientX,
|
||||||
clientY: e.clientY,
|
clientY: e.clientY,
|
||||||
el,
|
el,
|
||||||
streamWidth: el.clientWidth,
|
streamWidth: engineCommandManager.width,
|
||||||
streamHeight: el.clientHeight,
|
streamHeight: engineCommandManager.height,
|
||||||
})
|
})
|
||||||
const res = await engineCommandManager.sendSceneCommand({
|
const res = await engineCommandManager.sendSceneCommand({
|
||||||
type: 'modeling_cmd_req',
|
type: 'modeling_cmd_req',
|
||||||
|
Reference in New Issue
Block a user