https://issues.apache.org/bugzilla/show_bug.cgi?id=50809
Summary: Element not updated when referenced gradient has
changed
Product: Batik
Version: 1.8
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Scripting
AssignedTo: [email protected]
ReportedBy: [email protected]
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() {
var elt= document.createElementNS( SVG, "stop" );
elt.setAttribute( "offset", "0" );
document.getElementById( "grad" ).appendChild( elt );
}
]]></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)" );
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]