Coder Social home page Coder Social logo

cdjackson / dblockly Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 50.62 MB

Dojo port of the Blockly library

License: Apache License 2.0

JavaScript 85.64% CSS 10.63% PHP 2.39% Shell 0.09% Perl 0.03% ActionScript 0.09% XSLT 0.42% Java 0.53% XQuery 0.01% Python 0.18% Ruby 0.01%

dblockly's Introduction

ExtBlockly is a port of the Blockly graphical programming environment to run under ExtJS 4. This is done to remove the dependancy on the Closure compiler and provide a consistent look and feel interface with ExtJS. For example, the toolbox has been changed to use an Ext Accordion layout, as are menus and input text box.

It tries to maintain as much compatibility with the original sources as possible, and the original sources are contained within a separate branch to allow a comparisson and merge to be completed with reasonable ease.

The directory extjs contains the ExtJS user extension and an example of its use (in ext-ux.html).

Configuration for blockly is put into the blockly object.

If a toolbox is defined, it is placed on the left of the window (east container in a border layout). Any toolbar (tbar) defined will then be moved into the centre container above the Blockly editor.

Initialisation options as follows -:

        var blockly = Ext.create('Ext.ux.blockly.Blockly', {
            tbar: toolbar,
            border:false,
            blockly: {
                toolbox: true,
                collapse: true,
                toolboxCategories: categoryArray,
                toolboxTools: toolArray,
                trashcan: true,
                blocks: "<xml>" + document.getElementById('go').innerHTML + "</xml>",
                path:"../",
                listeners: {
                    workspacechanged: function() {
                        console.log("It changed");
                    }
                }
            }
        });

blocks can be either an XML string, or a javascript object tree.

Use the method getBlocks to get the current workspace. If no parameter is provided, the return format will be a javascript object tree. Alternatively, a format can be provided - specify 'json' or 'xml'.

dblockly's People

Contributors

cdjackson avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.