resolving errors of my signature and initials.

pull/150/merge^2
iozeey 2 years ago
parent b20aa059a4
commit 1a6fefa976

@ -140,14 +140,14 @@
:id="field.uuid" :id="field.uuid"
:src="mySignatureUrl.url" :src="mySignatureUrl.url"
class="d-flex justify-center w-full h-full" class="d-flex justify-center w-full h-full"
style="z-index: 50;" style="z-index: 50; border-width: 2px; --tw-bg-opacity: 1; --tw-border-opacity: 0.2; background-color: transparent;"
@click="handleMySignatureClick" @click="handleMySignatureClick"
> >
<img <img
v-else v-else
:id="field.uuid" :id="field.uuid"
class="d-flex justify-center w-full h-full" class="d-flex justify-center w-full h-full"
style="z-index: 50;" style="z-index: 50; border-width: 2px; --tw-bg-opacity: 1; --tw-border-opacity: 0.2; background-color: transparent;"
@click="handleMySignatureClick" @click="handleMySignatureClick"
> >
</div> </div>
@ -162,14 +162,14 @@
:id="field.uuid" :id="field.uuid"
:src="myInitialsUrl.url" :src="myInitialsUrl.url"
class="d-flex justify-center w-full h-full" class="d-flex justify-center w-full h-full"
style="z-index: 50;" style="z-index: 50; border-width: 2px; --tw-bg-opacity: 1; --tw-border-opacity: 0.2; background-color: transparent;"
@click="handleMyInitialClick" @click="handleMyInitialClick"
> >
<img <img
v-else v-else
:id="field.uuid" :id="field.uuid"
class="d-flex justify-center w-full h-full" class="d-flex justify-center w-full h-full"
style="z-index: 50;" style="z-index: 50; border-width: 2px; --tw-bg-opacity: 1; --tw-border-opacity: 0.2; background-color: transparent;"
@click="handleMyInitialClick" @click="handleMyInitialClick"
> >
</div> </div>
@ -216,6 +216,9 @@
</div> </div>
<div <div
v-if="showMySignature" v-if="showMySignature"
@pointerdown.stop
@mousedown.stop="startDrag"
@touchstart="startTouchDrag"
> >
<MySignature <MySignature
:key="field.uuid" :key="field.uuid"
@ -233,6 +236,9 @@
</div> </div>
<div <div
v-if="showMyInitials" v-if="showMyInitials"
@pointerdown.stop
@mousedown.stop="startDrag"
@touchstart="startTouchDrag"
> >
<MyInitials <MyInitials
:key="field.uuid" :key="field.uuid"
@ -244,7 +250,7 @@
:template="template" :template="template"
:attachments-index="attachmentsIndex" :attachments-index="attachmentsIndex"
@attached="handleMyInitialsAttachment" @attached="handleMyInitialsAttachment"
@hide="showMySignature = false" @hide="showMyInitials = false"
@start="$refs.areas.scrollIntoField(field)" @start="$refs.areas.scrollIntoField(field)"
/> />
</div> </div>
@ -509,10 +515,12 @@ export default {
handleMyInitialsAttachment (attachment) { handleMyInitialsAttachment (attachment) {
this.templateAttachments.push(attachment) this.templateAttachments.push(attachment)
this.makeMyInitials(attachment.uuid) this.makeMyInitials(attachment.uuid)
this.save()
}, },
handleMySignatureAttachment (attachment) { handleMySignatureAttachment (attachment) {
this.templateAttachments.push(attachment) this.templateAttachments.push(attachment)
this.makeMySignature(attachment.uuid) this.makeMySignature(attachment.uuid)
this.save()
}, },
onNameFocus (e) { onNameFocus (e) {
this.selectedAreaRef.value = this.area this.selectedAreaRef.value = this.area

@ -3,6 +3,9 @@
class="absolute" class="absolute"
style="z-index: 50;" style="z-index: 50;"
:style="{ ...mySignatureStyle }" :style="{ ...mySignatureStyle }"
>
<div
style="min-height: 250px; min-width: 250px;"
> >
<div class="flex justify-between items-center w-full mb-2"> <div class="flex justify-between items-center w-full mb-2">
<label <label
@ -40,7 +43,8 @@
<a <a
v-if="modelValue || computedPreviousValue" v-if="modelValue || computedPreviousValue"
href="#" href="#"
class="btn font-medium btn-outline btn-sm" class="tooltip btn font-medium btn-outline btn-sm"
:data-tip="'redraw'"
@click.prevent="remove" @click.prevent="remove"
> >
<IconReload :width="16" /> <IconReload :width="16" />
@ -48,7 +52,8 @@
<a <a
v-else v-else
href="#" href="#"
class="btn font-medium btn-outline btn-sm" class="tooltip btn font-medium btn-outline btn-sm"
:data-tip="'clear'"
@click.prevent="clear" @click.prevent="clear"
> >
<IconReload :width="16" /> <IconReload :width="16" />
@ -70,12 +75,12 @@
<img <img
v-if="modelValue || computedPreviousValue" v-if="modelValue || computedPreviousValue"
:src="attachmentsIndex[modelValue || computedPreviousValue].url" :src="attachmentsIndex[modelValue || computedPreviousValue].url"
class="mx-auto bg-white border border-base-300 rounded max-h-72" class="mx-auto bg-white border border-base-300 rounded max-h-72 w-full"
> >
<canvas <canvas
v-show="!modelValue && !computedPreviousValue" v-show="!modelValue && !computedPreviousValue"
ref="canvas" ref="canvas"
class="bg-white border border-base-300 rounded-2xl" class="bg-white border border-base-300 rounded-2xl max-h-72 w-full"
/> />
<input <input
v-if="!isDrawInitials && !modelValue && !computedPreviousValue" v-if="!isDrawInitials && !modelValue && !computedPreviousValue"
@ -95,6 +100,7 @@
<span> Submit </span> <span> Submit </span>
</button> </button>
</div> </div>
</div>
</template> </template>
<script> <script>

@ -56,16 +56,17 @@
<a <a
v-if="modelValue || computedPreviousValue" v-if="modelValue || computedPreviousValue"
href="#" href="#"
class="btn btn-outline btn-sm font-medium" class="tooltip btn btn-outline btn-sm font-medium"
:data-tip="'redraw'"
@click.prevent="remove" @click.prevent="remove"
> >
<IconReload :width="16" /> <IconReload :width="16" />
{{ t('redraw') }}
</a> </a>
<a <a
v-else v-else
href="#" href="#"
class="btn btn-outline btn-sm font-medium" class="tooltip btn btn-outline btn-sm font-medium"
:data-tip="'clear'"
@click.prevent="clear" @click.prevent="clear"
> >
<IconReload :width="16" /> <IconReload :width="16" />
@ -86,13 +87,13 @@
<img <img
v-if="modelValue || computedPreviousValue" v-if="modelValue || computedPreviousValue"
:src="attachmentsIndex[modelValue || computedPreviousValue].url" :src="attachmentsIndex[modelValue || computedPreviousValue].url"
class="mx-auto bg-white border border-base-300 rounded max-h-72" class="mx-auto bg-white border border-base-300 rounded max-h-72 w-full"
> >
<canvas <canvas
v-show="!modelValue && !computedPreviousValue" v-show="!modelValue && !computedPreviousValue"
ref="canvas" ref="canvas"
style="padding: 1px; 0" style="padding: 1px; 0"
class="bg-white border border-base-300 rounded-2xl" class="bg-white border border-base-300 rounded-2xl w-full"
/> />
<input <input
v-if="isTextSignature" v-if="isTextSignature"

Loading…
Cancel
Save