fix stage loader code not regenerating when moving a level

This commit is contained in:
Matteias Collet 2020-06-28 18:27:49 +02:00
parent ffe323d478
commit fe0d19a863

View file

@ -35,7 +35,12 @@
<div class="config">
<span>Route:</span>
<ul class="level-select">
<draggable v-model="selectedRoute" handle=".route-drag" ghost-class="ghost">
<draggable
v-model="selectedRoute"
handle=".route-drag"
ghost-class="ghost"
@end="onDrageEnd"
>
<li v-for="(level, index) in selectedRoute">
<div class="route-drag">&#8801;</div>
@ -45,9 +50,7 @@
:onChange="e => onStageLoaderLevelChanged(index, e)"
:key="index"
/>
<button @click="onLevelDeleted(index)" type="button" class="route-remove">
&#215;
</button>
<button @click="onLevelDeleted(index)" type="button" class="route-remove">&#215;</button>
</li>
</draggable>
</ul>
@ -191,6 +194,9 @@ export default {
if (ending) this.postGameSelection;
this.updateCode();
},
onDrageEnd() {
this.updateCode();
},
onClearList() {
if (this.selectedRoute?.length > 0 && !confirm('Do you really want to clear the list?'))
return;