feat(view):基本实现连续视图的功能。

This commit is contained in:
徐涛
2023-03-08 16:28:24 +08:00
parent 848c8c01e7
commit 9437e45b8d
13 changed files with 191 additions and 17 deletions
+10
View File
@@ -0,0 +1,10 @@
import { and, gt, lt } from 'ramda';
export function withinRange(
itemStart: number,
itemEnd: number,
offsetStart: number,
offsetEnd: number
): boolean {
return and(lt(itemStart, offsetEnd), gt(itemEnd, offsetStart));
}