Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Size problem #144

Open
lorife opened this issue Nov 9, 2017 · 4 comments
Open

Size problem #144

lorife opened this issue Nov 9, 2017 · 4 comments

Comments

@lorife
Copy link

lorife commented Nov 9, 2017

Hello,

I would like the signature to fit in a 100px height, but it looks like i'm unable to do it.

  1. It looks like jsignature resize to a higher height.
  2. if the screen cannot fit the signature it will truncate it.

could anybody help me?

Here is a jsfiddle:
https://jsfiddle.net/lorife/3mz2ho2o/

@matt-benett
Copy link

I am having the same problem.. I can resize width, but not height.

Were you able to work it out?

    <div id="signature"></div>

		<script>
		                $("#signature").jSignature()
				sig = 'data:' + 'image/jsignature;base30,dKZ591yjj0Y51C2we1Hjfs590Z4o1x1W9jaY3J2B3u1y9aZa1C1x3E3A3No1Dno40Y1Q2B2K4y4Hj1x550_7N00Zjoot9590050Ye59f9a9000Zj4M1C9000Y1x1x1y2Tt5Zf1xt1Ga1xo0Y9j50a005';
				 $("#signature").css({height:'100px'});
				 $("#signature").css({width:'200px'});
				 $("#signature").css({border: '2px dotted #000'});

				$("#signature").jSignature("disable") ;
				$("#signature").jSignature("setData", sig) ;

		</script>

@lorife
Copy link
Author

lorife commented Nov 15, 2017

Hello,

No I was not able to solve it. It's not working.
I decided not to use jSignature and I changed to another component.

@TNTrocket
Copy link

you write as this:

var $sigdiv = signature.jSignature({
'width': 100+‘px‘,
'height': 100+’px‘
});

@jjswin
Copy link

jjswin commented Jan 3, 2018

Same issues. Using it with bootstrap + mySQL. It's difficult to understand the width height attributes: there are some specified in the inline style css, and there's also a width and height included in the canvas html element. Thought I'd finally cracked it by forcing the width/height to change as part of ajax success, then looked at it on my iPhone...it shows a quarter of the signature!

It'd be good if some guidance could be given with regard to sizing.

screen shot 2018-01-03 at 23 17 28
screen shot 2018-01-03 at 23 16 22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants