Skip to content
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

Insert input/monitor in a specific order #40

Closed
abolfazlshirazi opened this issue May 3, 2020 · 1 comment
Closed

Insert input/monitor in a specific order #40

abolfazlshirazi opened this issue May 3, 2020 · 1 comment

Comments

@abolfazlshirazi
Copy link

Hi,
It will be great to have an option for adding input/monitor in the pane/folder in a specific order, not at the end of all elements.
Currently, when adding items with for example ".addInput()" or ".addButton()", the item will be placed at the end of the pane. How if it is possible to place an item in a specific index in the pane? The reason is, after creating the pane, in some applications, it may be necessary to delete (dispose()) some of the elements and substitute them with some new inputs, so it is required to place the item exactly on the position it was deleted, not at the end of the pane.

cocopon added a commit that referenced this issue May 16, 2020
@cocopon
Copy link
Owner

cocopon commented May 16, 2020

Just released 1.3.3 and now you can specify index option.

const pane = new Tweakpane();
pane.addButton({title: 'Run'});
pane.addButton({title: 'Stop'});
pane.addButton({
  index: 1,
  title: '**Reset**',
});

@cocopon cocopon closed this as completed May 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants