-
Notifications
You must be signed in to change notification settings - Fork 528
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
Jsignature doesn't load properly #152
Comments
$(document).ready(function () { #signatureparent {
|
Try adding a css height for fixed height or min-height for something responsive on #signature |
Hey, Thanks for the reply. I tried doing the same and to no use. It's still the same.do you have any other pointers? |
Same issue. Browser: latest chrome |
@ipeevski are you able to inspect the element to see if theres any css causing it to be squished? |
No CSS, but I think I figured out what was doing it. It happens if it's instantiated while it's hidden. When it comes into view, I have to call .resize() on it and it fixes itself. Perhaps not much that can be done about it :( |
On resize is a work around. I believe that you should beable to force the signature's containiner to a certain fixed width/height or perhaps a if you need something semi responsive, see if you can set a min-width/height |
Fixed height shows the container bigger, but the side effects of offset and distorted paint are still there until resize |
How are you implementing this? I recall a similar issue being report years ago when jSignature was being used jQuery mobile. It turns out that the signature was being initialised just before the page was pushed into visible view and this caused the canvas dimensions to be incorrect. The solution for that was to initialise jQuery after the view was visible and not onload or on dom ready short of calling resize. |
Well, as I said before, I think it is a similar issue - the signature div is in a display: none part when first initialised, and shown after that. When it is being shown, I call resize and it fixes itself. |
Can you share the code for resize , since am facing same issue in jsignature |
Hi,
I tried using the library and it doesn't load properly in the beginning and when I resize my window, it seems to resize and work properly.
Here is the snippet of my code
INITIALLY its smaller and cant draw:
FINAL after window resize it works:
The text was updated successfully, but these errors were encountered: