nomnoml icon indicating copy to clipboard operation
nomnoml copied to clipboard

width and height arguments to `nomnoml()` problems

Open dmurdoch opened this issue 2 years ago • 1 comments

The width and height arguments to nomnoml() are described here https://github.com/rstudio/nomnoml/blob/d377a810177bc6bef818ed2120b36dad0a18b139/R/nomnoml.R#L20-L22 as being measured in pixels. Since they are htmlwidgets measurements that's how numerical values will be interpreted, but string values using CSS units (e.g. "3in") will also be accepted.

(There's also an issue if they are specified in help page example code. It works fine for users running examples, but the pkgdown display will give an error if a string size is used and will interpret numerical values as inches instead of pixels. This is a pkgdown issue, as described here: https://github.com/r-lib/pkgdown/issues/2062. It isn't a problem in vignettes, only help pages.)

dmurdoch avatar May 17 '22 16:05 dmurdoch

I should also mention the PR I submitted to fix this: https://github.com/r-lib/pkgdown/pull/2063 .

dmurdoch avatar May 17 '22 21:05 dmurdoch

Thanks, @dmurdoch It seems the linked issue on pkgdown has been merged and closed. Does this mean we can close this issue on nomnoml?

andrie avatar Nov 20 '23 10:11 andrie

Yes, the bug is fixed. I had been thinking the docs should mention CSS units, but probably those aren't needed.

dmurdoch avatar Nov 20 '23 13:11 dmurdoch