Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
2a0bd8b
Fix the "Create Variable" button in the playground by providing default
paulkaplan Dec 4, 2018
2f659d4
Use variable IDs and setValue instead of variable names and setText f…
paulkaplan Dec 4, 2018
d8e6f71
Merge pull request #1803 from paulkaplan/fix-var-context-menu
paulkaplan Dec 5, 2018
9d07404
Update and switch to reviewed translations
chrisgarrity Dec 6, 2018
30b2443
Use variable name as rename prompt's default value
towerofnix Dec 7, 2018
cc6545e
Merge pull request #1806 from chrisgarrity/translations-dec6
chrisgarrity Dec 7, 2018
5b3bffb
Update min height on drop down div, to fix reporters having extra spa…
kchadha Dec 7, 2018
ea6a0cc
Merge pull request #1810 from LLK/kchadha-fix-reporter-bubble-css
paulkaplan Dec 7, 2018
15098b2
Use fill-opacity for notepicker shadow
epicfaace Dec 10, 2018
4fd0c1e
Make SHADOW_OPACITY a number, not a string
epicfaace Dec 10, 2018
25d816f
Clear dropdown width
epicfaace Dec 10, 2018
1215b47
Fix extra events being emitted from the color slider
paulkaplan Dec 10, 2018
2b7bb62
Move binding callbacks below showing dropdown div so sliders update
paulkaplan Dec 11, 2018
cecd643
Merge pull request #1815 from paulkaplan/fix-color-slider-events
kchadha Dec 11, 2018
0aa6869
Conditionally turn off slider handle callbacks.
kchadha Dec 11, 2018
f17d389
Merge pull request #1812 from epicfaace/feature/notepicker-width
picklesrus Dec 12, 2018
bf9f037
Merge pull request #1816 from kchadha/fix-touching-color-purple
paulkaplan Dec 12, 2018
6042702
Do not include own variable name in variable reporter context menu.
kchadha Dec 12, 2018
799c7bd
Don't include cloud symbol in default value of "rename variable" prompt
kchadha Dec 12, 2018
273d5c2
Use CLOUD_PREFIX.length instead of assuming it
towerofnix Dec 12, 2018
9bb62e6
Change the order of the arrow keys
chrisgarrity Dec 12, 2018
0f1d91a
Merge pull request #1818 from chrisgarrity/issue/2173-arrow-order
chrisgarrity Dec 13, 2018
9d9b1ad
Merge pull request #1817 from kchadha/skip-self-in-var-context-menu
kchadha Dec 13, 2018
28ee2a6
Lint (fix long line)
kchadha Dec 13, 2018
ae423b3
Merge pull request #1811 from epicfaace/feature/notepicker-shadow
picklesrus Dec 13, 2018
1fead2c
Update translations
chrisgarrity Dec 13, 2018
d0c79de
Merge pull request #1819 from chrisgarrity/translations-dec13
chrisgarrity Dec 13, 2018
202d671
Merge pull request #1807 from towerofnix/rename-default-value
kchadha Dec 13, 2018
f2bd666
scroll very long context menus
epicfaace Dec 13, 2018
31dd997
Don't bind on mouseup for toolbox when block is being dragged over it
epicfaace Dec 18, 2018
684a18c
Merge pull request #1831 from epicfaace/feature/toolbox-drag
picklesrus Dec 18, 2018
79b9cf6
Comment formatting improvements
epicfaace Dec 19, 2018
57d1090
pull new translations from transifex
chrisgarrity Dec 21, 2018
02eb9e7
Merge pull request #1838 from chrisgarrity/translations-dec21
chrisgarrity Dec 21, 2018
0a092d6
"Say something" for block comment
apple502j Dec 27, 2018
d762d54
Merge pull request #1821 from epicfaace/feature/context-menu
picklesrus Jan 15, 2019
5d832c3
Merge pull request #1835 from epicfaace/feature/comment-format
picklesrus Jan 15, 2019
da3e22b
Merge pull request #1841 from apple502j/patch-1
kchadha Jan 16, 2019
a8185e8
Merge branch 'llk/develop' into biallo/upgrade
biallo Jan 17, 2019
1b18c25
CHG: 细节调整
biallo Jan 17, 2019
1add635
CHG: 调整配置 & build
biallo Jan 17, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ python_compressed.js
/*compiler*.jar
/local_blockly_compressed_vertical.js
/chromedriver

yarn-debug.log*
yarn-error.log*
package-lock.json
78 changes: 40 additions & 38 deletions blockly_compressed_horizontal.js

Large diffs are not rendered by default.

78 changes: 40 additions & 38 deletions blockly_compressed_vertical.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions blocks_compressed_vertical.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 16 additions & 11 deletions blocks_vertical/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,15 +518,18 @@ Blockly.Constants.Data.CUSTOM_CONTEXT_MENU_GET_VARIABLE_MIXIN = {
if (this.isCollapsed()) {
return;
}
var currentVarName = this.getField(fieldName).text_;
if (!this.isInFlyout) {
var variablesList = this.workspace.getVariablesOfType('');
for (var i = 0; i < variablesList.length; i++) {
var varName = variablesList[i].name;
if (varName == currentVarName) continue;
var option = {enabled: true};
option.text = variablesList[i].name;
option.text = varName;

option.callback =
Blockly.Constants.Data.VARIABLE_OPTION_CALLBACK_FACTORY(this,
option.text, fieldName);
variablesList[i].getId(), fieldName);
options.push(option);
}
} else {
Expand All @@ -536,9 +539,8 @@ Blockly.Constants.Data.CUSTOM_CONTEXT_MENU_GET_VARIABLE_MIXIN = {
callback: Blockly.Constants.Data.RENAME_OPTION_CALLBACK_FACTORY(this,
fieldName)
};
var name = this.getField(fieldName).text_;
var deleteOption = {
text: Blockly.Msg.DELETE_VARIABLE.replace('%1', name),
text: Blockly.Msg.DELETE_VARIABLE.replace('%1', currentVarName),
enabled: true,
callback: Blockly.Constants.Data.DELETE_OPTION_CALLBACK_FACTORY(this,
fieldName)
Expand Down Expand Up @@ -571,15 +573,19 @@ Blockly.Constants.Data.CUSTOM_CONTEXT_MENU_GET_LIST_MIXIN = {
if (this.isCollapsed()) {
return;
}
var currentVarName = this.getField(fieldName).text_;
if (!this.isInFlyout) {
var variablesList = this.workspace.getVariablesOfType('list');
for (var i = 0; i < variablesList.length; i++) {
var varName = variablesList[i].name;
if (varName == currentVarName) continue;

var option = {enabled: true};
option.text = variablesList[i].name;
option.text = varName;

option.callback =
Blockly.Constants.Data.VARIABLE_OPTION_CALLBACK_FACTORY(this,
option.text, fieldName);
variablesList[i].getId(), fieldName);
options.push(option);
}
} else {
Expand All @@ -589,9 +595,8 @@ Blockly.Constants.Data.CUSTOM_CONTEXT_MENU_GET_LIST_MIXIN = {
callback: Blockly.Constants.Data.RENAME_OPTION_CALLBACK_FACTORY(this,
fieldName)
};
var name = this.getField(fieldName).text_;
var deleteOption = {
text: Blockly.Msg.DELETE_LIST.replace('%1', name),
text: Blockly.Msg.DELETE_LIST.replace('%1', currentVarName),
enabled: true,
callback: Blockly.Constants.Data.DELETE_OPTION_CALLBACK_FACTORY(this,
fieldName)
Expand All @@ -610,18 +615,18 @@ Blockly.Extensions.registerMixin('contextMenu_getListBlock',
* menu, and clicking on that item changes the text of the field on the source
* block.
* @param {!Blockly.Block} block The block to update.
* @param {string} name The new name to display on the block.
* @param {string} id The id of the variable to set on this block.
* @param {string} fieldName The name of the field to update on the block.
* @return {!function()} A function that updates the block with the new name.
*/
Blockly.Constants.Data.VARIABLE_OPTION_CALLBACK_FACTORY = function(block,
name, fieldName) {
id, fieldName) {
return function() {
var variableField = block.getField(fieldName);
if (!variableField) {
console.log("Tried to get a variable field on the wrong type of block.");
}
variableField.setText(name);
variableField.setValue(id);
};
};

