Minor bugfixes

This commit is contained in:
PMKuipers 2023-08-07 20:27:36 +02:00
parent 46218d2f2c
commit affd1720f8
3 changed files with 14 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1906,6 +1906,15 @@ export default {
slotkey(){
return `${this.type}'-'${this.line.id}-${this.slotindex}-${this.layer}`;
},
itemidx(){
for(const ix in this.value){
const itm = this.value[ix];
if(itm.layer == this.layer){
return ix;
}
}
return null;
},
item(){
for(const ix in this.value){
const itm = this.value[ix];
@ -2132,7 +2141,7 @@ export default {
:data="item"
:type="makeType(item)"
@cut="onCut"
><t-item v-model="item" :plan="plan" :page='page' :period='period' :maxspan='maxSpan()'></t-item
><t-item v-model="value[itemidx]" :plan="plan" :page='page' :period='period' :maxspan='maxSpan()'></t-item
></drag
><drop v-else
:class="'t-slot-drop '+type + (layer > 0?' secondary':' primary')"
@ -2165,12 +2174,12 @@ export default {
></template
></drop>
<t-item-timing-checker hidden
v-if="item && item.course"
v-if="value && value[itemidx] && value[itemidx].course"
ref="timingChecker"
:maxspan="maxSpan()"
:page="page"
:period="period"
v-model="item"
v-model="value[itemidx]"
></t-item-timing-checker>
</div>
`,