INNER CODE UNIT · TypeScript

x

hyscaler/HyCanvas · packages/a11y/src/index.ts:109

        const x = (t.x ?? 0) + cos * sx * px - sin * sy * py;
        const y = (t.y ?? 0) + sin * sx * px + cos * sy * py;
        top = Math.min(top, y);
        cx += x / 4;
        cy += y / 4;
      }
      return { cx, top, cy };
    };
    let backward = 0;
    for (let i = 1; i < ordered.length; i++) {
      const prev = center(ordered[i - 1]);
      const next = center(ordered[i]);
      // A clear backward jump: the next announced element sits entirely ABOVE
      // the previous one's row, or on the same row but behind it in the
      // document's reading direction. Column layouts survive: reading a
      // second column top-to-bottom produces only ONE upward jump.
      const above = next.cy < prev.top;
      const sameRow = !above && Math.abs(next.cy - prev.cy) < 8;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…