Skip to content

Commit

Permalink
Merge pull request #2 from google/master
Browse files Browse the repository at this point in the history
Sync with main repository
  • Loading branch information
Immortalin committed Nov 14, 2015
2 parents ad7ec48 + 00ba0ac commit e1d06cd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 44 deletions.
19 changes: 7 additions & 12 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,20 +435,15 @@ def run(self):
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")])
Expand Down
2 changes: 1 addition & 1 deletion core/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ Blockly.Css.CONTENT = [

'.blocklyAngleGauge {',
'fill: #f88;',
'fill-opacity: .8; ',
'fill-opacity: .8;',
'}',

'.blocklyAngleLine {',
Expand Down
30 changes: 0 additions & 30 deletions core/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'] || {};
Expand Down
2 changes: 1 addition & 1 deletion demos/blockfactory/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit e1d06cd

Please sign in to comment.