Closed ramontayag closed 11 years ago
Isn't the svg from the url completely overwritten when I do setSvgString() in the javascript?
I'm not sure what the priority is, but I'd guess setSvgString()
would overwrite whatever has been set in url
.
That's my problem with this though. Since this gem is designed to be used in forms, I pretty much always do setSvgString(). I guess I'll do some tests to see if the url would ever work.
Do you just put the js in the page yourself? Or is there an option with this gem where you get set the svg string?
The gem will always do setSvgString() although sometimes the string is empty. Maybe we can make the url option work in that case. Pretty much what will happen is that if you use f.sketchily field_name
, then the gem will do setSvgString("<%= f_object.field_name %>");
as the page loads
Can specify URL as a parameter: