im working on a PDF-Viewer and successfully integrated jSignature into it. Thanks for this plugin by the way, its awesome!
I noticed that done signatures are rerendered when resizing the window. Im looking for exactly this function(or lines of code) to call when I zoom in and out of my PDF, so the thickness of the signatures gets rerendered.
I found this function: conditionallyLinkCanvasResizeToWindowResize(jSignatureInstance, settingsWidth, apinamespace, globalEvents) but its very complicated for me. I studied it for some hours but it has so many variables and functions.
Maybe you can give me a hint how i can easily rerender a given field?
It would save me sooo many hours... :)
Edit 1:
I found this trick:
window.dispatchEvent(new Event('resize'));
But besides of the timeout i dont like, it is only risizing 1 field per zoom. Even when i call it per each field. It looks very weird, because when i have 2 fields, 1 field is resized, and one 1 is not:
Edit 2:
Also when i try foreach field
$(this).resize();
It is also resizing only ONE field per zoom. Even when its called for each field.
Edit 3:
I ended up commentig the lines so it is no more rerendering at all
$(window).bind('resize.'+apinamespace, function()
Hey,
im working on a PDF-Viewer and successfully integrated jSignature into it. Thanks for this plugin by the way, its awesome!
I noticed that done signatures are rerendered when resizing the window. Im looking for exactly this function(or lines of code) to call when I zoom in and out of my PDF, so the thickness of the signatures gets rerendered.
I found this function:
conditionallyLinkCanvasResizeToWindowResize(jSignatureInstance, settingsWidth, apinamespace, globalEvents)
but its very complicated for me. I studied it for some hours but it has so many variables and functions.Maybe you can give me a hint how i can easily rerender a given field? It would save me sooo many hours... :)
Edit 1:
I found this trick:
window.dispatchEvent(new Event('resize'));
But besides of the timeout i dont like, it is only risizing 1 field per zoom. Even when i call it per each field. It looks very weird, because when i have 2 fields, 1 field is resized, and one 1 is not:
Edit 2:
Also when i try foreach field
It is also resizing only ONE field per zoom. Even when its called for each field.
Edit 3: I ended up commentig the lines so it is no more rerendering at all
$(window).bind('resize.'+apinamespace, function()
Greetings