From 00ba0acf4093911573b255d5ccd6cd258c300d80 Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Fri, 13 Nov 2015 21:11:24 -0800 Subject: [PATCH] Clean up build file from previous PR. --- build.py | 19 +++++++------------ core/css.js | 2 +- core/inject.js | 30 ------------------------------ demos/blockfactory/factory.js | 2 +- 4 files changed, 9 insertions(+), 44 deletions(-) diff --git a/build.py b/build.py index f41b41b29..ccbc6deee 100755 --- a/build.py +++ b/build.py @@ -435,20 +435,15 @@ if __name__ == "__main__": print("Error: Closure directory needs to be renamed from" "'closure-library-read-only' to 'closure-library'.\n" "Please rename this directory.") - else: - try: - calcdeps = import_path(os.path.join( - os.path.pardir, "google-closure-library", "closure", "bin", "calcdeps.py")) - except ImportError: - if os.path.isdir(os.path.join(os.path.pardir, "closure-library-read-only")): - # Dir got renamed when Closure moved from Google Code to GitHub in 2014. - print("Error: Closure directory needs to be renamed from" - "'google-closure-library-read-only' to 'google-closure-library'.\n" + elif os.path.isdir(os.path.join(os.path.pardir, "google-closure-library")): + # When Closure is installed by npm, it is named "google-closure-library". + print("Error: Closure directory needs to be renamed from" + "'google-closure-library' to 'closure-library'.\n" "Please rename this directory.") - else: - print("""Error: Closure not found. Read this: + else: + print("""Error: Closure not found. Read this: https://developers.google.com/blockly/hacking/closure""") - sys.exit(1) + sys.exit(1) search_paths = calcdeps.ExpandDirectories( ["core", os.path.join(os.path.pardir, "closure-library")]) diff --git a/core/css.js b/core/css.js index 94bab919b..b91d5b277 100644 --- a/core/css.js +++ b/core/css.js @@ -366,7 +366,7 @@ Blockly.Css.CONTENT = [ '.blocklyAngleGauge {', 'fill: #f88;', - 'fill-opacity: .8; ', + 'fill-opacity: .8;', '}', '.blocklyAngleLine {', diff --git a/core/inject.js b/core/inject.js index 9632cbe8e..fc2467511 100644 --- a/core/inject.js +++ b/core/inject.js @@ -158,36 +158,6 @@ Blockly.parseOptions_ = function(options) { pathToMedia = options['path'] + 'media/'; } -/* TODO (fraser): Add documentation page: - * https://developers.google.com/blockly/installation/zoom - * - * controls - * - * Set to `true` to show zoom-in and zoom-out buttons. Defaults to `false`. - * - * wheel - * - * Set to `true` to allow the mouse wheel to zoom. Defaults to `false`. - * - * startScale - * - * Initial magnification factor. Defaults to `1.0`. - * - * maxScale - * - * Maximum multiplication factor for how far one can zoom in. Defaults to `3`. - * - * minScale - * - * Minimum multiplication factor for how far one can zoom out. Defaults to `0.3`. - * - * scaleSpeed - * - * For each zooming in-out step the scale is multiplied - * or divided respectively by the scale speed, this means that: - * `scale = scaleSpeed ^ steps`, note that in this formula - * steps of zoom-out are subtracted and zoom-in steps are added. - */ // See zoom documentation at: // https://developers.google.com/blockly/installation/zoom var zoom = options['zoom'] || {}; diff --git a/demos/blockfactory/factory.js b/demos/blockfactory/factory.js index 649a8956c..48af68878 100644 --- a/demos/blockfactory/factory.js +++ b/demos/blockfactory/factory.js @@ -308,7 +308,7 @@ function getFieldsJs_(block) { case 'field_angle': // Result: new Blockly.FieldAngle(90), 'ANGLE' fields.push('new Blockly.FieldAngle(' + - escapeString(block.getFieldValue('ANGLE')) + '), ' + + parseFloat(block.getFieldValue('ANGLE')) + '), ' + escapeString(block.getFieldValue('FIELDNAME'))); break; case 'field_checkbox':