mirror of
https://github.com/google/blockly.git
synced 2026-01-25 01:30:12 +01:00
19
build.py
19
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")])
|
||||
|
||||
@@ -366,7 +366,7 @@ Blockly.Css.CONTENT = [
|
||||
|
||||
'.blocklyAngleGauge {',
|
||||
'fill: #f88;',
|
||||
'fill-opacity: .8; ',
|
||||
'fill-opacity: .8;',
|
||||
'}',
|
||||
|
||||
'.blocklyAngleLine {',
|
||||
|
||||
@@ -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'] || {};
|
||||
|
||||
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user