WebPanel: use inkscape pagecolor as background-color if set
This commit is contained in:
parent
e929b182af
commit
649ad4880c
1 changed files with 5 additions and 0 deletions
|
@ -71,6 +71,11 @@
|
||||||
var i = new FGFS.Instrument(data);
|
var i = new FGFS.Instrument(data);
|
||||||
reply.push(i);
|
reply.push(i);
|
||||||
$(this).append(i.svg);
|
$(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) {
|
error: function(xhr,status,msg) {
|
||||||
alert(status + " while reading '" + instrumentDefinitionFile + "': " + msg.toString() );
|
alert(status + " while reading '" + instrumentDefinitionFile + "': " + msg.toString() );
|
||||||
|
|
Loading…
Add table
Reference in a new issue