updated build and changelog

This commit is contained in:
Jeff Nusz 2016-08-18 17:24:08 -07:00
parent e1250a1c00
commit d1a230a29e
4 changed files with 60 additions and 20 deletions

View File

@ -1,6 +1,10 @@
## Changelog ## Changelog
### 0.6.2 ### 0.6.2
* added updateDisplay() to GUI, to update all controls in all folders
* fixed GUI.destroy() to remove all window eventListeners
* fixed performance issue when rotated on tablet/mobile
* fixed issue that prevented user from changing values of controls that are listening * fixed issue that prevented user from changing values of controls that are listening
* fixed issues with onFinishChange callbacks on revert * fixed issues with onFinishChange callbacks on revert
* fixed issues with color selector formatting * fixed issues with color selector formatting

View File

@ -6090,6 +6090,28 @@ return /******/ (function(modules) { // webpackBootstrap
setTimeout(fnc, 0); setTimeout(fnc, 0);
}, },
// call the function immediately, but wait until threshold passes to allow it to be called again
debounce: function debounce(func, threshold) {
var timeout = undefined;
return function () {
var obj = this;
var args = arguments;
function delayed() {
timeout = null;
}
var allowCall = !timeout;
clearTimeout(timeout);
timeout = setTimeout(delayed, threshold);
if (allowCall) {
func.apply(obj, args);
}
};
},
toArray: function toArray(obj) { toArray: function toArray(obj) {
if (obj.toArray) return obj.toArray(); if (obj.toArray) return obj.toArray();
return ARR_SLICE.call(obj); return ARR_SLICE.call(obj);
@ -8413,18 +8435,14 @@ return /******/ (function(modules) { // webpackBootstrap
} }
} }
_domDom2['default'].bind(window, 'resize', function () { this.__resizeHandler = function () {
_this.onResize(); _this.onResize();
}); };
_domDom2['default'].bind(this.__ul, 'webkitTransitionEnd', function () {
_this.onResize(); _domDom2['default'].bind(window, 'resize', this.__resizeHandler);
}); _domDom2['default'].bind(this.__ul, 'webkitTransitionEnd', this.__resizeHandler);
_domDom2['default'].bind(this.__ul, 'transitionend', function () { _domDom2['default'].bind(this.__ul, 'transitionend', this.__resizeHandler);
_this.onResize(); _domDom2['default'].bind(this.__ul, 'oTransitionEnd', this.__resizeHandler);
});
_domDom2['default'].bind(this.__ul, 'oTransitionEnd', function () {
_this.onResize();
});
this.onResize(); this.onResize();
if (params.resizable) { if (params.resizable) {
@ -8473,11 +8491,12 @@ return /******/ (function(modules) { // webpackBootstrap
GUI.TEXT_CLOSED = 'Close Controls'; GUI.TEXT_CLOSED = 'Close Controls';
GUI.TEXT_OPEN = 'Open Controls'; GUI.TEXT_OPEN = 'Open Controls';
_domDom2['default'].bind(window, 'keydown', function (e) { GUI._keydownHandler = function (e) {
if (document.activeElement.type !== 'text' && (e.which === HIDE_KEY_CODE || e.keyCode === HIDE_KEY_CODE)) { if (document.activeElement.type !== 'text' && (e.which === HIDE_KEY_CODE || e.keyCode === HIDE_KEY_CODE)) {
GUI.toggleHide(); GUI.toggleHide();
} }
}, false); };
_domDom2['default'].bind(window, 'keydown', GUI._keydownHandler, false);
_utilsCommon2['default'].extend(GUI.prototype, _utilsCommon2['default'].extend(GUI.prototype,
@ -8526,6 +8545,13 @@ return /******/ (function(modules) { // webpackBootstrap
if (this.autoPlace) { if (this.autoPlace) {
autoPlaceContainer.removeChild(this.domElement); autoPlaceContainer.removeChild(this.domElement);
} }
_domDom2['default'].unbind(window, 'keydown', GUI._keydownHandler, false);
_domDom2['default'].unbind(window, 'resize', this.__resizeHandler);
if (this.saveToLocalStorageIfPossible) {
_domDom2['default'].unbind(window, 'unload', this.saveToLocalStorageIfPossible);
}
}, },
/** /**
@ -8579,7 +8605,8 @@ return /******/ (function(modules) { // webpackBootstrap
this.closed = true; this.closed = true;
}, },
onResize: function onResize() { onResize: _utilsCommon2['default'].debounce(function () {
// we debounce this function to prevent performance issues when rotating on tablet/mobile
var root = this.getRoot(); var root = this.getRoot();
if (root.scrollable) { if (root.scrollable) {
var _top = _domDom2['default'].getOffset(root.__ul).top; var _top = _domDom2['default'].getOffset(root.__ul).top;
@ -8609,7 +8636,7 @@ return /******/ (function(modules) { // webpackBootstrap
if (root.__closeButton) { if (root.__closeButton) {
root.__closeButton.style.width = root.width + 'px'; root.__closeButton.style.width = root.width + 'px';
} }
}, }, 200),
/** /**
* Mark objects for saving. The order of these objects cannot change as * Mark objects for saving. The order of these objects cannot change as
@ -8740,6 +8767,15 @@ return /******/ (function(modules) { // webpackBootstrap
if (init) { if (init) {
updateDisplays(this.__listening); updateDisplays(this.__listening);
} }
},
updateDisplay: function updateDisplay() {
_utilsCommon2['default'].each(this.__controllers, function (controller) {
controller.updateDisplay();
});
_utilsCommon2['default'].each(this.__folders, function (folder) {
folder.updateDisplay();
});
} }
}); });

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long