Lf94/hidpi hovering fix (#5541)

* Fix hover highlights on HiDPI screens

* Fix flakey tests with new toolbar.exitSketch

* tsc && lint && fmt

* Disable pw electron thing again

* Fix test

---------

Co-authored-by: 49lf <ircsurfer33@gmail.com>
This commit is contained in:
Pierre Jacquier
2025-03-06 11:19:13 -05:00
committed by GitHub
parent 4e1b0daacb
commit 2696ddb996
9 changed files with 78 additions and 59 deletions

View File

@ -646,16 +646,17 @@ export function codeToIdSelections(
}
export async function sendSelectEventToEngine(
e: MouseEvent | React.MouseEvent<HTMLDivElement, MouseEvent>,
el: HTMLVideoElement
e: React.MouseEvent<HTMLDivElement, MouseEvent>
) {
const { x, y } = getNormalisedCoordinates({
clientX: e.clientX,
clientY: e.clientY,
el,
streamWidth: engineCommandManager.width,
streamHeight: engineCommandManager.height,
})
// No video stream to normalise against, return immediately
if (!engineCommandManager.elVideo)
return Promise.reject('video element not ready')
const { x, y } = getNormalisedCoordinates(
e,
engineCommandManager.elVideo,
engineCommandManager.streamDimensions
)
const res = await engineCommandManager.sendSceneCommand({
type: 'modeling_cmd_req',
cmd: {