Commit ef0e7413 authored by carlosperate's avatar carlosperate

Enable workspace zoom in ardublockly front end.

parent 3583f895
...@@ -51,14 +51,26 @@ Ardublockly.injectBlockly = function(blocklyEl, toolboxPath, blocklyPath) { ...@@ -51,14 +51,26 @@ Ardublockly.injectBlockly = function(blocklyEl, toolboxPath, blocklyPath) {
var xmlTree = Blockly.Xml.textToDom(request.responseText); var xmlTree = Blockly.Xml.textToDom(request.responseText);
Ardublockly.updateToolboxLanguage(xmlTree); Ardublockly.updateToolboxLanguage(xmlTree);
Ardublockly.workspace = Blockly.inject(blocklyEl, { Ardublockly.workspace = Blockly.inject(blocklyEl, {
collapse: true, collapse: true,
comments: true, comments: true,
disable: true, css: true,
media: blocklyPath + '/media/', disable: true,
rtl: false, grid: false,
scrollbars: true, media: blocklyPath + '/media/',
toolbox: xmlTree, rtl: false,
trashcan: true }); scrollbars: true,
sounds: true,
toolbox: xmlTree,
trashcan: true,
zoom: {
enabled: true,
controls: true,
wheel: false,
startScale: 1.0,
maxScale: 3,
minScale: 0.3
}
});
Ardublockly.BLOCKLY_INJECTED_ = true; Ardublockly.BLOCKLY_INJECTED_ = true;
Ardublockly.loadSessionStorageBlocks(); Ardublockly.loadSessionStorageBlocks();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment