feat(vom): canvas position calculation and projection

This commit is contained in:
Ljy-0827
2026-08-31 14:22:34 +08:00
parent d660da87f3
commit 22ca308342
30 changed files with 1433 additions and 33 deletions
+6
View File
@@ -43,6 +43,7 @@ import {
resolveTargetTab,
} from "./shared";
import { resolveSnapshotRef } from "./snapshot-ref";
import { handleSurfacePointClick } from "./surface-point-action";
export interface InteractionDeps {
cdp: CdpRunner;
@@ -224,6 +225,11 @@ export async function handleClick(
params: ClickParams,
deps: InteractionDeps = getDefaultDeps(),
): Promise<ClickResult | RpcError> {
const hasSurfacePointParams =
params.capture_id !== undefined || params.image_x !== undefined || params.image_y !== undefined;
if (hasSurfacePointParams) {
return handleSurfacePointClick(manager, params, deps);
}
const ctxOrErr = lookupSession(manager, params, "click");
if (isRpcError(ctxOrErr)) return ctxOrErr;
const ctx = ctxOrErr;