Default to empty field

This commit is contained in:
shamoon committed 2026-10-19 23:07:12 -07:00
1 parent a4fb9bf2b0
commit 4d31063082
3 files changed
+4 -5

No files matched your search

@@ -83,6 +83,8 @@
(createNew)="createField($event)"
title="Field"
i18n-title
placeholder="Choose a field"
i18n-placeholder
hint="Where the extracted value is written."
i18n-hint
></pngx-input-select>
@@ -203,6 +203,7 @@ describe('OcrTemplateEditorComponent', () => {
y: 100,
width: 900,
height: 150,
custom_field: null,
})
expect(component.selectedZoneIndex).toBe(0)
})
@@ -616,7 +616,7 @@ export class OcrTemplateEditorComponent implements OnInit, OnDestroy {
return {
name: `Zone ${this.template.zones.length + 1}`,
target: DEFAULT_OCR_ZONE_TARGET,
custom_field: this.defaultCustomFieldId(),
custom_field: null,
x: rect.x,
y: rect.y,
width: rect.w,
@@ -632,10 +632,6 @@ export class OcrTemplateEditorComponent implements OnInit, OnDestroy {
}
}
private defaultCustomFieldId(): number | null {
return this.customFields[0]?.id ?? null
}
onOverlayPointerCancel(event: PointerEvent) {
if (this.overlayInteraction.kind === 'idle') return
if (this.overlayInteraction.pointerId !== event.pointerId) return