This commit is contained in:
Fabian Irsara 2015-12-01 22:37:07 +01:00
parent afd4003835
commit aba22511c3
2 changed files with 29 additions and 21 deletions

View File

@ -1920,10 +1920,14 @@ dat.GUI = dat.gui.GUI = (function (css, saveDialogueContents, styleSheet, contro
} }
dom.bind(window, 'resize', function() { _this.onResize() }); var _resizeHandler = function () {
dom.bind(this.__ul, 'webkitTransitionEnd', function() { _this.onResize(); }); _this.onResize();
dom.bind(this.__ul, 'transitionend', function() { _this.onResize() }); };
dom.bind(this.__ul, 'oTransitionEnd', function() { _this.onResize() });
dom.bind(window, 'resize', _resizeHandler);
dom.bind(this.__ul, 'webkitTransitionEnd', _resizeHandler);
dom.bind(this.__ul, 'transitionend', _resizeHandler);
dom.bind(this.__ul, 'oTransitionEnd', _resizeHandler);
this.onResize(); this.onResize();
@ -1977,14 +1981,14 @@ dat.GUI = dat.gui.GUI = (function (css, saveDialogueContents, styleSheet, contro
GUI.TEXT_CLOSED = 'Close Controls'; GUI.TEXT_CLOSED = 'Close Controls';
GUI.TEXT_OPEN = 'Open Controls'; GUI.TEXT_OPEN = 'Open Controls';
dom.bind(window, 'keydown', function(e) { var _keydownHandler = function(e) {
if (document.activeElement.type !== 'text' && if (document.activeElement.type !== 'text' &&
(e.which === HIDE_KEY_CODE || e.keyCode == HIDE_KEY_CODE)) { (e.which === HIDE_KEY_CODE || e.keyCode == HIDE_KEY_CODE)) {
GUI.toggleHide(); GUI.toggleHide();
} }
};
}, false); dom.bind(window, 'keydown', _keydownHandler, false);
common.extend( common.extend(
@ -2053,6 +2057,10 @@ dat.GUI = dat.gui.GUI = (function (css, saveDialogueContents, styleSheet, contro
auto_place_container.removeChild(this.domElement); auto_place_container.removeChild(this.domElement);
} }
dom.unbind(window, 'keydown', _keydownHandler, false);
dom.unbind(window, 'unload', saveToLocalStorage);
dom.unbind(window, 'resize', _resizeHandler);
}, },
/** /**

28
build/dat.gui.min.js vendored

File diff suppressed because one or more lines are too long