Needlessly Postulating Minds

    scada-editor
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.8 • Public • Published

    Grapheditor for Angular.

    This package contains an editor along with all the required type definitions to modify the editors view to the given requirements. Original editor can be found in the above link.

    And the original editor is available in javascript here.

    Note : this package still uses JS to render the DOM. Type definitions are provided to modify the contents in typescript instead of overriding them in js , this is still in the alpha stage of development.

    A good example of this editor is draw.io

    static url's, images from grapheditor repo goes here.


    mxClient.basePath="/assets/library/scada";
    mxClient.imageBasePath="/assets/library/scada/resources/images/"
    

    Component


    import * as _scada from 'scada-editor/index';
    

    import scada.css into your angular.json


    Required Variables


    window
        STENCIL_PATH
        RESOURCES_PATH
        IMAGE_PATH
    

    initialization


    _scada.mxUtils.getAll(
        [
            _scada.mxResources.getDefaultBundle('.txt file for language', mxLanguage),
            'default.xml path'
        ],
        (xhr) => {
            _scada.mxResources.parse(xhr[0].getText());
            const themes = new Object();
            themes['default'] = xhr[1].getDocumentElement();
            Graph = new _scada.Graph(null, null, null, null, themes, null);
            Graph['transparentBackground'] = false;
            const renderContainer = new _scada.EditorUi(
            new _scada.Editor(false, themes['default'], null, Graph, true),
            **Dom Element**
            );
        },
        () => {
            error
            }
        );
    

    Install

    npm i scada-editor

    DownloadsWeekly Downloads

    2

    Version

    0.0.8

    License

    ISC

    Unpacked Size

    1.99 MB

    Total Files

    5

    Last publish

    Collaborators

    • notvarun