feat(view):基本实现连续视图的功能。
This commit is contained in:
@@ -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));
|
||||
}
|
||||
Reference in New Issue
Block a user