Re: [svg2] Should <use> be allowed to reference <view> elements?
Amelia Bellamy-Royds <[email protected]>
| Newsgroups | gmane.comp.web.svg |
|---|---|
| Message-ID | <CAFDDJ7x50_GuXUZPR+g775mF34qM69upjOiZhr0M5x3muPpi5w@mail.gmail.com> |
That's an interesting use-case, Erik (no pun intended). Currently, views don't have any effect in inline SVG, but I can definitely see applications for it with <use>; e.g., draw a complex figure and then have a second, zoom-in region elsewhere on the page. To create that effect currently, you would need to re-use the <svg> as a whole, but adjust the width/height on the <use> element so that it is larger or smaller than the second SVG, in order to zoom and clip it to the correct region. Definitely not as intuitive as a <view>. OK, now for the opposite side of the argument. You ask "The main point is that <view> essentially behaves like an <svg> or <symbol>, so why should it be different than those for <use>?" The difference of course is that you can't just take the <view> element and all its child content and copy that. You're actually re-using the <svg>, but with the modifications from the view. I don't see any reason with adding special rules for views -- there are already special rules for <svg> and for <symbol> -- but I think people might want to take a look at their implementation code to see if this would cause any strange complications. E.g., the <view> element is itself a child of the re-used <svg>. Would that cause a strange loop? Would you be able to correctly detect a circular reference when a <use> element references a <view> within the *same* <svg>? That sort of thing. ~ABR