mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-27 11:42:52 +00:00
Keep diff headers and painted content on the same scroll clock while preserving native scrolling and independent per-file horizontal offsets. Complete review, selection, typography, tree, and palette parity without returning line rendering to React.
18 lines
506 B
TypeScript
18 lines
506 B
TypeScript
import { hitTestDiffDocument } from "./hit-testing";
|
|
import type { DiffDocumentModel, DiffFileSection, DiffHit } from "./types";
|
|
|
|
export function hitTestDiffBodyPoint(input: {
|
|
model: DiffDocumentModel;
|
|
file: DiffFileSection;
|
|
locationX: number;
|
|
locationY: number;
|
|
horizontalOffset: number;
|
|
}): DiffHit | null {
|
|
return hitTestDiffDocument({
|
|
model: input.model,
|
|
x: input.locationX,
|
|
documentY: input.file.bodyTop + input.locationY,
|
|
horizontalOffset: input.horizontalOffset,
|
|
});
|
|
}
|