brinley / jSignature

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

Issue with dyamic resizing on hidden container: height is wrong. #151

Closed ryangriggs closed 5 years ago

ryangriggs commented 6 years ago

If jSignature is applied to a hidden container (i.e. a modal dialog, etc), the jSignature initialization routine does not take into account the final height of the container, thus rendering the signature box as small height as possible.

However, if you make the hidden container visible first, then apply $("#signature").jSignature(), the height of the signature box matches the container.

brinley commented 6 years ago

Have you tried having a container with fixed height within the modal container that is toggled? Otherwise you might need to initialise jSignature after the modal is made visible

ryangriggs commented 6 years ago

Yes, that is the workaround I had to do in order for things to fit properly in the vertical dimension. I was just hoping there was an alternative that would allow me to apply the jSignature before the dialog box became visible.


Ryan Griggs Hilltop Computing www.hilltop.net 859-328-3223 Toll Free: 1 (888) 5-HILLTOP (888-544-5586)

On Tue, May 1, 2018 at 7:00 PM, Brinley Ang notifications@github.com wrote:

Have you tried having a container with fixed height within the modal container that is toggled? Otherwise you might need to initialise jSignature after the modal is made visible

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/brinley/jSignature/issues/151#issuecomment-385815207, or mute the thread https://github.com/notifications/unsubscribe-auth/AFlVGckNViiKp_KggX0ihXfM6G2q6BGdks5tuOj8gaJpZM4TubeW .

brinley commented 6 years ago

Apart from the two alternatives that I mentioned before,

1) initialise when modal is visible 2) set fixed height on the signature container 3) initialise modal whenever but call jSignature resize when modal is visible