File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1656,6 +1656,7 @@ Blockly.JavaScript['max7219_animate'] = function (block) {
16561656 var varData = Blockly . JavaScript . variableDB_ . getDistinctName (
16571657 'varData' , Blockly . Variables . NAME_TYPE ) ;
16581658 var code = 'var ' + varData + ' = ' + value_list_ + ';\n' +
1659+ variable_name_ + '.animateStop();\n' +
16591660 variable_name_ + '.animate(' + varData + ',' + value_times_ + ');\n' ;
16601661 return code ;
16611662} ;
@@ -1696,7 +1697,8 @@ Blockly.JavaScript['max7219_animate_horse'] = function (block) {
16961697 '}'
16971698 ] ) ;
16981699 //var code = 'console.log('+functionName+'('+dropdown_state_+','+value_code_ +'));\n';
1699- var code = variable_name_ + '.animate(' + functionName + '(' + dropdown_state_ + ',' + value_code_ + '),' + value_times_ + ');\n' ;
1700+ var code = variable_name_ + '.animateStop();\n' +
1701+ variable_name_ + '.animate(' + functionName + '(' + dropdown_state_ + ',' + value_code_ + '),' + value_times_ + ');\n' ;
17001702 return code ;
17011703
17021704} ;
@@ -1711,7 +1713,8 @@ Blockly.JavaScript['max7219_stop'] = function (block) {
17111713
17121714Blockly . JavaScript [ 'max7219_off' ] = function ( block ) {
17131715 var variable_name_ = Blockly . JavaScript . variableDB_ . getName ( block . getFieldValue ( 'name_' ) , Blockly . Variables . NAME_TYPE ) ;
1714- var code = variable_name_ + '.off();\n' ;
1716+ var code = variable_name_ + '.animateStop();\n' +
1717+ variable_name_ + '.off();\n' ;
17151718 return code ;
17161719} ;
17171720
You can’t perform that action at this time.
0 commit comments