Skip to content
Shim Heungwoon edited this page May 21, 2016 · 24 revisions

Graphite View

Major Classes

GraphicContainer

  • GraphicContainer wraps and manages a given HTMLElement which will contain graphical contents.
    <div id='container'></div>
    var shell = new GraphiteShell('container');
  • GraphicContainer creates GraphicContext.
    //GraphicContainer.getGraphicContext API
    GraphicContainer.getGraphicContext();
  • GraphicContainer provides a way to setup user's content root.
    //GraphiteShell.contents API
    contents: function (widget) {
        if (widget) {
            this.getContainer().contents(widget);
        } else {
            return this.getContainer().contents();
        }
    },

GraphicContext

  • GraphicContext is a place which user's contents will be painted.
  • GraphicContext provides ways to access specific graphic contexts such as svg, document, connection, grid, feedback, guide, handle, mask, viewport and any user defined graphic context.
  • GraphicContext can be configured by user defined GraphicContextFactory. Without user defined GraphicContextFactory, GraphicContainer makes default contexts(layers) using DefaultGraphicContextFactory. image
Clone this wiki locally