Details
-
Bug
-
Status: Open
-
Resolution: Unresolved
-
1.8
-
None
-
None
-
Operating System: Linux
Platform: PC
Description
Dynamic modification of gradients doesn't work in Batik:
<?xml version="1.0" encoding="iso-8859-1"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
viewBox="-1 -1 4 4" onload="Init()">
<script type="text/ecmascript"><![CDATA["use strict";
var SVG= "http://www.w3.org/2000/svg";
function Init()
]]></script>
<linearGradient id="grad"/>
<rect id="rect" width="2" height="2" fill="url(#grad)"/>
</svg>
This should display a black square. In Batik, this works only after removing and re-setting the fill attribute:
document.getElementById( "rect" ).removeAttribute( "fill" );
document.getElementById( "rect" ).setAttribute( "fill", "url(#grad)" );