diff --git a/webgui/lib/jquery.fganimate.js b/webgui/lib/jquery.fganimate.js index 78c2d65f7..6b7e54f10 100644 --- a/webgui/lib/jquery.fganimate.js +++ b/webgui/lib/jquery.fganimate.js @@ -71,6 +71,11 @@ var i = new FGFS.Instrument(data); reply.push(i); $(this).append(i.svg); + // set inkscape pagecolor as div background-color + // somewhat awkward get the namespaced sodipodi:namedview element + var pagecolor = $(i.svg.getElementsByTagNameNS('http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd', 'namedview')).attr("pagecolor"); + if( pagecolor != null ) + $(this).css("background-color", pagecolor ); }, error: function(xhr,status,msg) { alert(status + " while reading '" + instrumentDefinitionFile + "': " + msg.toString() );