حقل توقيع Angular | ng-hub-ui-signature

حقل توقيع Angular متاح يحفظ إدخال الماوس واللمس والقلم كقيم SVG قابلة للتوسيع، مع التراجع والإعادة وتصدير PNG.

مرجع API

إليك العقد الكامل لـ signature: كل ما يمكنك ربطه والاستماع إليه وإسقاطه وتنسيقه، مجموعاً في مكان واحد. اربط ما تحتاجه ونسّق ما تريده — إنه standalone وملائم للـ Signals.

المدخلات

اضبط signature عبر 9 مدخلات. اربطها مثل أي @Input في Angular.

الاسمالنوعالافتراضيالوصف
labelstring''Visible field label.
formTextstring''Helper text shown below the drawing surface.
heightnumber160Logical canvas height in CSS pixels.
strokeColorstring'currentColor'Colour recorded in new SVG strokes.
strokeWidthnumber2Base width recorded in new SVG strokes.
readonlybooleanfalsePrevents drawing while preserving the signature.
controlsbooleantrueShows clear, undo and redo actions.
labelsPartial<HubSignatureLabels>{}Overrides the application-wide translated action labels for this field only.
ariaLabelstring'Signature'Accessible name for the drawing surface.

المخرجات

تفاعل مع ما يفعله signature — 1 أحداث لربط منطقك بها.

الاسمالنوعالوصف
valueChangeEventEmitter<string>Emits the SVG value after a user-originated change.

الطرائق

تحكّم في signature من الكود — 5 طرائق في واجهته البرمجية.

الاسمالتوقيعالقيمة المُرجَعةالوصف
clearclear(): voidRemoves every stroke and emits the empty value.
undoundo(): voidRemoves the most recently committed stroke.
redoredo(): voidRestores the most recently undone stroke.
toSvgtoSvg(): stringReturns the scalable SVG form value.
toDataUrltoDataUrl(type?: string): stringExports the rendered signature, PNG by default.

القوالب

لم يتم توثيق أي قوالب بعد.