PEM-- / fview-svg

Encapsulate SVG in Surface, a plugin for famous-views, the Meteor bridge to famo.us
17 stars 3 forks source link

render responsive svgs by default #4

Closed rjmoggach closed 9 years ago

rjmoggach commented 9 years ago

I thought this would take care of making svgs responsive inside their surface but simply setting the surface size isn't enough. It's especially noticeable if you start with Y rotated surfaces.

i've used the following method before:

SVG into liquid layout or Responsive Web Design

Will confirm if that works - maybe something to include?

PEM-- commented 9 years ago

Check my README: https://github.com/PEM--/fview-svg#preparing-your-assets

That's exactly what I advise to do :wink:

rjmoggach commented 9 years ago

yeah - did that. that's not the issue.

only way I could get SVGs to be responsive was wrapping them in a div.

mogfam.meteor.com

https://github.com/robmoggach/famous-views-testing

...going to use a Surface for now and do this manually.

Can you reopen this issue?

PEM-- commented 9 years ago

Indeed, you've used a ContainerSurface.

rjmoggach commented 9 years ago

Is there a substantive and documented reason for not doing that? Please elaborate...

On Feb 27, 2015, at 8:33 AM, Pierre-Eric Marchandet notifications@github.com wrote:

Indeed, you've used a ContainerSurface.

— Reply to this email directly or view it on GitHub.

PEM-- commented 9 years ago

A ContainerSurface creates its own context. Therefore, it doesn't constrain its childs. This is why you've added a div. A Modifier or a StateModifier would be more appropriate.

If you do something like, you should be good to go:

+ContainerSurface ...
  +StateModifier ...
    +FviewSvg ...