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

Editor: Remove UIListbox namespace from ListboxItem. #24765

Merged
merged 1 commit into from
Oct 10, 2022
Merged

Editor: Remove UIListbox namespace from ListboxItem. #24765

merged 1 commit into from
Oct 10, 2022

Conversation

puxiao
Copy link
Contributor

@puxiao puxiao commented Oct 10, 2022

I get an error when I use UIListbox .

Uncaught TypeError: UIListbox.ListboxItem is not a constructor
at UIListbox.render (ui.js:1213:30)

https://github.com/mrdoob/three.js/blob/dev/editor/js/libs/ui.js

class UIListbox extends UIDiv { ... }

class ListboxItem extends UIDiv { ... }

You can see that: UIListbox and ListboxItem, they are independent of each other.

So UIListbox.ListboxItem is wrong.

- const listitem = new UIListbox.ListboxItem(this);
+ const listitem = new ListboxItem(this);

@Mugen87 Mugen87 changed the title Update ui.js Editor: Remove UIListbox namespace from ListboxItem. Oct 10, 2022
@Mugen87 Mugen87 added this to the r146 milestone Oct 10, 2022
@Mugen87 Mugen87 merged commit 991f380 into mrdoob:dev Oct 10, 2022
@puxiao puxiao deleted the patch-1 branch October 11, 2022 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants