lazyrmd icon indicating copy to clipboard operation
lazyrmd copied to clipboard

Iframe sizing issues

Open pkopps opened this issue 8 years ago • 0 comments

I am having a lot of trouble with the sizing of the iframe for this package

screenshot from 2017-02-01 18 40 47

I forked rpivotTable package to https://github.com/pkopps/rpivot and changed the sizing policy from

# htmlwidgets::createWidget(
#   name = 'rpivot',
#   x,
#   width = width,
#   height = height,
#   package = 'rpivot'
# )

to

htmlwidgets::createWidget(
  name = 'rpivot',
  x,
  width = width,
  height = height,
  sizingPolicy = htmlwidgets::sizingPolicy(
    knitr.figure = FALSE,
    knitr.defaultHeight = '100%',
    knitr.defaultWidth = '100%'
  ),
  package = 'rpivot'
)

because I have 250+ of these in a .Rmd file and they all overlapped one another (I don't know if this was the best way)

I also have very little js and css understanding/experience

Anyways, is this normal/expected behavior for the lazyrmd package. Could sizing arguments be added to the lazyrmd::lazy_render() function potentially?

I experimented with the rpivot packages sizing policy, I played with the chuck options "out.width" and "out.height" with no luck

Thank you kindly Patrick

pkopps avatar Feb 01 '17 23:02 pkopps