A world-class math input for the web
at main 15 lines 360 B view raw
1import { TokenFlow } from "../flow"; 2 3export class VerticalFlow extends TokenFlow { 4 verticalCandidates( 5 direction: "up" | "down", 6 fromIndex: number, 7 length: number 8 ): number[] { 9 if (direction === "up") { 10 return fromIndex > 0 ? [fromIndex - 1] : []; 11 } else { 12 return fromIndex < length - 1 ? [fromIndex + 1] : []; 13 } 14 } 15}