fmt(js): `npm run fix` on merge (#83132)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
338bca7968
commit
c08b086013
|
|
@ -18,7 +18,10 @@ export interface HudSnapShortcutController {
|
|||
dispose(): void
|
||||
}
|
||||
|
||||
export function createHudSnapShortcut(globalShortcut: GlobalShortcutLike, onSnap: () => void): HudSnapShortcutController {
|
||||
export function createHudSnapShortcut(
|
||||
globalShortcut: GlobalShortcutLike,
|
||||
onSnap: () => void
|
||||
): HudSnapShortcutController {
|
||||
let active: null | string = null
|
||||
|
||||
const release = () => {
|
||||
|
|
|
|||
|
|
@ -22,11 +22,7 @@ interface Rect {
|
|||
* Window top-left in screen space (DIP) that places `anchor` — a point in the
|
||||
* window's CSS pixels — under `cursor` (screen DIP).
|
||||
*/
|
||||
export function windowOriginForCursorAnchor(
|
||||
cursor: Point,
|
||||
anchor: Point,
|
||||
zoomFactor: number
|
||||
): Point {
|
||||
export function windowOriginForCursorAnchor(cursor: Point, anchor: Point, zoomFactor: number): Point {
|
||||
const scale = Number.isFinite(zoomFactor) && zoomFactor > 0 ? zoomFactor : 1
|
||||
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -9226,6 +9226,7 @@ function applyHudSnapToPointer() {
|
|||
const display = screen.getDisplayNearestPoint(cursor)
|
||||
const workArea = display?.workArea ?? bounds
|
||||
const anchor = { x: Math.round(bounds.width / 2), y: HUD_SNAP_ANCHOR_Y }
|
||||
|
||||
const origin = snapHudBounds(
|
||||
cursor,
|
||||
anchor,
|
||||
|
|
|
|||
Loading…
Reference in New Issue