Fixed the patch

This commit is contained in:
Fándly Gergő 2018-10-02 12:53:26 +03:00
parent 412230e17b
commit fff3175b61
2 changed files with 135 additions and 10 deletions

View File

@ -3,6 +3,14 @@
{ {
"selected_items": "selected_items":
[ [
[
"gro",
"groupB"
],
[
"grou",
"groupB"
],
[ [
"baseRo", "baseRo",
"baseRotateB" "baseRotateB"
@ -27,10 +35,37 @@
"file": "src/index.html", "file": "src/index.html",
"settings": "settings":
{ {
"buffer_size": 4208, "buffer_size": 4370,
"encoding": "UTF-8", "encoding": "UTF-8",
"line_ending": "Windows" "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": "", "build_system": "",
@ -119,7 +154,7 @@
"groups": "groups":
[ [
{ {
"selected": 0, "selected": 2,
"sheets": "sheets":
[ [
{ {
@ -128,15 +163,15 @@
"semi_transient": false, "semi_transient": false,
"settings": "settings":
{ {
"buffer_size": 4208, "buffer_size": 4370,
"regions": "regions":
{ {
}, },
"selection": "selection":
[ [
[ [
0, 2358,
0 2358
] ]
], ],
"settings": "settings":
@ -146,11 +181,100 @@
"translate_tabs_to_spaces": true "translate_tabs_to_spaces": true
}, },
"translation.x": 0.0, "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 "zoom_level": 1.0
}, },
"stack_index": 0, "stack_index": 0,
"type": "text" "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"
} }
] ]
} }

View File

@ -127,7 +127,6 @@ function remGroupA(el, id){
$(el).parent().slideUp(() => $(el).parent().remove()); $(el).parent().slideUp(() => $(el).parent().remove());
} }
function remGroupB(el, id){ function remGroupB(el, id){
console.log(id);
dataStore.groupB=dataStore.groupB.filter((el) => el!==id); dataStore.groupB=dataStore.groupB.filter((el) => el!==id);
saveDataStore(); saveDataStore();
$(el).parent().slideUp(() => $(el).parent().remove()); $(el).parent().slideUp(() => $(el).parent().remove());
@ -238,9 +237,11 @@ function reroll(){
setupRoll(); setupRoll();
} }
else{ else{
if(dataStore.groupA.length){
dataStore.assignments.push({"a": dataStore.groupA[0], "b": dataStore.groupB[0]}); dataStore.assignments.push({"a": dataStore.groupA[0], "b": dataStore.groupB[0]});
dataStore.groupA=[]; dataStore.groupA=[];
dataStore.groupB=[]; dataStore.groupB=[];
}
saveDataStore(); saveDataStore();
showResults(); showResults();
} }