Method-Draw
Method-Draw copied to clipboard
setBackground not working
Hi
I try to set a background image with
svgCanvas.setBackground('', url) on the iFrame content;
But the image never appears. The same operation works fine with the original svg-editor.
The problem seems to be the white background that is added to the content as a default.
How can I get rid of this? Is there a way to configure the background? If I have to change the javascript files, how can I create the compiled version again?
Thanks for any help. I really like the method-draw editor, as it is much more usable on the iPad.
Regards
Daniel
Hi dstainhauser,
This post is a bit old, but maybe it will help someone else.
Method-Draw seems to create a separate layer for the background, therefore the "original background" is hidden. Changing line 1316 from
if (!document.getElementById('canvas_background')) createBackground();
to
if (!document.getElementById('canvas_background')) createBackground("none");
seems to work. Maybe you can even completely remove that background layer.
Hope that helps somehow ;)
@Merenon Thanks, the below change worked for me. It was on the line 1186 in the recent version
if (!document.getElementById('canvas_background')) createBackground("none");