diff --git a/fortuneRoundtable.sublime-workspace b/fortuneRoundtable.sublime-workspace index 22decf5..29298fe 100644 --- a/fortuneRoundtable.sublime-workspace +++ b/fortuneRoundtable.sublime-workspace @@ -3,6 +3,14 @@ { "selected_items": [ + [ + "gro", + "groupB" + ], + [ + "grou", + "groupB" + ], [ "baseRo", "baseRotateB" @@ -27,10 +35,37 @@ "file": "src/index.html", "settings": { - "buffer_size": 4208, + "buffer_size": 4370, "encoding": "UTF-8", "line_ending": "Windows" } + }, + { + "file": "src/style/style.scss", + "settings": + { + "buffer_size": 3655, + "encoding": "UTF-8", + "line_ending": "Windows" + } + }, + { + "file": "src/script/script.js", + "settings": + { + "buffer_size": 8362, + "encoding": "UTF-8", + "line_ending": "Windows" + } + }, + { + "file": "test/testimport.json", + "settings": + { + "buffer_size": 199, + "encoding": "UTF-8", + "line_ending": "Unix" + } } ], "build_system": "", @@ -119,7 +154,7 @@ "groups": [ { - "selected": 0, + "selected": 2, "sheets": [ { @@ -128,15 +163,15 @@ "semi_transient": false, "settings": { - "buffer_size": 4208, + "buffer_size": 4370, "regions": { }, "selection": [ [ - 0, - 0 + 2358, + 2358 ] ], "settings": @@ -146,11 +181,100 @@ "translate_tabs_to_spaces": true }, "translation.x": 0.0, - "translation.y": 0.0, + "translation.y": 108.0, + "zoom_level": 1.0 + }, + "stack_index": 3, + "type": "text" + }, + { + "buffer": 1, + "file": "src/style/style.scss", + "semi_transient": false, + "settings": + { + "buffer_size": 3655, + "regions": + { + }, + "selection": + [ + [ + 2273, + 2273 + ] + ], + "settings": + { + "syntax": "Packages/CSS/CSS.sublime-syntax", + "tab_size": 4, + "translate_tabs_to_spaces": true + }, + "translation.x": 0.0, + "translation.y": 1404.0, + "zoom_level": 1.0 + }, + "stack_index": 1, + "type": "text" + }, + { + "buffer": 2, + "file": "src/script/script.js", + "semi_transient": false, + "settings": + { + "buffer_size": 8362, + "regions": + { + }, + "selection": + [ + [ + 7284, + 7284 + ] + ], + "settings": + { + "syntax": "Packages/JavaScript/JavaScript.sublime-syntax", + "tab_size": 4, + "translate_tabs_to_spaces": true, + "word_wrap": true + }, + "translation.x": 0.0, + "translation.y": 3762.0, "zoom_level": 1.0 }, "stack_index": 0, "type": "text" + }, + { + "buffer": 3, + "file": "test/testimport.json", + "semi_transient": false, + "settings": + { + "buffer_size": 199, + "regions": + { + }, + "selection": + [ + [ + 191, + 191 + ] + ], + "settings": + { + "syntax": "Packages/JavaScript/JSON.sublime-syntax" + }, + "translation.x": 0.0, + "translation.y": 0.0, + "zoom_level": 1.0 + }, + "stack_index": 2, + "type": "text" } ] } diff --git a/src/script/script.js b/src/script/script.js index f795a8d..0e72694 100644 --- a/src/script/script.js +++ b/src/script/script.js @@ -127,7 +127,6 @@ function remGroupA(el, id){ $(el).parent().slideUp(() => $(el).parent().remove()); } function remGroupB(el, id){ - console.log(id); dataStore.groupB=dataStore.groupB.filter((el) => el!==id); saveDataStore(); $(el).parent().slideUp(() => $(el).parent().remove()); @@ -238,9 +237,11 @@ function reroll(){ setupRoll(); } else{ - dataStore.assignments.push({"a": dataStore.groupA[0], "b": dataStore.groupB[0]}); - dataStore.groupA=[]; - dataStore.groupB=[]; + if(dataStore.groupA.length){ + dataStore.assignments.push({"a": dataStore.groupA[0], "b": dataStore.groupB[0]}); + dataStore.groupA=[]; + dataStore.groupB=[]; + } saveDataStore(); showResults(); }