Expand Down
6 changes: 3 additions & 3 deletions blocks_vertical/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ Blockly.Blocks['event_whenkeypressed'] = {
"name": "KEY_OPTION",
"options": [
[Blockly.Msg.EVENT_WHENKEYPRESSED_SPACE, 'space'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_LEFT, 'left arrow'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_RIGHT, 'right arrow'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_DOWN, 'down arrow'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_UP, 'up arrow'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_DOWN, 'down arrow'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_RIGHT, 'right arrow'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_LEFT, 'left arrow'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_ANY, 'any'],
['a', 'a'],
['b', 'b'],
Expand Down
6 changes: 3 additions & 3 deletions blocks_vertical/sensing.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ Blockly.Blocks['sensing_keyoptions'] = {
"name": "KEY_OPTION",
"options": [
[Blockly.Msg.EVENT_WHENKEYPRESSED_SPACE, 'space'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_LEFT, 'left arrow'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_RIGHT, 'right arrow'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_DOWN, 'down arrow'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_UP, 'up arrow'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_DOWN, 'down arrow'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_RIGHT, 'right arrow'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_LEFT, 'left arrow'],
[Blockly.Msg.EVENT_WHENKEYPRESSED_ANY, 'any'],
['a', 'a'],
['b', 'b'],
Expand Down
2 changes: 1 addition & 1 deletion core/contextmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ Blockly.ContextMenu.blockCommentOption = function(block) {
// If there's no comment, add an option to create a comment.
commentOption.text = Blockly.Msg.ADD_COMMENT;
commentOption.callback = function() {
block.setCommentText('');
block.setCommentText(Blockly.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT);
};
}
return commentOption;
Expand Down
4 changes: 3 additions & 1 deletion core/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ Blockly.Css.CONTENT = [
'box-shadow: 0px 0px 8px 1px ' + Blockly.Colours.dropDownShadow + ';',
'padding: 4px;',
'-webkit-user-select: none;',
'min-height: 26px',
'min-height: 15px',
'}',

'.blocklyDropDownContent {',
Expand Down Expand Up @@ -650,6 +650,7 @@ Blockly.Css.CONTENT = [

'.scratchCommentBody {',
'background-color: #fef49c;',
'border-radius: 4px;',
'}',

'.scratchCommentRect {',
Expand Down Expand Up @@ -818,6 +819,7 @@ Blockly.Css.CONTENT = [

'.blocklyContextMenu {',
'border-radius: 4px;',
'max-height: 100%;',
'}',

'.blocklyDropdownMenu {',
Expand Down
1 change: 1 addition & 0 deletions core/dropdowndiv.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Blockly.DropDownDiv.getContentDiv = function() {
*/
Blockly.DropDownDiv.clearContent = function() {
Blockly.DropDownDiv.content_.innerHTML = '';
Blockly.DropDownDiv.content_.style.width = '';
};

/**
Expand Down
Loading