Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
193 f9daq 1
/* TODO: Change toolbox XML ID if necessary. Can export toolbox XML from Workspace Factory. */
2
var toolbox = document.getElementById("toolbox");
3
 
4
var options = {
5
        toolbox : toolbox,
6
        collapse : true,
7
        comments : true,
8
        disable : true,
9
        maxBlocks : Infinity,
10
        trashcan : true,
11
        horizontalLayout : false,
12
        toolboxPosition : 'start',
13
        css : true,
14
        media : 'https://blockly-demo.appspot.com/static/media/',
15
        rtl : false,
16
        scrollbars : true,
17
        sounds : true,
18
        oneBasedIndex : true,
19
        zoom : {
20
                controls : true,
21
                wheel : true,
22
                startScale : 1.2,
23
                maxcale : 3,
24
                minScale : 0.3
25
        }
26
};
27
 
28
/* Inject your workspace */
29
var workspace = Blockly.inject('blocklyDiv', options);
30
 
31
/* Load Workspace Blocks from XML to workspace. Remove all code below if no blocks to load */
32
 
33
/* TODO: Change workspace blocks XML ID if necessary. Can export workspace blocks XML from Workspace Factory. */
34
var workspaceBlocks = document.getElementById("workspaceBlocks");
35
 
36
/* Load blocks to workspace. */
37
Blockly.Xml.domToWorkspace(workspace, workspaceBlocks);