feat(vom): canvas position calculation and projection

This commit is contained in:
Ljy-0827 committed 2026-09-08 11:15:53 +08:00
1 parent aeece8d7e4
commit 000b374d0c
30 files changed
+1375 -20

No files matched your search

+6
View File
@@ -44,6 +44,7 @@ import {
resolveTargetTab,
} from "./shared";
import { resolveSnapshotRef } from "./snapshot-ref";
import { handleSurfacePointClick } from "./surface-point-action";
export interface InteractionDeps {
cdp: CdpRunner;
@@ -247,6 +248,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;