File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -491,6 +491,7 @@ function web_editor(config) {
491
491
if ( blockly . is ( ':visible' ) ) {
492
492
dirty = false ;
493
493
blockly . hide ( ) ;
494
+ $ ( '#editor' ) . attr ( 'title' , '' ) ;
494
495
editor . ACE . setReadOnly ( false ) ;
495
496
$ ( "#command-snippet" ) . off ( 'click' ) ;
496
497
$ ( "#command-snippet" ) . click ( function ( ) {
@@ -503,6 +504,7 @@ function web_editor(config) {
503
504
}
504
505
}
505
506
editor . ACE . setReadOnly ( true ) ;
507
+ $ ( '#editor' ) . attr ( 'title' , 'The code editor is read-only when blocks are active.' ) ;
506
508
$ ( "#command-snippet" ) . off ( 'click' ) ;
507
509
$ ( "#command-snippet" ) . click ( function ( ) {
508
510
alert ( config . translate . alerts . snippets ) ;
@@ -530,6 +532,8 @@ function web_editor(config) {
530
532
}
531
533
workspace . addChangeListener ( myUpdateFunction ) ;
532
534
}
535
+ // Set editor to current state of blocks.
536
+ EDITOR . setCode ( Blockly . Python . workspaceToCode ( workspace ) ) ;
533
537
} ;
534
538
}
535
539
You can’t perform that action at this time.
0 commit comments