[feedback] more customization options and split modules
See original GitHub issueHi there! Just recently discovered this very cool utility! Thanks a lot for making it first of all!
I’m using 0.7.2 and I have a few comments/feedback/requests for the next version
It seems the closed: true parameter doesn’t work. Whether I set the option to closed true or false the controls are always visible.
Doing gui.close() immediately does however work around this problem.
I would really like it if there was a gui.hide() as well (for when hideable is enabled).
I’ve tried to set it manually by doing this
gui.domElement.style.display = 'none';
which does work, but then I have to press the ‘h’ key twice to make it appear because I can’t set the internal ‘hide’ variable to false
So perhaps a ‘hidden’ parameter as well as an exposed hide() toggle method would be very useful
I would also love to be able to customize the key used to hide, currently hardcoded to ‘h’ (72)
I would also love to be able to change the text ‘open controls’ and ‘close controls’
I also noticed that setting the width as an option does work as far as shortening the controls. However for some reason the text elements inside the controls do not respect this width. I’ve attached a screenshot to show what I mean
This is with the width set to 100. The control elements are “functions” so the only thing that is showing is the label itself. You should be easily able to read the word “short” but it is cut off even though it easily fits in 100px
Lastly, it would be nice if there was a “core” version of this package that didn’t include things like the colorPicker and other modules that are making this library be 50kb minified. It would be nice if those modules were separated so the library size could be reduced. 50kb minified is not exactly lightweight… think it could be a lot lighter for those of us who just want to use the library to trigger functions for example
Here’s to hoping some of this can make it into 0.7.3 😃
Thanks!!
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
I’ve resorted to disabling the ‘hideable’ flag and implementing by own jquery display toggle and the KeyPress library to implement the same letter ‘h’ but with more control as to when it gets fired… here’s my code:
works perfectly
thanks for the quick reply!
I guess adding ‘textarea’ to that code of yours would also do the trick
Note that there is code already in place that attempts to prevent the shortcut firing when a text input is focused. If there’s a simple way to make that more robust (e.g. checking for
<textarea/>
elements as well) a PR would be welcome. A PR adding the option to simply disable the shortcut entirely would also be great. Unfortunately I do not have time to implement those myself, or a workaround in the meantime.