PiDraw API
    Preparing search index...

    Interface IFigureContext

    What a figure needs from the graph that owns it: the svg to draw in and the configuration of the coordinate system. A figure depends on this interface only, never on the Graph class, which would be an import cycle. The configuration is the live object of the graph: a change of the graph is seen by the figures at once.

    interface IFigureContext {
        config: IGraphConfig;
        rootSVG: Svg;
        figureChanged?(name: string): void;
    }
    Index
    config: IGraphConfig
    rootSVG: Svg
    • Called by a figure when something that the controllers of the graph care about changed in it (its steps of a presentation): the name of the figure. Facultative: a figure made without a graph (in a test) tells nobody.

      Parameters

      • name: string

      Returns void