diff --git a/src/pages/viewer/ModifyImage.svelte b/src/pages/viewer/ModifyImage.svelte index f80e1e554..3865136d1 100644 --- a/src/pages/viewer/ModifyImage.svelte +++ b/src/pages/viewer/ModifyImage.svelte @@ -1,9 +1,9 @@ - -{#if $modification.modifyHasSelection} +{#if modification.modifyHasSelection}

{$_("modifyPane.pagesSelected", { - values: { n: $modification.modifyNumSelected }, + values: { n: modification.modifyNumSelected }, })}

- {#if $modification.uncommittedChanges} + {#if modification.uncommittedChanges} - {#if $modification.modifyNumSelected < $modification.pageCount} + {#if modification.modifyNumSelected < modification.pageCount} @@ -47,30 +46,30 @@ - {#if $modification.modifyNumSelected < $modification.pageCount} + {#if modification.modifyNumSelected < modification.pageCount} {/if}
-{:else if $modification.hasCopyBuffer && $viewer.document != null} +{:else if modification.hasCopyBuffer && $viewer.document != null}

- {#if $modification.hasInsert} + {#if modification.hasInsert} {$_("modifyPane.insertPages", { - values: { n: $modification.copyBufferLength }, + values: { n: modification.copyBufferLength }, })} {:else} {$_("modifyPane.pagesPending", { - values: { n: $modification.copyBufferLength }, + values: { n: modification.copyBufferLength }, })} {/if}
- {#each $modification.copyBuffer + {#each modification.copyBuffer .slice(0, MAX_BUFFER_SIZE) .toDescriptors() as descriptor, i (JSON.stringify(descriptor.json()))} MAX_BUFFER_SIZE && + class:faded={modification.copyBufferLength > MAX_BUFFER_SIZE && i == MAX_BUFFER_SIZE - 1} > @@ -90,32 +89,32 @@

- {#if $modification.hasInsert} - {#if $modification.insert == 0} + {#if modification.hasInsert} + {#if modification.insert == 0} {$_("modifyPane.insertBegin", { - values: { n: $modification.copyBufferLength }, + values: { n: modification.copyBufferLength }, })} - {:else if $modification.insert == $modification.pageCount} + {:else if modification.insert == modification.pageCount} {$_("modifyPane.insertEnd", { - values: { n: $modification.copyBufferLength }, + values: { n: modification.copyBufferLength }, })} {:else} {$_("modifyPane.insertBetween", { values: { - n: $modification.copyBufferLength, - p0: $modification.insert, - p1: $modification.insert + 1, + n: modification.copyBufferLength, + p0: modification.insert, + p1: modification.insert + 1, }, })} {/if} {:else} {$_("modifyPange.click", { - values: { n: $modification.copyBufferLength }, + values: { n: modification.copyBufferLength }, })} {/if}

- {#if $modification.hasInsert} + {#if modification.hasInsert} @@ -128,7 +127,7 @@ {$_("dialog.cancel")}
-{:else if $modification.hasInsert} +{:else if modification.hasInsert}

{$_("modifyPane.insertPosition")}

{/if}