Closed nuno closed 9 years ago
hi Nuno,
I didn't found icon property for labels nor buttons UI elements. May be you meant image property for button element, right ?
Unfortunately, svgView as the name says is a basic View not an image. As Button element need a string path or a blob you could simply do this like this :
Button id="buttonSvg" title="my beauty button :)" top="10" width="200" height="50" />
and in your controller file :
var imageButton = svgView.createView({ image: "android.svg", width: '50', height: '50', top: 0, left: 0, backgroundColor:'pink' }); var blob = imageButton.toImage().media; $.buttonSvg.setImage(blob);
i've just tried it, and it works. Don't know if it efficient enough but that a quick workaround. Did i answered your question ?
@GeraudBourdin My bad, yes that answer my question, I will do some tests.
Thank you very much for you quick answer :)
I've just made a readme.md for a quick doc. And i added this answer to it. Hope this will help :) You're welcome, i am glad if this module can be used !
Hello @GeraudBourdin , I have a question: this can work for labels "icon" property? Or buttons "icons" etc?
if possible a example will'b great. :)
Thanks for this module.