Now we can only call refresh()
on the RootApi, but not on FolderApi.
const pane = new Pane({ title: 'Pane' });
const folder = pane.addFolder({ title: 'folder' });
folder.refresh(); // not work, no `refresh` method on FolderApi.
pane.refresh(); // work
This will refresh all bindings.
If the pane has many fields, it would cause performance issue.
And your RootApi#refresh
implementation can safely move to FolderApi
.
Now I am doing the same thing on my codebase.
import('tweakpane').then(module => {
const { Pane, FolderApi } = module;
if (!FolderApi.prototype.refresh) {
FolderApi.prototype.refresh = Pane.prototype.refresh;
}
});
I think this will be useful.
Owner Name | cocopon |
Repo Name | tweakpane |
Full Name | cocopon/tweakpane |
Language | TypeScript |
Created Date | 2016-05-10 |
Updated Date | 2023-03-17 |
Star Count | 2603 |
Watcher Count | 19 |
Fork Count | 71 |
Issue Count | 11 |
Issue Title | Created Date | Updated Date |
---|