Fixed scene edit duration input not properly synchronizing with edit deltas.

This commit is contained in:
DebaucheryLibrarian 2024-10-06 23:54:54 +02:00
parent bd2a1e4514
commit 50b2fa02ca
1 changed files with 6 additions and 10 deletions

View File

@ -129,31 +129,31 @@
<input
type="number"
class="input"
:value="item.value[0]"
:value="edits[item.key]?.[0] ?? item.value[0]"
min="0"
max="100"
:disabled="!editing.has(item.key)"
@input="setDuration('h', $event)"
@change="setDuration('h', $event)"
>H
<input
type="number"
class="input"
:value="item.value[1]"
:value="edits[item.key]?.[1] ?? item.value[1]"
min="0"
max="59"
:disabled="!editing.has(item.key)"
@input="setDuration('m', $event)"
@change="setDuration('m', $event)"
>M
<input
type="number"
class="input"
:value="item.value[2]"
:value="edits[item.key]?.[2] ?? item.value[2]"
min="0"
max="59"
:disabled="!editing.has(item.key)"
@input="setDuration('s', $event)"
@change="setDuration('s', $event)"
>S
</div>
</div>
@ -214,8 +214,6 @@ const pageContext = inject('pageContext');
const user = pageContext.user;
const scene = ref(pageContext.pageProps.scene);
// console.log(scene);
const fields = computed(() => [
{
key: 'actors',
@ -298,8 +296,6 @@ function toggleField(item) {
function setValue(item, event) {
edits.value[item.key] = event.target.value;
console.log(edits.value);
}
const timeUnits = ['h', 'm', 's'];