SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Function edgesAt

    • The edges a pointer is aimed at: one line, both inner rules at their crossing, or none.

      Parameters

      • x: number

        Pointer position relative to the diagram's top-left corner, in CSS px.

      • y: number

        Pointer position relative to the diagram's top-left corner, in CSS px.

      • width: number

        The diagram's width in CSS px.

      • height: number

        The diagram's height in CSS px.

      • isAvailable: (edge: Edge) => boolean

        Whether an edge can be drawn at all — the inner rules cannot, on a selection with no inside, and an edge that cannot be drawn must not swallow a click aimed past it.

      Returns readonly Edge[]

      Nearest line wins, which is the only rule that stays honest where an inner rule meets the outline. Fixed rectangles cannot be: their zones overlap, and whichever paints later takes the whole square.

      The middle is the exception. Where the two inner rules cross, the pointer is within reach of both and a pixel either way would flip between them, so that square is neither: it aims at the pair, which is the 'Inside' border. Only when both can be drawn — with one inner rule there is no crossing, and the middle is just that rule.

      Exported because this is the part worth testing directly — jsdom lays nothing out, so a mounted diagram cannot be asked where its lines are.