Skip to content

Commit b50899b

Browse files
authored
Merge pull request #18 from BPenhey/master
Feature flag added for simulator
2 parents 57c2541 + 0edb8ed commit b50899b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

editor.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ <h2><i class="fa fa-unlock-alt"></i> <strong>{{ title }}</strong></h2>
190190
</div>
191191
<div class="roundlabel">Blockly</div>
192192
</a>
193-
<a href="#" class="roundbutton" id="command-sim"
193+
<a href="#" class="roundbutton hidden" id="command-sim"
194194
tabindex="12">
195195
<div class="roundsymbol">
196196
<i class="fa fa-arrow-circle-right"></i>
@@ -363,7 +363,9 @@ <h2><i class="fa fa-unlock-alt"></i> <strong>{{ title }}</strong></h2>
363363
'flags': {
364364
'blocks': true,
365365
'snippets': true,
366-
'share': true
366+
'share': true,
367+
'experimental': false,
368+
'sim': true
367369
},
368370
});
369371
</script>

python-main.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ function web_editor(config) {
300300
if(config.flags.share) {
301301
$("#command-share").removeClass('hidden');
302302
}
303+
if(config.flags.sim) {
304+
$("#command-sim").removeClass('hidden');
305+
}
303306
};
304307

305308
// This function is called to initialise the editor. It sets things up so
@@ -337,6 +340,10 @@ function web_editor(config) {
337340
EDITOR.setCode(config.translate.code.start);
338341
}
339342
EDITOR.ACE.gotoLine(EDITOR.ACE.session.getLength());
343+
// If configured as experimental update editor background to indicate it
344+
if(config.flags.experimental) {
345+
EDITOR.ACE.renderer.scroller.style.backgroundImage = "url(https://github.com/'static/img/experimental.png')"
346+
}
340347
// Configure the zoom related buttons.
341348
$("#zoom-in").click(function (e) {
342349
e.stopPropagation();

0 commit comments

Comments
 (0)