mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
gui styling adaptation for scrollbars width
This commit is contained in:
parent
ac562a2deb
commit
5b69223ef8
22
gui.js
22
gui.js
@ -138,22 +138,14 @@ var GUI = function() {
|
||||
|
||||
_this.toggle();
|
||||
|
||||
// Clears lingering slider column
|
||||
_this.domElement.style.width = (width+1)+'px';
|
||||
setTimeout(function() {
|
||||
_this.domElement.style.width = width+'px';
|
||||
}, 1);
|
||||
|
||||
}
|
||||
|
||||
if (togglePressed && toggleDragged) {
|
||||
|
||||
if (dragDisplacementX == 0) {
|
||||
|
||||
// Clears lingering slider column
|
||||
_this.domElement.style.width = (width+1)+'px';
|
||||
setTimeout(function() {
|
||||
_this.domElement.style.width = width+'px';
|
||||
}, 1);
|
||||
adaptToScrollbar()
|
||||
|
||||
}
|
||||
|
||||
@ -420,6 +412,8 @@ var GUI = function() {
|
||||
curControllerContainerHeight += (resizeTo - curControllerContainerHeight)*0.6;
|
||||
if (Math.abs(curControllerContainerHeight-resizeTo) < 1) {
|
||||
curControllerContainerHeight = resizeTo;
|
||||
adaptToScrollbar();
|
||||
|
||||
} else {
|
||||
resizeTimeout = setTimeout(beginResize, 1000/30);
|
||||
}
|
||||
@ -427,6 +421,14 @@ var GUI = function() {
|
||||
checkForOverflow();
|
||||
}
|
||||
|
||||
var adaptToScrollbar = function() {
|
||||
// Clears lingering slider column
|
||||
_this.domElement.style.width = (width+1)+'px';
|
||||
setTimeout(function() {
|
||||
_this.domElement.style.width = width+'px';
|
||||
}, 1);
|
||||
};
|
||||
|
||||
// Load saved appearance:
|
||||
|
||||
if (GUI.guiIndex < GUI.savedAppearanceVars.length) {
|
||||
|
Loading…
Reference in New Issue
Block a user