1.0.0 • Published 1 year ago

ng-signature v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

NgSignature

This library was generated with Angular CLI version 15.1.0.

Installation:

npm i ng-signature

Usage (Blob/Image) Component.html:

<ng-signature (done)="saveImage($event)"></ng-signature>

Component.ts:

saveImage(blob: Blob) {
    // Do something with the blob.
}

app.module.ts:

import { NgSignatureModule } from "ng-signature";

@NgModule({
  declarations: [],
  imports: [NgSignatureModule],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}

Options:

DirectivesDescriptionOptionsDefault
[editable]Turn pad on or offtrue, falsetrue
[emitOnDragEnd]Emit the (done) method as soon as drag end.true, falsefalse
[penColor]Color of signature penColorblack
[backgroundColor]Background of signature padColortransparent
(done)Fired on clicking Done buttonfunction($event: Blob/base64/json)null
(clear)Fired on clicking Clear buttonfunction()null
[(points)]JSON points modeljsonnull
[format]Output format foe (done) method. json output is same as points model.blob, base64, jsonblob
[width]Width of canvasnumber600
[height]Height of canvasnumber150
[responsive]Resize to 100% parent. But the points will still output widthxheight ratiotrue, falsetrue
[showDoneButton]Show or Hide Done Buttontrue, falsetrue
[showClearButton]Show or Hide Clear Buttontrue, falsetrue
[doneButtonText]Text of Done ButtonstringDone
[clearButtonText]Text of Clear ButtonstringClear
[doneButtonClass]Class classes of Done Buttonstringbtn btn-primary
[clearButtonClass]Class classes of Clear Buttonstringbtn btn-default
1.0.0

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago