Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass CSS string or values to set the iframe height #39

Open
dionjwa opened this issue Oct 1, 2019 · 0 comments
Open

Pass CSS string or values to set the iframe height #39

dionjwa opened this issue Oct 1, 2019 · 0 comments

Comments

@dionjwa
Copy link
Member

dionjwa commented Oct 1, 2019

Plotly.js will set the plot height to a default of 450px if the height cannot be determined:

plotly/angular-plotly.js#48

Due to iframe security (a good thing!) the parent css cannot be passed into the iframe, even on the same domain. This means that the metapage cannot set an exact height, so the plotly iframe (if smaller than 450px) will have scroll bars, which is annoying, rather than just scaling down the plot to fit the desired iframe size.

On metaframe init, pass down :

  • the element height
  • or a css string from the layout object
  • or something else?
  • or just set the height specifically (without any other css)

I'm favouring confining this feature to css height only, since a user can implement passing arbitrary css strings/values themselves. It might be a generally useful feature, but there's no demand for the complex version as yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant