brinley / jSignature

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

How to use it better in mobile devices? #143

Open LaoliangGitHub opened 7 years ago

LaoliangGitHub commented 7 years ago

I use your plug-in in mobile devices, but how can I implement the adaptation? I added my own judgement, but the result of the horizontal screen loading was different from the result of the vertical screen loading. Excuse me, how can I solve this problem?

if (window.orientation === 180 || window.orientation === 0) {
$sigdiv.jSignature({width:"100%",height:"100%"}); $sigdiv.jSignature("destroy"); } if (window.orientation === 90 || window.orientation === -90 ){
$sigdiv.jSignature({width:"100%",height:"65%"}); $sigdiv.jSignature("destroy");
}