Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ <h2><i class="fa fa-unlock-alt"></i> <strong>{{ title }}</strong></h2>
</div>
<div class="roundlabel">Blockly</div>
</a>
<a href="#" class="roundbutton" id="command-sim"
<a href="#" class="roundbutton hidden" id="command-sim"
tabindex="12">
<div class="roundsymbol">
<i class="fa fa-arrow-circle-right"></i>
Expand Down Expand Up @@ -363,7 +363,9 @@ <h2><i class="fa fa-unlock-alt"></i> <strong>{{ title }}</strong></h2>
'flags': {
'blocks': true,
'snippets': true,
'share': true
'share': true,
'experimental': false,
'sim': true
},
});
</script>
Expand Down
7 changes: 7 additions & 0 deletions python-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ function web_editor(config) {
if(config.flags.share) {
$("#command-share").removeClass('hidden');
}
if(config.flags.sim) {
$("#command-sim").removeClass('hidden');
}
};

// This function is called to initialise the editor. It sets things up so
Expand Down Expand Up @@ -337,6 +340,10 @@ function web_editor(config) {
EDITOR.setCode(config.translate.code.start);
}
EDITOR.ACE.gotoLine(EDITOR.ACE.session.getLength());
// If configured as experimental update editor background to indicate it
if(config.flags.experimental) {
EDITOR.ACE.renderer.scroller.style.backgroundImage = "url('static/img/experimental.png')"
}
// Configure the zoom related buttons.
$("#zoom-in").click(function (e) {
e.stopPropagation();
Expand Down