Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello. I just inherited a solution that uses Knobs and noticed a few problems with the API.
First, there is no easy way to redraw the Knobs. I found the pull request here where you mentioned that triggering "configure" on the Knob would resize the Knob. This is partially true, but it removes certain configurations like the "format" function.
I assumed that I could simply trigger "configure" with the same "format" function, but this is not the case. This "format" function seems to be disregarded and the "value" is displayed instead of the "actualValue". As do many other "hacks" that I tried. It seems the only way to preserve this "actualValue/displayValue" is to build a Knob from scratch. Again, I set my "format" function to return "this.o.displayValue", but that only seems to work for the initial creation of a Knob.
I also attempted to use relative height/width for the Knobs, but found that the code wouldn't work for our solution. It simply hard-codes the resize handler into "window", instead of providing the option to NOT automatically bind an event handler to the window or call the handler without triggering a resize to the whole window. This causes problems as we use a debounce function to avoid re-drawing too much on screen. This means that the Knobs are "resized" before the actual document, which does nothing. Additionally, this native behavior also clears the "format" function and doesn't display what it should.
I know these changes aren't likely to occur soon, but I hope that these enhancements could be made to improve the API.