-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v4 - refresh no longer working #570
Comments
This small test code works fine in my environment: const PARAMS = {someProp: 1};
const pane = new Pane();
// Adding some bindings
pane.addBinding(PARAMS, 'someProp');
pane.addBinding(PARAMS, 'someProp', {options: {'foo': 1, 'bar': 2}});
// Update the value outside the pane
PARAMS.someProp = 2;
// Refresh the pane
pane.refresh();
// or, pane.children[i].refresh() also works fine It seems that more information about your environment is needed to reproduce the problem. Sharing a code snippet or a minimal environment would be helpful. |
Thanks for your input. The Not sure if this is the intended behavior, but for me this works. If you're curious, you can see it in my code for Toko, a library to extend p5.js. Here line 29 and onwards, I set up the 3 buttons, and line 55 is where I had to change it. ( |
Thank you for the details! I found the cause and created a new issue: #571 |
Fixed in 4.0.1. |
I am trying to migrate code from Tweakpane v3 to v4. All is working well, except for the refresh function. The code using it that was working for v3 no longer works. Specifically, nothing happens.
Here is an example panel I'm working on:
In the Colors section, clicking the arrows or the rnd buttons changes the palette value and triggers a refresh. Previously then the palette dropdown would update and the visualization would redraw. With v4 nothing happens. No changes, no errors.
Digging into the Tweakpane code and adding a few log statements, it seems that in the refresh function (line 1708) the children array it tries to iterate only has 1 child and that has isRefreshable = false. Given that there are multiple inputs and taps in this instance, I would imagine it needs to iterate more than 1 child.
Again, this all worked with v3, so I'm not sure what is going on.
The text was updated successfully, but these errors were encountered: