From 89345f32b3dd2cf9f73fedbd03b9d371fbaf35ed Mon Sep 17 00:00:00 2001 From: Mridul97 Date: Tue, 8 Jan 2019 04:52:51 +0530 Subject: [PATCH] Add a 'Start a new sequence' button (#589) * add start a new sequence button * changes * reset sequence * changes * changes * changes * changes * changes --- examples/demo.css | 4 ++++ examples/demo.js | 7 +++++++ examples/index.html | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/examples/demo.css b/examples/demo.css index c5426221..95433957 100644 --- a/examples/demo.css +++ b/examples/demo.css @@ -223,6 +223,10 @@ h1 { transform: translate(-50%, -50%); } +#resetButton { + margin-top: 20px; +} + .no-border { border: 0px; } diff --git a/examples/demo.js b/examples/demo.js index 02c46fef..67889a04 100644 --- a/examples/demo.js +++ b/examples/demo.js @@ -65,8 +65,15 @@ window.onload = function() { sequencer.loadImage("images/tulips.png", ui.onLoad); } + var resetSequence = function(){ + var r=confirm("Do you want to reset the sequence?"); + if (r) + window.location = "/"; + } + $("#addStep select").on("change", ui.selectNewStepUi); $("#addStep #add-step-btn").on("click", ui.addStepUi); + $("#resetButton").on("click",resetSequence); //Module button radio selection $('.radio-group .radio').on("click", function() { diff --git a/examples/index.html b/examples/index.html index e01ce7a5..21c9bc4d 100644 --- a/examples/index.html +++ b/examples/index.html @@ -171,6 +171,7 @@
+
@@ -181,7 +182,6 @@ -