brinley / jSignature

jQuery plugin for adding web signature functionality
http://www.unbolt.net/jSignature
696 stars 529 forks source link

Size problem #144

Open lorife opened 6 years ago

lorife commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

you write as this:

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

jjswin commented 6 years ago

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