Merge branch 'destroy' of https://github.com/firsara/dat.gui into firsara-destroy

# Conflicts:
#	build/dat.gui.js
#	build/dat.gui.min.js
#	src/dat/gui/GUI.js
This commit is contained in:
Jeff Nusz 2016-08-18 17:18:37 -07:00
commit 13ceb7af00

View File

@ -390,18 +390,14 @@ const GUI = function(pars) {
}
}
dom.bind(window, 'resize', function() {
this.__resizeHandler = function() {
_this.onResize();
});
dom.bind(this.__ul, 'webkitTransitionEnd', function() {
_this.onResize();
});
dom.bind(this.__ul, 'transitionend', function() {
_this.onResize();
});
dom.bind(this.__ul, 'oTransitionEnd', function() {
_this.onResize();
});
};
dom.bind(window, 'resize', this.__resizeHandler);
dom.bind(this.__ul, 'webkitTransitionEnd', this.__resizeHandler);
dom.bind(this.__ul, 'transitionend', this.__resizeHandler);
dom.bind(this.__ul, 'oTransitionEnd', this.__resizeHandler);
this.onResize();
if (params.resizable) {
@ -450,12 +446,13 @@ GUI.DEFAULT_WIDTH = 245;
GUI.TEXT_CLOSED = 'Close Controls';
GUI.TEXT_OPEN = 'Open Controls';
dom.bind(window, 'keydown', function(e) {
GUI._keydownHandler = function(e) {
if (document.activeElement.type !== 'text' &&
(e.which === HIDE_KEY_CODE || e.keyCode === HIDE_KEY_CODE)) {
GUI.toggleHide();
}
}, false);
};
dom.bind(window, 'keydown', GUI._keydownHandler, false);
common.extend(
GUI.prototype,
@ -515,6 +512,13 @@ common.extend(
if (this.autoPlace) {
autoPlaceContainer.removeChild(this.domElement);
}
dom.unbind(window, 'keydown', GUI._keydownHandler, false);
dom.unbind(window, 'resize', this.__resizeHandler);
if (this.saveToLocalStorageIfPossible) {
dom.unbind(window, 'unload', this.saveToLocalStorageIfPossible);
}
},
/**