File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
apps/robotbuilder/blocks/local Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ Blockly.Blocks['declare_relay'] = {
1616 this . setPreviousStatement ( true , 'declare' ) ;
1717 this . setNextStatement ( true , 'declare' ) ;
1818 } ,
19+ onchange : EasyJ . Checker . EnsureNotTop_Init ,
1920 renameVar : function ( oldName , newName ) {
2021 if ( Blockly . Names . equals ( oldName , this . getFieldValue ( 'NAME' ) ) ) {
2122 this . setFieldValue ( newName , 'NAME' ) ;
Original file line number Diff line number Diff line change @@ -13,6 +13,15 @@ Blockly.Blocks['delay'] = {
1313 this . setInputsInline ( true ) ;
1414 this . setPreviousStatement ( true , 'statement' ) ;
1515 this . setNextStatement ( true , 'statement' ) ;
16+ } ,
17+ onchange : function ( evt ) {
18+ if ( ! this . workspace || this . isInFlyout ) {
19+ // Block has been deleted, or is in flyout
20+ return ;
21+ }
22+ var block = this ;
23+ this . setWarningText ( EasyJ . Checker . PickWarning ( block , [ EasyJ . Checker . EnsureNotOrphaned ] ) ) ;
24+
1625 }
1726} ;
1827Blockly . Java [ 'delay' ] = function ( block ) {
You can’t perform that action at this time.
0 commit comments