jjallaire/knob — pull request #1 by jcheng5 (2014-12-05 03:42:41+00:00)
Title: Fix broken resizing in Shiny

Two problems:

1. The knob_html function wasn't making use of the style attribute; this needs to always be put on the widget element.
2. The input tag can't be the top-level element for this widget; it gets resized to be a fraction of the overall size of the widget when knob() is called. But the next time resize is called, it looks at the size of the input again and uses that as the argument to resize, which makes the entire knob shrink to the size of the input (and the input itself shrink to a fraction of its previous size). I changed this back to the stock behavior of generating a top-level div, and gin up an input at initialize time.

There appears to be an issue in htmlwidgets, where showing a knob in the RStudio Viewer with a user-specified size doesn't get respected if only a width is provided. I'm investigating that separately.