mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
remove hardcoded assumption that dat.gui work as fixed position
This commit is contained in:
parent
979f2fc39d
commit
3faf42f502
@ -688,7 +688,6 @@ common.extend(
|
||||
// we debounce this function to prevent performance issues when rotating on tablet/mobile
|
||||
const root = this.getRoot();
|
||||
if (root.scrollable) {
|
||||
const top = dom.getOffset(root.__ul).top;
|
||||
let h = 0;
|
||||
|
||||
common.each(root.__ul.childNodes, function(node) {
|
||||
@ -697,9 +696,9 @@ common.extend(
|
||||
}
|
||||
});
|
||||
|
||||
if (window.innerHeight - top - CLOSE_BUTTON_HEIGHT < h) {
|
||||
if (root.domElement.clientHeight - CLOSE_BUTTON_HEIGHT < h) {
|
||||
dom.addClass(root.domElement, GUI.CLASS_TOO_TALL);
|
||||
root.__ul.style.height = window.innerHeight - top - CLOSE_BUTTON_HEIGHT + 'px';
|
||||
root.__ul.style.height = root.domElement.clientHeight - CLOSE_BUTTON_HEIGHT + 'px';
|
||||
} else {
|
||||
dom.removeClass(root.domElement, GUI.CLASS_TOO_TALL);
|
||||
root.__ul.style.height = 'auto';
|
||||
|
Loading…
Reference in New Issue
Block a user