Closed osharper closed 7 years ago
Did you minify the latest simplifyjs and update into CompressorSVG or did you just add those module/window change to the respective minified code?
the second one. If I make the first thing, it would run in the same error obviously, simplify-js still contains code for modular env cases, so I have to edit simplify-js, minify it and then embed to jSignature code again. But it's very simple to recognize what one should change in minified code in this case, so I just edited it
I've reminified the minified files through the proper process in https://github.com/brinley/jSignature/tree/osharper-master. Can you sanity check and we can merge?
yep, I think everything is perfect. thanks for a quick feedback. Why don't you merge npm-ified fork by a @technical-team as well? https://github.com/brinley/jSignature/compare/master...technical-team:master
@osharper Will you beable to help review and test if I pulled that npm-ified fork?
jSignature uses simplify lib to process signature input and make svg, however it is implemented by directly including minified version in their code.
It works fine in there world where there no npm and modular systems, but guys who made simplify live in a bit more modern world and have this code for compliancy with modular systems https://github.com/mourner/simplify-js/blob/master/simplify.js#L116
So, when we use jSignature in within some module system, it stores
simplify
function inmodule
object rather than inwindow
, but jSignature expects it to be inwindow
https://github.com/brinley/jSignature/blob/master/src/plugins/jSignature.CompressorSVG.js#L330