Fix width on FunctionController property_name

Before: Text descriptions for buttons (FunctionController) were being truncated unnecessarily to the same width as other Controllers that must share real estate with input elements.

This PR sets the css width for FunctionController elements to 100%.  I've added to example.html in case it's useful.
This commit is contained in:
Russ Tedrake 2021-09-07 09:17:55 -04:00
parent f720c729de
commit 475a111d39
2 changed files with 10 additions and 0 deletions

View File

@ -58,6 +58,11 @@
var f3 = f2.addFolder('Nested Folder'); var f3 = f2.addFolder('Nested Folder');
f3.add(obj, 'growthSpeed'); f3.add(obj, 'growthSpeed');
obj['Button with a long description'] = function () {
console.log('Button with a long description pressed');
};
gui.add(obj, 'Button with a long description');
</script> </script>
</body> </body>
</html> </html>

View File

@ -172,6 +172,11 @@ $button-height: 20px;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
/** Function controllers can use the entire width */
.cr.function .property-name {
width: 100%;
}
/** Controller-half (right) */ /** Controller-half (right) */
.c { .c {
float: left; float: left;