Skip to content

Commit c2d0c7c

Browse files
committed
### 4.6.16 (2020-05-24)
* (bluefox) Corrected sendTo and clear delay blocks.
1 parent 5a66963 commit c2d0c7c

20 files changed

+138
-107
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ And then call "npm run build".
3535
- ...
3636

3737
## Changelog
38+
### 4.6.16 (2020-05-24)
39+
* (bluefox) Corrected sendTo and clear delay blocks.
40+
3841
### 4.6.15 (2020-05-23)
3942
* (bluefox) BREAKING: Please check "stopTimeout" blocks in your blockly scripts that the correct timeout name is listed there and correct after the update!
4043

admin/asset-manifest.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
{
22
"files": {
33
"main.css": "/static/css/main.ec63fb86.chunk.css",
4-
"main.js": "/static/js/main.7008ad5b.chunk.js",
5-
"main.js.map": "/static/js/main.7008ad5b.chunk.js.map",
4+
"main.js": "/static/js/main.a6c842de.chunk.js",
5+
"main.js.map": "/static/js/main.a6c842de.chunk.js.map",
66
"runtime-main.js": "/static/js/runtime-main.a500de04.js",
77
"runtime-main.js.map": "/static/js/runtime-main.a500de04.js.map",
88
"static/css/2.93e5c0a0.chunk.css": "/static/css/2.93e5c0a0.chunk.css",
99
"static/js/2.38f4fe4b.chunk.js": "/static/js/2.38f4fe4b.chunk.js",
1010
"static/js/2.38f4fe4b.chunk.js.map": "/static/js/2.38f4fe4b.chunk.js.map",
1111
"index.html": "/index.html",
12-
"precache-manifest.9bfcdeb4898d89bc3bd42a8803aa725f.js": "/precache-manifest.9bfcdeb4898d89bc3bd42a8803aa725f.js",
12+
"precache-manifest.12ba0739091b4716147ef939572df0df.js": "/precache-manifest.12ba0739091b4716147ef939572df0df.js",
1313
"service-worker.js": "/service-worker.js",
1414
"static/css/2.93e5c0a0.chunk.css.map": "/static/css/2.93e5c0a0.chunk.css.map",
1515
"static/css/main.ec63fb86.chunk.css.map": "/static/css/main.ec63fb86.chunk.css.map",
1616
"static/js/2.38f4fe4b.chunk.js.LICENSE.txt": "/static/js/2.38f4fe4b.chunk.js.LICENSE.txt",
17-
"static/js/main.7008ad5b.chunk.js.LICENSE.txt": "/static/js/main.7008ad5b.chunk.js.LICENSE.txt",
17+
"static/js/main.a6c842de.chunk.js.LICENSE.txt": "/static/js/main.a6c842de.chunk.js.LICENSE.txt",
1818
"static/media/copy-content.svg": "/static/media/copy-content.6fe0b363.svg"
1919
},
2020
"entrypoints": [
2121
"static/js/runtime-main.a500de04.js",
2222
"static/css/2.93e5c0a0.chunk.css",
2323
"static/js/2.38f4fe4b.chunk.js",
2424
"static/css/main.ec63fb86.chunk.css",
25-
"static/js/main.7008ad5b.chunk.js"
25+
"static/js/main.a6c842de.chunk.js"
2626
]
2727
}

