File tree 1 file changed +12
-0
lines changed 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import SimState = pxt.editor.SimState;
35
35
import { DuplicateOnDragConnectionChecker } from "../../pxtblocks/plugins/duplicateOnDrag" ;
36
36
import { PathObject } from "../../pxtblocks/plugins/renderer/pathObject" ;
37
37
import { Measurements } from "./constants" ;
38
+ import { flow } from "../../pxtblocks" ;
38
39
39
40
interface CopyDataEntry {
40
41
version : 1 ;
@@ -561,6 +562,17 @@ export class Editor extends toolboxeditor.ToolboxEditor {
561
562
this . editor . getSvgGroup ( ) . addEventListener ( "blur" , ( ) => {
562
563
delete focusRingDiv . dataset . focused ;
563
564
} )
565
+
566
+ const cleanUpWorkspace = Blockly . ShortcutRegistry . registry . getRegistry ( ) [ "clean_up_workspace" ] ;
567
+ Blockly . ShortcutRegistry . registry . unregister ( cleanUpWorkspace . name ) ;
568
+ Blockly . ShortcutRegistry . registry . register ( {
569
+ ...cleanUpWorkspace ,
570
+ keyCodes : [ Blockly . ShortcutRegistry . registry . createSerializedKey ( cleanUpWorkspace . keyCodes [ 0 ] as number , null ) ] ,
571
+ callback : ( workspace ) => {
572
+ flow ( workspace , { useViewWidth : true } ) ;
573
+ return true
574
+ }
575
+ } ) ;
564
576
}
565
577
}
566
578
You can’t perform that action at this time.
0 commit comments