From 5c554ebceb32cfd60bd2ef604284466d0856e989 Mon Sep 17 00:00:00 2001 From: Fabian Irsara Date: Tue, 1 Dec 2015 22:42:34 +0100 Subject: [PATCH] compile --- build/dat.gui.js | 5 ++++- build/dat.gui.min.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build/dat.gui.js b/build/dat.gui.js index 2a53554..06d2d8b 100644 --- a/build/dat.gui.js +++ b/build/dat.gui.js @@ -2058,9 +2058,12 @@ dat.GUI = dat.gui.GUI = (function (css, saveDialogueContents, styleSheet, contro } dom.unbind(window, 'keydown', _keydownHandler, false); - dom.unbind(window, 'unload', saveToLocalStorage); dom.unbind(window, 'resize', _resizeHandler); + if (saveToLocalStorage) { + dom.unbind(window, 'unload', saveToLocalStorage); + } + }, /** diff --git a/build/dat.gui.min.js b/build/dat.gui.min.js index 880ec2d..0c64477 100644 --- a/build/dat.gui.min.js +++ b/build/dat.gui.min.js @@ -62,7 +62,7 @@ b;r&&(r.innerHTML=a.name)}},closed:{get:function(){return a.closed},set:function g.addClass(r,"controller-name");f=w(c,r);g.addClass(this.__ul,m.CLASS_CLOSED);g.addClass(f,"title");g.bind(f,"click",function(a){a.preventDefault();c.closed=!c.closed;return!1});a.closed||(this.closed=!1)}a.autoPlace&&(k.isUndefined(a.parent)&&(J&&(z=document.createElement("div"),g.addClass(z,"dg"),g.addClass(z,m.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(z),J=!1),z.appendChild(this.domElement),g.addClass(this.domElement,m.CLASS_AUTO_PLACE)),this.parent||G(c,a.width));f=function(){c.onResize()}; g.bind(window,"resize",f);g.bind(this.__ul,"webkitTransitionEnd",f);g.bind(this.__ul,"transitionend",f);g.bind(this.__ul,"oTransitionEnd",f);this.onResize();a.resizable&&N(this);this.saveToLocalStorageIfPossible=e=function(){x&&"true"===localStorage.getItem(document.location.href+".isLocal")&&localStorage.setItem(document.location.href+".gui",JSON.stringify(c.getSaveObject()))};c.getRoot();a.parent||b()};m.toggleHide=function(){D=!D;k.each(K,function(a){a.domElement.style.zIndex=D?-999:999;a.domElement.style.opacity= D?0:1})};m.CLASS_AUTO_PLACE="a";m.CLASS_AUTO_PLACE_CONTAINER="ac";m.CLASS_MAIN="main";m.CLASS_CONTROLLER_ROW="cr";m.CLASS_TOO_TALL="taller-than-window";m.CLASS_CLOSED="closed";m.CLASS_CLOSE_BUTTON="close-button";m.CLASS_DRAG="drag";m.DEFAULT_WIDTH=245;m.TEXT_CLOSED="Close Controls";m.TEXT_OPEN="Open Controls";var L=function(a){"text"===document.activeElement.type||72!==a.which&&72!=a.keyCode||m.toggleHide()};g.bind(window,"keydown",L,!1);k.extend(m.prototype,{add:function(a,b){return v(this,a,b,{factoryArgs:Array.prototype.slice.call(arguments, -2)})},addColor:function(a,b){return v(this,a,b,{color:!0})},remove:function(a){this.__ul.removeChild(a.__li);this.__controllers.splice(this.__controllers.indexOf(a),1);var b=this;k.defer(function(){b.onResize()})},destroy:function(){this.autoPlace&&z.removeChild(this.domElement);g.unbind(window,"keydown",L,!1);g.unbind(window,"unload",saveToLocalStorage);g.unbind(window,"resize",_resizeHandler)},addFolder:function(a){if(void 0!==this.__folders[a])throw Error('You already have a folder in this GUI by the name "'+ +2)})},addColor:function(a,b){return v(this,a,b,{color:!0})},remove:function(a){this.__ul.removeChild(a.__li);this.__controllers.splice(this.__controllers.indexOf(a),1);var b=this;k.defer(function(){b.onResize()})},destroy:function(){this.autoPlace&&z.removeChild(this.domElement);g.unbind(window,"keydown",L,!1);g.unbind(window,"resize",_resizeHandler);saveToLocalStorage&&g.unbind(window,"unload",saveToLocalStorage)},addFolder:function(a){if(void 0!==this.__folders[a])throw Error('You already have a folder in this GUI by the name "'+ a+'"');var b={name:a,parent:this};b.autoPlace=this.autoPlace;this.load&&this.load.folders&&this.load.folders[a]&&(b.closed=this.load.folders[a].closed,b.load=this.load.folders[a]);b=new m(b);this.__folders[a]=b;a=w(this,b.domElement);g.addClass(a,"folder");return b},open:function(){this.closed=!1},close:function(){this.closed=!0},onResize:function(){var a=this.getRoot();if(a.scrollable){var b=g.getOffset(a.__ul).top,c=0;k.each(a.__ul.childNodes,function(b){a.autoPlace&&b===a.__save_row||(c+=g.getHeight(b))}); window.innerHeight-b-20