From 1240797816508bcc7c729b6f54bb997420445787 Mon Sep 17 00:00:00 2001 From: Christopher Allen Date: Fri, 3 Dec 2021 01:13:59 +0000 Subject: [PATCH] chore: clang-format blocks/variables_dynamic.js --- blocks/variables_dynamic.js | 72 +++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/blocks/variables_dynamic.js b/blocks/variables_dynamic.js index 612e1e67c53..26a91af1ebc 100644 --- a/blocks/variables_dynamic.js +++ b/blocks/variables_dynamic.js @@ -31,39 +31,40 @@ goog.require('Blockly.FieldVariable'); defineBlocksWithJsonArray([ // Block for variable getter. { - "type": "variables_get_dynamic", - "message0": "%1", - "args0": [{ - "type": "field_variable", - "name": "VAR", - "variable": "%{BKY_VARIABLES_DEFAULT_NAME}", + 'type': 'variables_get_dynamic', + 'message0': '%1', + 'args0': [{ + 'type': 'field_variable', + 'name': 'VAR', + 'variable': '%{BKY_VARIABLES_DEFAULT_NAME}', }], - "output": null, - "style": "variable_dynamic_blocks", - "helpUrl": "%{BKY_VARIABLES_GET_HELPURL}", - "tooltip": "%{BKY_VARIABLES_GET_TOOLTIP}", - "extensions": ["contextMenu_variableDynamicSetterGetter"], + 'output': null, + 'style': 'variable_dynamic_blocks', + 'helpUrl': '%{BKY_VARIABLES_GET_HELPURL}', + 'tooltip': '%{BKY_VARIABLES_GET_TOOLTIP}', + 'extensions': ['contextMenu_variableDynamicSetterGetter'], }, // Block for variable setter. { - "type": "variables_set_dynamic", - "message0": "%{BKY_VARIABLES_SET}", - "args0": [{ - "type": "field_variable", - "name": "VAR", - "variable": "%{BKY_VARIABLES_DEFAULT_NAME}", - }, - { - "type": "input_value", - "name": "VALUE", - }, + 'type': 'variables_set_dynamic', + 'message0': '%{BKY_VARIABLES_SET}', + 'args0': [ + { + 'type': 'field_variable', + 'name': 'VAR', + 'variable': '%{BKY_VARIABLES_DEFAULT_NAME}', + }, + { + 'type': 'input_value', + 'name': 'VALUE', + }, ], - "previousStatement": null, - "nextStatement": null, - "style": "variable_dynamic_blocks", - "tooltip": "%{BKY_VARIABLES_SET_TOOLTIP}", - "helpUrl": "%{BKY_VARIABLES_SET_HELPURL}", - "extensions": ["contextMenu_variableDynamicSetterGetter"], + 'previousStatement': null, + 'nextStatement': null, + 'style': 'variable_dynamic_blocks', + 'tooltip': '%{BKY_VARIABLES_SET_TOOLTIP}', + 'helpUrl': '%{BKY_VARIABLES_SET_HELPURL}', + 'extensions': ['contextMenu_variableDynamicSetterGetter'], }, ]); @@ -111,7 +112,7 @@ const CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN = { options.push(option); } else { if (this.type === 'variables_get_dynamic' || - this.type === 'variables_get_reporter_dynamic') { + this.type === 'variables_get_reporter_dynamic') { const renameOption = { text: Msg['RENAME_VARIABLE'], enabled: true, @@ -146,11 +147,11 @@ const CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN = { }; /** - * Factory for callbacks for rename variable dropdown menu option - * associated with a variable getter block. - * @param {!Block} block The block with the variable to rename. - * @return {!function()} A function that renames the variable. - */ + * Factory for callbacks for rename variable dropdown menu option + * associated with a variable getter block. + * @param {!Block} block The block with the variable to rename. + * @return {!function()} A function that renames the variable. + */ const renameOptionCallbackFactory = function(block) { return function() { const workspace = block.workspace; @@ -174,5 +175,6 @@ const deleteOptionCallbackFactory = function(block) { }; }; -Extensions.registerMixin('contextMenu_variableDynamicSetterGetter', +Extensions.registerMixin( + 'contextMenu_variableDynamicSetterGetter', CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN);