Update built files with debounce fix

This commit is contained in:
kristoffer 2016-01-28 14:19:53 +01:00
parent 743794f483
commit 794427af09
2 changed files with 65 additions and 47 deletions

View File

@ -1964,6 +1964,24 @@ dat.GUI = dat.gui.GUI = (function (css, saveDialogueContents, styleSheet, contro
});
};
GUI.debounce = function (func, threshold) {
var timeout;
return function debounced () {
var obj = this, args = arguments;
function delayed () {
func.apply(obj, args);
timeout = null;
}
if (timeout) {
clearTimeout(timeout);
}
timeout = setTimeout(delayed, threshold);
};
};
GUI.CLASS_AUTO_PLACE = 'a';
GUI.CLASS_AUTO_PLACE_CONTAINER = 'ac';
GUI.CLASS_MAIN = 'main';
@ -2109,7 +2127,7 @@ dat.GUI = dat.gui.GUI = (function (css, saveDialogueContents, styleSheet, contro
this.closed = true;
},
onResize: function() {
onResize: GUI.debounce(function() {
var root = this.getRoot();
@ -2143,7 +2161,7 @@ dat.GUI = dat.gui.GUI = (function (css, saveDialogueContents, styleSheet, contro
root.__closeButton.style.width = root.width + 'px';
}
},
}, 1000),
/**
* Mark objects for saving. The order of these objects cannot change as

90
build/dat.gui.min.js vendored

File diff suppressed because one or more lines are too long