admin/google-blockly/own/blocks_action.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ Blockly.Blocks['request'] = {
162162
},
163163
mutationToDom: function() {
164164
var container = document.createElement('mutation');
165-
container.setAttribute('with_statement', this.getFieldValue('WITH_STATEMENT') === 'TRUE');
165+
var withStatement = this.getFieldValue('WITH_STATEMENT') ;
166+
container.setAttribute('with_statement', withStatement === true || withStatement === 'true' || withStatement === 'TRUE');
166167
return container;
167168
},
168169
domToMutation: function(xmlElement) {

admin/google-blockly/own/blocks_sendto.js

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,23 @@ Blockly.Blocks['sendto_custom'] = {
9898

9999
this.setColour(Blockly.Sendto.HUE);
100100

101+
this.appendDummyInput('LOG')
102+
.appendField(Blockly.Translate('sendto_log'))
103+
.appendField(new Blockly.FieldDropdown([
104+
[Blockly.Translate('sendto_log_none'), ''],
105+
[Blockly.Translate('sendto_log_info'), 'log'],
106+
[Blockly.Translate('sendto_log_debug'), 'debug'],
107+
[Blockly.Translate('sendto_log_warn'), 'warn'],
108+
[Blockly.Translate('sendto_log_error'), 'error']
109+
]), 'LOG');
110+
111+
this.appendDummyInput('WITH_STATEMENT')
112+
.appendField(Blockly.Translate('request_statement'))
113+
.appendField(new Blockly.FieldCheckbox('FALSE', function (option) {
114+
var withStatement = option === true || option === 'true' || option === 'TRUE';
115+
this.sourceBlock_.updateShape_(this.sourceBlock_.getArgNames_(), withStatement);
116+
}), 'WITH_STATEMENT');
117+
101118
this.itemCount_ = 1;
102119
this.updateShape_();
103120
this.setInputsInline(false);
@@ -106,7 +123,7 @@ Blockly.Blocks['sendto_custom'] = {
106123
this.setMutator(new Blockly.Mutator(['sendto_custom_item']));
107124
this.setTooltip(Blockly.Translate('sendto_custom_tooltip'));
108125
this.setHelpUrl(getHelp('sendto_custom_help'));
109-
},
126+
},
110127
/**
111128
* Create XML to represent number of text inputs.
112129
* @return {!Element} XML storage element.
@@ -121,7 +138,8 @@ Blockly.Blocks['sendto_custom'] = {
121138
}
122139

123140
container.setAttribute('items', names.join(','));
124-
container.setAttribute('with_statement', this.getFieldValue('WITH_STATEMENT') === 'TRUE');
141+
var withStatement = this.getFieldValue('WITH_STATEMENT');
142+
container.setAttribute('with_statement', withStatement === 'TRUE' || withStatement === 'true' || withStatement === true);
125143
return container;
126144
},
127145
/**
@@ -132,7 +150,8 @@ Blockly.Blocks['sendto_custom'] = {
132150
domToMutation: function (xmlElement) {
133151
var names = xmlElement.getAttribute('items').split(',');
134152
this.itemCount_ = names.length;
135-
this.updateShape_(names, xmlElement.getAttribute('with_statement') == 'true');
153+
var withStatement = xmlElement.getAttribute('with_statement');
154+
this.updateShape_(names, withStatement === true || withStatement === 'true' || withStatement === 'TRUE');
136155
},
137156
/**
138157
* Populate the mutator's dialog with this block's components.
@@ -214,19 +233,26 @@ Blockly.Blocks['sendto_custom'] = {
214233
* @this Blockly.Block
215234
*/
216235
updateShape_: function (names, withStatement) {
217-
if (this.getInput('LOG'))
218-
this.removeInput('LOG');
219-
if (this.getInput('WITH_STATEMENT'))
220-
this.removeInput('WITH_STATEMENT');
221236
names = names || [];
222237
var _input;
223238
var wp = this.workspace;
239+
if (withStatement === undefined) {
240+
withStatement = this.getFieldValue('WITH_STATEMENT');
241+
withStatement = withStatement === true || withStatement === 'true' || withStatement === 'TRUE';
242+
}
243+
244+
this.getInput('STATEMENT') && this.removeInput('STATEMENT');
245+
224246
// Add new inputs.
225-
for (var i = 0; i < this.itemCount_; i++) {
247+
var i;
248+
for (i = 0; i < this.itemCount_; i++) {
226249
_input = this.getInput('ARG' + i);
250+
227251
if (!_input) {
228252
_input = this.appendValueInput('ARG' + i);
229-
if (!names[i]) names[i] = Blockly.Translate('sendto_custom_argument') + (i + 1);
253+
if (!names[i]) {
254+
names[i] = Blockly.Translate('sendto_custom_argument') + (i + 1);
255+
}
230256
_input.appendField(new Blockly.FieldTextInput(names[i]));
231257
setTimeout(function (_input) {
232258
if (!_input.connection.isConnected()) {
@@ -253,6 +279,7 @@ Blockly.Blocks['sendto_custom'] = {
253279
}, 100, _input, names[i]);
254280
}
255281
}
282+
256283
// Remove deleted inputs.
257284
var blocks = [];
258285
while (_input = this.getInput('ARG' + i)) {
@@ -263,6 +290,7 @@ Blockly.Blocks['sendto_custom'] = {
263290
this.removeInput('ARG' + i);
264291
i++;
265292
}
293+
266294
if (blocks.length) {
267295
var ws = this.workspace;
268296
setTimeout(function () {
@@ -272,32 +300,9 @@ Blockly.Blocks['sendto_custom'] = {
272300
}, 100);
273301
}
274302

275-
this.appendDummyInput('WITH_STATEMENT')
276-
.appendField(Blockly.Translate('request_statement'))
277-
.appendField(new Blockly.FieldCheckbox(withStatement ? 'TRUE': 'FALSE', function (option) {
278-
var withStatement = (option == true);
279-
this.sourceBlock_.updateShape_(this.sourceBlock_.getArgNames_(), withStatement);
280-
}), 'WITH_STATEMENT');
281-
282-
this.appendDummyInput('LOG')
283-
.appendField(Blockly.Translate('sendto_log'))
284-
.appendField(new Blockly.FieldDropdown([
285-
[Blockly.Translate('sendto_log_none'), ''],
286-
[Blockly.Translate('sendto_log_info'), 'log'],
287-
[Blockly.Translate('sendto_log_debug'), 'debug'],
288-
[Blockly.Translate('sendto_log_warn'), 'warn'],
289-
[Blockly.Translate('sendto_log_error'), 'error']
290-
]), 'LOG');
291-
292303
// Add or remove a statement Input.
293-
var inputExists = this.getInput('STATEMENT');
294-
295304
if (withStatement) {
296-
if (!inputExists) {
297-
this.appendStatementInput('STATEMENT');
298-
}
299-
} else if (inputExists) {
300-
this.removeInput('STATEMENT');
305+
this.appendStatementInput('STATEMENT');
301306
}
302307
}
303308
};
@@ -315,7 +320,7 @@ Blockly.JavaScript['sendto_custom'] = function (block) {
315320
logText = '';
316321
}
317322
var statement;
318-
if (withStatement === 'TRUE') {
323+
if (withStatement === true || withStatement === 'true' || withStatement === 'TRUE') {
319324
statement = Blockly.JavaScript.statementToCode(block, 'STATEMENT');
320325
}
321326

admin/google-blockly/own/blocks_system.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Blockly.JavaScript['control'] = function(block) {
171171
Blockly.Msg.VARIABLES_DEFAULT_NAME = 'value';
172172

173173
var valueDelay = parseInt(block.getFieldValue('DELAY_MS'), 10);
174-
var unit = block.getFieldValue('UNIT');
174+
var unit = block.getFieldValue('UNIT');
175175
if (unit === 'min') {
176176
valueDelay *= 60000;
177177
} else if (unit === 'sec') {
@@ -182,7 +182,7 @@ Blockly.JavaScript['control'] = function(block) {
182182
var objectName = main.objects[valueObjectID] && main.objects[valueObjectID].common && main.objects[valueObjectID].common.name ? main.objects[valueObjectID].common.name : '';
183183
var code;
184184

185-
clearRunning = clearRunning === 'true' || clearRunning === true || clearRunning === 'TRUE';
185+
clearRunning = clearRunning === 'TRUE' || clearRunning === 'true' || clearRunning === true;
186186
var withDelay = this.getFieldValue('WITH_DELAY');
187187

188188
if (withDelay === 'true' || withDelay === true || withDelay === 'TRUE') {
@@ -428,7 +428,7 @@ Blockly.JavaScript['update'] = function(block) {
428428
value_delay *= 1000;
429429
}
430430

431-
clearRunning = clearRunning === true || clearRunning === 'true' || clearRunning === 'TRUE';
431+
clearRunning = clearRunning === 'TRUE' || clearRunning === 'true' || clearRunning === true;
432432

433433
var objectname = main.objects[value_objectid] && main.objects[value_objectid].common && main.objects[value_objectid].common.name ? main.objects[value_objectid].common.name : '';
434434
var code;

admin/google-blockly/own/blocks_trigger.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,13 @@ Blockly.Blocks['on_ext'] = {
165165
* @this Blockly.Block
166166
*/
167167
updateShape_: function() {
168-
if (this.getInput('CONDITION'))
168+
if (this.getInput('CONDITION')) {
169169
this.removeInput('CONDITION');
170-
if (this.getInput('ACK_CONDITION'))
170+
}
171+
if (this.getInput('ACK_CONDITION')) {
171172
this.removeInput('ACK_CONDITION');
173+
}
174+
172175
var input;
173176

174177
for (var j = 0; input = this.inputList[j]; j++) {
@@ -238,8 +241,7 @@ Blockly.Blocks['on_ext'] = {
238241

239242
if (input) {
240243
this.inputList.push(input);
241-
}
242-
else {
244+
} else {
243245
this.appendStatementInput('STATEMENT')
244246
.setCheck(null)
245247
}

admin/precache-manifest.9bfcdeb4898d89bc3bd42a8803aa725f.js renamed to admin/precache-manifest.12ba0739091b4716147ef939572df0df.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
self.__precacheManifest = (self.__precacheManifest || []).concat([
22
{
3-
"revision": "87b2cdcc210e0492f83185ddb7eea68b",
3+
"revision": "9d2efe11d9628783218874313c3eaae3",
44
"url": "/index.html"
55
},
66
{
77
"revision": "8d569d128bda24afefd5",
88
"url": "/static/css/2.93e5c0a0.chunk.css"
99
},
1010
{
11-
"revision": "c38d645dad01a34e0f48",
11+
"revision": "715dad8a4f29bc25b4ac",
1212
"url": "/static/css/main.ec63fb86.chunk.css"
1313
},
1414
{
@@ -20,12 +20,12 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
2020
"url": "/static/js/2.38f4fe4b.chunk.js.LICENSE.txt"
2121
},
2222
{
23-
"revision": "c38d645dad01a34e0f48",
24-
"url": "/static/js/main.7008ad5b.chunk.js"
23+
"revision": "715dad8a4f29bc25b4ac",
24+
"url": "/static/js/main.a6c842de.chunk.js"
2525
},
2626
{
2727
"revision": "578fa69920ac4a551e6d340a37256bed",
28-
"url": "/static/js/main.7008ad5b.chunk.js.LICENSE.txt"
28+
"url": "/static/js/main.a6c842de.chunk.js.LICENSE.txt"
2929
},
3030
{
3131
"revision": "b29e1786341933b579da",

admin/service-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
1515

1616
importScripts(
17-
"/precache-manifest.9bfcdeb4898d89bc3bd42a8803aa725f.js"
17+
"/precache-manifest.12ba0739091b4716147ef939572df0df.js"
1818
);
1919

2020
self.addEventListener('message', (event) => {

admin/static/js/main.7008ad5b.chunk.js renamed to admin/static/js/main.a6c842de.chunk.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)