From bbc66a95a7b52b8bbda1a4cf9356ed35a5d3dc57 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Wed, 1 Jun 2016 14:17:18 -0400 Subject: [PATCH] Add green flag and stop button to playground --- playground/index.html | 5 ++++- playground/playground.css | 2 +- playground/playground.js | 8 ++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/playground/index.html b/playground/index.html index cbb7c2ac..87cef30b 100644 --- a/playground/index.html +++ b/playground/index.html @@ -9,8 +9,11 @@
+

Scratch VM Playground

+ +
-

VM Block Representation

+

VM Block Representation


         
diff --git a/playground/playground.css b/playground/playground.css index f1a54242..b20b2bd9 100644 --- a/playground/playground.css +++ b/playground/playground.css @@ -20,7 +20,7 @@ body { #blockexplorer { position: absolute; width: 100%; - height: 80%; + height: 75%; overflow: scroll; border: 1px solid #fff; background: rgb(36,36,36); diff --git a/playground/playground.js b/playground/playground.js index 1b8b9952..623e5c38 100644 --- a/playground/playground.js +++ b/playground/playground.js @@ -23,4 +23,12 @@ window.onload = function() { // Run threads vm.runtime.start(); + + // Handlers for green flag and stop all. + document.getElementById('greenflag').addEventListener('click', function() { + vm.runtime.greenFlag(); + }); + document.getElementById('stopall').addEventListener('click', function() { + vm.runtime.stopAll(); + }); };