Merge pull request #53 from tmickel/feature/playground-stack-highlighting

Add stack highlighting to playground blocks.
This commit is contained in:
Tim Mickel 2016-06-01 15:37:34 -04:00
commit 988dd344bd

View file

@ -10,7 +10,7 @@ window.onload = function() {
});
window.workspace = workspace;
// @todo: Also bind to flyout events, block running feedback.
// @todo: Also bind to flyout events.
// Block events.
workspace.addChangeListener(vm.blockListener);
@ -21,6 +21,14 @@ window.onload = function() {
window.hljs.highlightBlock(explorer);
});
// Feedback for stacks running.
vm.runtime.on('STACK_GLOW_ON', function(blockId) {
workspace.glowStack(blockId, true);
});
vm.runtime.on('STACK_GLOW_OFF', function(blockId) {
workspace.glowStack(blockId, false);
});
// Run threads
vm.runtime.start();
};