feat(vom): canvas position calculation and projection

This commit is contained in:
Ljy-0827 committed 2026-08-28 15:33:00 +08:00
1 parent f33e1a7876
commit 0ec0b1d227
30 files changed
+1433 -33

No files matched your search

+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;