lathonez / angular2-signaturepad-demo Goto Github PK
View Code? Open in Web Editor NEWDemo for angular2-signaturepad generated with ng-cli
Demo for angular2-signaturepad generated with ng-cli
Hi,
I have existing ionic2 project, and tried to add angular2-signaturepad.
I installed it via npm. I edited config file like below.
commonjs({
include: [
'node_modules/rxjs/**',
'node_modules/angular2-signaturepad/**'
],
namedExports: {
'node_modules/angular2-signaturepad/signature-pad.js': ['SignaturePadModule']
}
}
How ever, when I import it from app.module.ts even without doing anything, I get
signature_pad.js:13Uncaught TypeError: Cannot set property 'SignaturePad' of undefined
Error, and it's pointing
root['SignaturePad'] = factory();
line. If it's relevant I use
"@ionic/app-scripts": "^0.0.36",
"typescript": "^2.0.3"
I appreciate for any help.
Thank you.
It's a great job for all ng2 lover. Thanks!
Could it be possible to give couple of lines demo codes about save signature and reload signature?
It shows black for me when I do this:
`
public save() {
this.tmpURL = this.signature;
}
public load() {
this.signaturePad.clear();
// Unbinds all event handlers
this.signaturePad.off();
// Rebinds all event handlers
this.signaturePad.on();
console.log('data:' + this.tmpURL);
this.signature = this.signaturePad.fromDataURL(this.tmpURL);
}
`
Hi I wanted to know how can we center the image on the canvas we drew using this method :
signaturePad.fromDataURL(base64_image_data);
Hello - i am trying to implement your demo and i get this error upon running. i've tried using this demo as well as the simpler version on the main git hub page and get the same error.
SignatureFieldComponent class SignatureFieldComponent - inline template:0:0 caused by: sp is not a constructor
Error: Error in ./SignatureFieldComponent class SignatureFieldComponent - inline template:0:0 caused by: sp is not a constructor
Find the length of signature in canvas(angular2-signaturepad) ?
<signature-pad [options]="signaturePadOptions"
(onEndEvent)="drawComplete()">
</signature-pad>//html code
drawComplete() {
signaturePad.toData()[0].length //get length
}//js code
I saw on your demo that it's possible to sign over an image, but the saved image contains the signature only. Is there a way to save both as a single image file?
Hi,
Is there any solution for multiple signature under this pad?
How to change following code for multiple signature? I tried many possibility with no luck.
@ViewChild(SignaturePad) signaturePad: SignaturePad;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.