mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
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:
parent
f720c729de
commit
475a111d39
@ -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>
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user