Simplify workspace options by removing svg property.

This commit is contained in:
Neil Fraser
2016-01-07 17:01:01 -08:00
parent 1facefc3cf
commit 3bce368115
8 changed files with 38 additions and 23 deletions

View File

@@ -328,7 +328,6 @@ Blockly.createDom_ = function(container, options) {
// x1, y1, x1, x2 properties will be set later in updateGridPattern_.
}
options.gridPattern = gridPattern;
options.svg = svg;
return svg;
};
@@ -411,7 +410,7 @@ Blockly.createMainWorkspace_ = function(svg, options) {
*/
Blockly.init_ = function(mainWorkspace) {
var options = mainWorkspace.options;
var svg = mainWorkspace.options.svg;
var svg = mainWorkspace.getParentSvg();
// Supress the browser's context menu.
Blockly.bindEvent_(svg, 'contextmenu', null,
function(e) {