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

RE: [svg-developers] Re: Correct behavior of "visibility" tag

Expand Messages
  • trevor.tracey-patte@ga.gov.au
    Ruben If the visibility property was inheritable, the group property would set its children s properties no matter what they were individually set to. Think
    Message 1 of 6 , Mar 9, 2004
      Ruben

      If the "visibility" property was inheritable, the group property would set
      its children's properties no matter what they were individually set to.

      Think of how this works as acting as the scope of the "visibility" property.
      If there is nothing implicitly set in the child, look up the chain to find a
      value which has been set (in this case the group setting) - just like the
      scope of variables in programming.

      So from your example, if the rectangle has no visibility property set, the
      viewer looks up the chain for an enclosing tag (ie the group tag) to find a
      "visibility" setting which has been set. If you set the group to "visible",
      its children get to be visible unless you explicitly set them to hidden. If
      you set the group to "hidden", the children will be hidden unless you
      explicitly set them to "visible".

      This varies from the "display" property which is inheritable and the
      enclosing tag sets the inner properties no matter what they are set to.

      Well at least this is how I understand it to work.


      Trevor

      -----Original Message-----
      From: abillpay [mailto:abillpay@...]
      Sent: Wednesday, 10 March 2004 9:09
      To: svg-developers@yahoogroups.com
      Subject: [svg-developers] Re: Correct behavior of "visibility" tag


      Thank you very much for your response. According to your
      interpretation of the spec, in the second example, the rectangle will

      not be visible because the group was marked as invisible and the
      children didn't specify the visibility property.

      But from SVG specification "Note that 'visibility' is not an
      inheritable property." what I interpret is that visibility property
      does not go down the inheritance chain. That means in the second
      example child(rectangle) should not inherit visibility property from
      it's parent.

      From spec
      [
      Setting 'visibility' to hidden on a 'g' will make its children
      invisible as long as the children do not specify their
      own 'visibility' properties as visible. Note that 'visibility' is not

      an inheritable property.
      ]

      That note section is contradicting your explation. Am missing
      something?

      Thanks for examplanation.

      ruben



      --- In svg-developers@yahoogroups.com, "Mathias FATENE"
      <mathias.fatene@w...> wrote:
      > Hi,
      > I think that you're confused with the explanation. The exact text
      of specs
      > is :
      > [
      > When applied to a container element, setting 'display' to none
      causes the
      > container and all of its children to be invisible; thus, it acts on

      groups
      > of elements as a group.
      > 'visibility', however, only applies to individual graphics
      elements.
      > Setting 'visibility' to hidden on a 'g' will make its children
      invisible
      > as long as the children do not specify their own 'visibility'
      properties as
      > visible.
      > Note that 'visibility' is not an inheritable property.
      > ]
      >
      > So, for your first example, the rectangle is visible because its
      > visibilility property is set to 'visible'.
      > In the second example, the group is not visible, and the rectangle
      has no
      > visibility property (will make its children invisible
      > as long as the children do not specify their own 'visibility'
      properties as
      > visible). That's it. visibility act slike display.
      >
      > Mathias




      -----
      To unsubscribe send a message to:
      svg-developers-unsubscribe@yahoogroups.com
      -or-
      visit http://groups.yahoo.com/group/svg-developers and click "edit my
      membership"
      ----



      Yahoo! Groups Sponsor
      ADVERTISEMENT

      Click HereClick Here
      <http://rd.yahoo.com/SIG=12clog13q/M=274551.4550177.5761904.1261774/D=egroupw
      eb/S=1706030389:HM/EXP=1078956585/A=2019528/R=2/SIG=141q5ec8u/*http://ad.doub
      leclick.net/jump/N3349.yahoo1/B1282054.27;abr=!ie4;abr=!ie5;sz=300x250;code=1
      8634;dcopt=rcl;ord=1078870185645242?>

      <http://us.adserver.yahoo.com/l?M=274551.4550177.5761904.1261774/D=egroupweb/
      S=:HM/A=2019528/rand=161531460>


      _____

      Yahoo! Groups Links


      * To visit your group on the web, go to:
      http://groups.yahoo.com/group/svg-developers/

      * To unsubscribe from this group, send an email to:
      svg-developers-unsubscribe@yahoogroups.com
      <mailto:svg-developers-unsubscribe@yahoogroups.com?subject=Unsubscribe>

      * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      Service <http://docs.yahoo.com/info/terms/> .




      [Non-text portions of this message have been removed]
    • roycepipkins
      It sure does seem confusing since inherit is a legal value for visibility. I wonder if they are refering to how the property appears programatically thru the
      Message 2 of 6 , Mar 10, 2004
        It sure does seem confusing since "inherit" is a legal value for
        visibility.

        I wonder if they are refering to how the property appears
        programatically thru the DOM interfaces. That is, if you ask an
        element what its visibility property is, and the visibility is not
        specifed on the element in SVG, and the element is actually hidden
        because its parent is hidden, the element will answer that its
        visibility is not specified rather than "hidden".

        That's a guess anyway.




        --- In svg-developers@yahoogroups.com, "abillpay" <abillpay@y...> wrote:
        > If anybody can provide some info that would very helpful.
        >
        > From SVG spec (
        > http://www.w3.org/TR/SVG11/painting.html#VisibilityControl )
        >
        > "Setting 'visibility' to hidden on a 'g' will make its children
        > invisible as long as the children do not specify their
        > own 'visibility' properties as visible.
        > Note that 'visibility' is not an inheritable property. "
        >
        > According to the first line --- if on a "g" element we
        > specify "hidden" it makes its children invisible, if children don't
        > specify any visiblity property. Adobe player behaves that way, is
        > that the correct behavior according to spec?
        >
        > According to the second line -- Visibiliby does not get inherited
        > down the children from parent, unless children set the visibility
        > to "inherit".
        >
        > Second line does seem to contradict the first line.
        >
        > For example, in the following cases,
        > case 1: rectangle is visible eventhough the parent group is invisible
        > because the rectangle sets the visiblity flag to "visible".
        > case 2: Adobe svg player does not show the rectangle at all, that
        > means the rectangle does inherit the visibility from parent "g"
        > element(in adobe player). But according to the second sentence of the
        > above SVG spec quotation, rectangle shouldn't inherit visibility from
        > the parent "g" element.
        > However the frist sentence of the above SVG spec
        > quotation, if we specify visibility flag "hidden" in the group
        > element then it's children would be invisible unless children
        > overrides the visibility flag with "visible"
        >
        > Could anybody explain? What should be the standard behavior?
        >
        > 1)
        > <svg xmlns="http://www.w3.org/2000/svg" version="1.1"
        > baseProfile="tiny" xml:space="preserve" width="176" height="208"
        > viewBox="-88 -104 176 208">
        >
        > <g visibility="hidden">
        >
        > <rect x="-80" y="-20" width="160" height="40" fill="#666699"
        > visibility="visible">
        > <animateTransform attributeName="transform" type="rotate"
        > values="0;180" dur="6s" repeatDur="indefinite"/>
        >
        > </rect>
        >
        > </g>
        > </svg>
        >
        >
        > 2)
        > <svg xmlns="http://www.w3.org/2000/svg" version="1.1"
        > baseProfile="tiny" xml:space="preserve" width="176" height="208"
        > viewBox="-88 -104 176 208">
        >
        > <g visibility="hidden">
        >
        > <rect x="-80" y="-20" width="160" height="40" fill="#666699">
        > <animateTransform attributeName="transform" type="rotate"
        > values="0;180" dur="6s" repeatDur="indefinite"/>
        >
        > </rect>
        >
        > </g>
        >
        > </svg>
        >
        >
        > ruben
      Your message has been successfully submitted and would be delivered to recipients shortly.