mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Preparing for doug's build script to automatically append and inject the minified css
This commit is contained in:
parent
bfc6820597
commit
5c709ec018
@ -20,9 +20,6 @@ DAT.GUI = function(parameters) {
|
|||||||
|
|
||||||
var listenInterval;
|
var listenInterval;
|
||||||
|
|
||||||
// Set this to minified css if you don't want to attach style sheets
|
|
||||||
var inlineCSS = '';
|
|
||||||
|
|
||||||
// Sum total of heights of controllers in this gui
|
// Sum total of heights of controllers in this gui
|
||||||
var controllerHeight;
|
var controllerHeight;
|
||||||
|
|
||||||
@ -455,6 +452,7 @@ DAT.GUI = function(parameters) {
|
|||||||
DAT.GUI.allGuis.push(this);
|
DAT.GUI.allGuis.push(this);
|
||||||
|
|
||||||
// Add hide listener if this is the first DAT.GUI.
|
// Add hide listener if this is the first DAT.GUI.
|
||||||
|
|
||||||
if (DAT.GUI.allGuis.length == 1) {
|
if (DAT.GUI.allGuis.length == 1) {
|
||||||
|
|
||||||
window.addEventListener('keyup', function(e) {
|
window.addEventListener('keyup', function(e) {
|
||||||
@ -464,10 +462,10 @@ DAT.GUI = function(parameters) {
|
|||||||
}
|
}
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
if (inlineCSS != '') {
|
if (DAT.GUI.inlineCSS) {
|
||||||
var styleSheet = document.createElement('style');
|
var styleSheet = document.createElement('style');
|
||||||
styleSheet.setAttribute('type', 'text/css');
|
styleSheet.setAttribute('type', 'text/css');
|
||||||
styleSheet.innerHTML = inlineCSS;
|
styleSheet.innerHTML = DAT.GUI.inlineCSS;
|
||||||
document.head.appendChild(styleSheet);
|
document.head.appendChild(styleSheet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user