diff --git a/chickenpaint/js/chickenpaint.js b/chickenpaint/js/chickenpaint.js index 982792f..1331079 100644 --- a/chickenpaint/js/chickenpaint.js +++ b/chickenpaint/js/chickenpaint.js @@ -356,7 +356,7 @@ function(){l.togglePalettes()};this.arrangePalettes=function(){setTimeout(l.arra function(m){g!==m&&(g=m,e.resize(),e.arrangePalettes())};this.resize=function(){let m=window.innerHeight,h=p.getElement().getBoundingClientRect().height;b.resize(g?m-h:Math.min(Math.max(m-h-65,500),850),!1);e.constrainPalettes()};p=new Uh(a,this);c.appendChild(p.getElement());d.className="chickenpaint-main-section";d.appendChild(b.getElement());d.appendChild(l.getElement());c.appendChild(d);b.on("canvasRotated90",function(m){l.palettes.layers.setRotation90(m)});screen.orientation&&screen.orientation.addEventListener("change", m=>{this.resize();a.actionPerformed({action:"CPArrangePalettes"});setTimeout(()=>{this.resize();a.actionPerformed({action:"CPArrangePalettes"})},10);Promise.resolve().then(()=>{this.resize()}).then(()=>{a.actionPerformed({action:"CPArrangePalettes"})})});let k=document.getElementById("chickenpaint-main-menu-content");if(document.addEventListener("show.bs.modal",()=>{k&&k.classList.contains("show")&&(new oc.Collapse(k,{toggle:!1})).hide()}),k){let m=document.querySelector(".chickenpaint .widget-nav"); m&&(k.addEventListener("show.bs.collapse",h=>{m.classList.add("hidden")}),k.addEventListener("hidden.bs.collapse",h=>{m.classList.remove("hidden")}));window.addEventListener("resize",()=>{m.classList.remove("hidden")})}document.addEventListener("hidden.bs.collapse",this.resize.bind(this));window.addEventListener("resize",this.resize.bind(this));a.on("fullScreen",m=>this.setFullScreenMode(m));a.on("toolbarStyleChange",m=>{Y(ka)(c).toggleClass("chickenpaint-toolbar-style-old","old"===m)});a.on("unsavedChanges", -m=>{Y(ka)(c).toggleClass("chickenpaint-unsaved",m)});setTimeout(this.resize.bind(this),0)}function Vh(a){var c=Y(ka)('