yonicd / slickR

slick carousel htmlwidget for R
https://yonicd.github.io/slickR/
Other
158 stars 14 forks source link

slickROutput(height = '50px') not respected #47

Open DavorJ opened 3 years ago

DavorJ commented 3 years ago

Since the last version, the height parameter of slickROutput doesn't seem to work.

Here is an example:

image

The blue bounding box is 50px but as you see, the pictures are extended beyond it.

Workaround is to set '50px' in slickR(). But then, what is the point of height in slickROutput?

yonicd commented 3 years ago

Thanks for catching this. I'll look into it.

yonicd commented 3 years ago

You are correct. the way the underlying js code is written the widget size supersedes the container size it is in. to change this will take some refactoring. For the time being unfortunately you will have to control the size via the slickR function and not the output function.

ismirsehregal commented 3 years ago

It seems that on the other hand the width argument is only taken into account when used in slickROutput not in slickR.