Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-1099

Changing an SVGAnimateElement at runtime doesn't work

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: GVT
    • Labels:
      None

      Description

      Modifying an existing SVGAnimateElement at runtime leads to no visible change.

      See for example this SVG snippet:

      <g id="someId">
      <line ... />
      <line ... />
      <animate dur="0.2" from="0" to="1" repeatCount="indefinite"
      attributeName="stroke-opacity"
      calcMode="discrete"/>
      <animate dur="0.2" from="0" to="1" repeatCount="indefinite"
      attributeName="fill-opacity"
      calcMode="discrete"/>
      </g>

      Trying to change this at runtime with the following code:

      canvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(new Runnable() {
      public void run() {
      for (SVGElement elm : currentlySelectedElements) {
      elm.setAttributeNS(null, "stroke", "green");
      Set<SVGAnimateElement> animateElements= getAnimateElements(elm);
      for (SVGAnimateElement anim : animateElements)

      { anim.setAttributeNS(null, "dur", "1"); }

      }
      }
      });

      should result in a slower blinking frequency. However the blinking frequency stays the same. The stroke color is changed, however. So this seems to be a problem only with SVGAnimateElements.

      See http://stackoverflow.com/questions/27439359 for more details about the problem

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hupfdule Marco Herrn
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: