Loading ...
Sorry, an error occurred while loading the content.

Re: Can I put animation elements in 'defs' element?

Expand Messages
  • Kevin Lindsey
    Antoine and Niklas, ... Sorry guys, but I have to differ with this interpretation for a few reasons. Here s the full description for the value attribute from
    Message 1 of 20 , Oct 10, 2002
    View Source
    • 0 Attachment
      Antoine and Niklas,

      >> But, the following text in the spec for SVGLength.value made me change my
      mind:
      >> "DOMException NO_MODIFICATION_ALLOWED_ERR: Raised on an attempt to
      >> change the value of a readonly attribute."
      >
      > Right! I think you proved your case there. You're the DOM interface
      > reading master! DOM interfaces specifications are like credit card
      > contracts, you should always read the fine prints.

      Sorry guys, but I have to differ with this interpretation for a few reasons.
      Here's the full description for the value attribute from the SVG 1.0 spec:

      float value
      The value as an floating point value, in user units. Setting this
      attribute will
      cause valueInSpecifiedUnits and valueAsString to be updated
      automatically to
      reflect this setting.
      Exceptions on setting
      DOMException NO_MODIFICATION_ALLOWED_ERR: Raised on an
      attempt to change the value of a readonly attribute.

      Firstly, there is text describing specifically what happens *when you set
      this attribute*. Secondly, I compare this to the currentTranslate attribute
      of the SVGSVGElement interface. The IDL shows that currentTranslate is
      readonly; however, as Michel pointed out a while back, the attributes of
      currentTranslate, which is an SVGPoint, are not readonly. And indeed, if
      you change the x or y attributes of currentTranslate, it does pan the SVG
      document.

      Take it easy,
      Kevin
      KevLinDev - http://www.kevlindev.com
    • Niklas Gustavsson
      ... reasons. That s allright. I m just guessing here:-) ... Yes, because there might be cases where the SVGLength attribute is read-write. ... Yes, this indeed
      Message 2 of 20 , Oct 10, 2002
      View Source
      • 0 Attachment
        > Sorry guys, but I have to differ with this interpretation for a few
        reasons.

        That's allright. I'm just guessing here:-)

        > Firstly, there is text describing specifically what happens *when you set
        > this attribute*.

        Yes, because there might be cases where the SVGLength attribute is
        read-write.

        > Secondly, I compare this to the currentTranslate attribute
        > of the SVGSVGElement interface. The IDL shows that currentTranslate is
        > readonly; however, as Michel pointed out a while back, the attributes of
        > currentTranslate, which is an SVGPoint, are not readonly. And indeed, if
        > you change the x or y attributes of currentTranslate, it does pan the SVG
        > document.

        Yes, this indeed troubeling for my argument :-) I do note that there is a
        difference between these two cases: currentTranslate is not directly
        represented by an attribute on the SVG element. But I agree, if I were to be
        correct, this should not be allowed. So it's either an error in my argument
        or in the implementation :-)

        If it's allowed to set the baseVal directly, it would be interesting to know
        how the regular DOM should be updated. For example, if I do:
        circle.cx.baseVal.value = 1/3;

        what should:
        circle.getAttributeNS(null, "cx")
        return?

        It would be nice if someone (Dean, Jon, Chris?) who knows this better then
        we do could set us straight on this issue.

        /niklas
      Your message has been successfully submitted and would be delivered to recipients shortly.