File tree Expand file tree Collapse file tree 5 files changed +752
-0
lines changed Expand file tree Collapse file tree 5 files changed +752
-0
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,8 @@ <h2><i class="fa fa-unlock-alt"></i> <strong>{{ title }}</strong></h2>
259
259
<script src="microbit_blocks/generators/python.js"></script>
260
260
<script src="blockly/msg/js/en.js"></script>
261
261
<script src="microbit_blocks/messages/en/messages.js"></script>
262
+ <script src="static/js/ResizeSensor.js"></script>
263
+ <script src="static/js/ElementQueries.js"></script>
262
264
<script src="python-main.js"
263
265
type="application/javascript"></script>
264
266
<script>vex.defaultOptions.className = 'vex-theme-wireframe';</script>
Original file line number Diff line number Diff line change @@ -532,6 +532,11 @@ function web_editor(config) {
532
532
var code = Blockly . Python . workspaceToCode ( workspace ) ;
533
533
EDITOR . setCode ( code ) ;
534
534
}
535
+ // Resize blockly
536
+ var element = document . getElementById ( 'blockly' ) ;
537
+ new ResizeSensor ( element , function ( ) {
538
+ Blockly . svgResize ( workspace ) ;
539
+ } ) ;
535
540
workspace . addChangeListener ( myUpdateFunction ) ;
536
541
}
537
542
// Set editor to current state of blocks.
Original file line number Diff line number Diff line change 11
11
# blockly {
12
12
display : none;
13
13
min-width : 570px ;
14
+ overflow : auto;
15
+ resize : horizontal;
14
16
}
15
17
16
18
/* Re-usable, generic rules */
You can’t perform that action at this time.
0 commit comments