- From: Paul LeBeau <paul.lebeau@gmail.com>
- Date: Tue, 25 Jun 2013 23:28:49 +1200
- To: Robert Longson <longsonr@gmail.com>
- Cc: www-svg <www-svg@w3.org>
- Message-ID: <CACfsppDitvEPLUkZ_jUJ9Eainoy_W-cDyfEGKwg=6=Pv1PwV+w@mail.gmail.com>
Robert Thanks for your answer and for pointing out that clause. I missed it because it was hidden in a section about fragment identifiers, which I thought didn't apply to me. However I don't quite understand your point about inner svg elements and overflow. There is no "inner svg" in this example. And section 14.3.3 (SVG1.1) states that outermost SVG elements are overflow:visible. Am I missing something? Also, the section you pointed out refers to *"the closest ancestor ‘svg’ element"*. However it seems that the browsers are actually overriding the root (furthest ancestor) svg viewBox. For example: http://paullebeau.com/svg2/test_view_nested.svg in FF or IE or Batik (Chrome doesn't work). In this example the view element is inside the child svg and describes a viewBox in child svg user coordinates (in theory). However if you click on "[sub view]", it looks like the view viewBox is being applied to the root svg rather than the closest ancestor svg. The view is being centred on the red square rather than the green one. If you change the <view> viewBox to root coordinates ("100 0 100 100"), the view is now centred on the green square. The View Element section also states: "*If the SVG fragment identifier addresses a ‘view’ element within an SVG document then the closest ancestor ‘svg’ element is displayed in the viewport*". I don't quite understand what this means exactly, but it gives the impression that only the child svg should be rendered. But that's clearly not how the browsers are interpreting it. In the example, the root svg content (the yellow background) is visible. Paul On 25 June 2013 09:13, Robert Longson <longsonr@gmail.com> wrote: > Paul, > > From http://www.w3.org/TR/SVG/linking.html#ViewElement > > Any view specification attributes included on the given ‘view’<http://www.w3.org/TR/SVG/linking.html#ViewElement>element override the corresponding view specification attributes on the > closest ancestor ‘svg’ <http://www.w3.org/TR/SVG/struct.html#SVGElement>element. > > So you have an <svg> with a viewBox of the view. And inner <svg> elements > are overflow: hidden per > http://www.w3.org/TR/SVG/masking.html#OverflowProperty > > So I think Batik is wrong and the rest of us are right > > Robert. > > > On 24 June 2013 18:50, Paul LeBeau <paul.lebeau@gmail.com> wrote: > >> Yes sorry. I should have supplied an example in my original post. >> >> Try the following example which is from the IE documentation [1]: >> >> http://www.paullebeau.com/svg2/test_view.svg >> >> The green border is a <rect> with width and height set to 100%. If you >> view the above URL in Chrome, FF or IE and click on the "[double size]" or >> "[half size]" link you should see that the border is surrounding the view >> rather than the document. >> >> You can also see that the contents are clipped to the view despite their >> being nothing in the document that says to do that. >> >> Paul >> >> >> [1] http://msdn.microsoft.com/en-nz/library/ie/ff972134(v=vs.85).aspx >> >> >> On 25 June 2013 05:15, Robert Longson <longsonr@gmail.com> wrote: >> >>> Paul, >>> >>> Do you have examples showing these issues? >>> >>> Robert. >>> >> >> >> >> >
Received on Tuesday, 25 June 2013 11:29:36 UTC