src/myams/resources/js/ext/tinymce/dev/classes/ui/GridLayout.min.js
changeset 5 c9c69b13d884
parent 0 f05d7aea098a
--- a/src/myams/resources/js/ext/tinymce/dev/classes/ui/GridLayout.min.js	Wed Jul 15 15:04:38 2020 +0200
+++ b/src/myams/resources/js/ext/tinymce/dev/classes/ui/GridLayout.min.js	Wed Jul 15 15:39:56 2020 +0200
@@ -1,1 +1,1 @@
-define("tinymce/ui/GridLayout",["tinymce/ui/AbsoluteLayout"],function(a){return a.extend({recalc:function(v){var L=v.settings,K,n,o,H,c,g,t,f,G,C,B,z,w,i,k,F,l,h,e,I,q,p,E=[],b=[],r,M,j,m,A,N;L=v.settings;o=v.items().filter(":visible");H=v.layoutRect();n=L.columns||Math.ceil(Math.sqrt(o.length));K=Math.ceil(o.length/n);l=L.spacingH||L.spacing||0;h=L.spacingV||L.spacing||0;e=L.alignH||L.align;I=L.alignV||L.align;k=v._paddingBox;A="reverseRows" in L?L.reverseRows:v.isRtl();if(e&&typeof e=="string"){e=[e]}if(I&&typeof I=="string"){I=[I]}for(C=0;C<n;C++){E.push(0)}for(B=0;B<K;B++){b.push(0)}for(B=0;B<K;B++){for(C=0;C<n;C++){G=o[B*n+C];if(!G){break}f=G.layoutRect();r=f.minW;M=f.minH;E[C]=r>E[C]?r:E[C];b[B]=M>b[B]?M:b[B]}}j=H.innerW-k.left-k.right;for(q=0,C=0;C<n;C++){q+=E[C]+(C>0?l:0);j-=(C>0?l:0)+E[C]}m=H.innerH-k.top-k.bottom;for(p=0,B=0;B<K;B++){p+=b[B]+(B>0?h:0);m-=(B>0?h:0)+b[B]}q+=k.left+k.right;p+=k.top+k.bottom;t={};t.minW=q+(H.w-H.innerW);t.minH=p+(H.h-H.innerH);t.contentW=t.minW-H.deltaW;t.contentH=t.minH-H.deltaH;t.minW=Math.min(t.minW,H.maxW);t.minH=Math.min(t.minH,H.maxH);t.minW=Math.max(t.minW,H.startMinWidth);t.minH=Math.max(t.minH,H.startMinHeight);if(H.autoResize&&(t.minW!=H.minW||t.minH!=H.minH)){t.w=t.minW;t.h=t.minH;v.layoutRect(t);this.recalc(v);if(v._lastRect===null){var s=v.parent();if(s){s._lastRect=null;s.recalc()}}return}if(H.autoResize){t=v.layoutRect(t);t.contentW=t.minW-H.deltaW;t.contentH=t.minH-H.deltaH}var u;if(L.packV=="start"){u=0}else{u=m>0?Math.floor(m/K):0}var J=0;var d=L.flexWidths;if(d){for(C=0;C<d.length;C++){J+=d[C]}}else{J=n}var D=j/J;for(C=0;C<n;C++){E[C]+=d?d[C]*D:D}w=k.top;for(B=0;B<K;B++){z=k.left;g=b[B]+u;for(C=0;C<n;C++){if(A){N=B*n+n-1-C}else{N=B*n+C}G=o[N];if(!G){break}i=G.settings;f=G.layoutRect();c=Math.max(E[C],f.startMinWidth);f.x=z;f.y=w;F=i.alignH||(e?(e[C]||e[0]):null);if(F=="center"){f.x=z+(c/2)-(f.w/2)}else{if(F=="right"){f.x=z+c-f.w}else{if(F=="stretch"){f.w=c}}}F=i.alignV||(I?(I[C]||I[0]):null);if(F=="center"){f.y=w+(g/2)-(f.h/2)}else{if(F=="bottom"){f.y=w+g-f.h}else{if(F=="stretch"){f.h=g}}}G.layoutRect(f);z+=c+l;if(G.recalc){G.recalc()}}w+=g+h}}})});
\ No newline at end of file
+define("tinymce/ui/GridLayout",["tinymce/ui/AbsoluteLayout"],(function(t){"use strict";return t.extend({recalc:function(t){var n,i,e,a,r,l,o,s,c,m,h,f,u,g,H,W,y,p,R,d,M,x,v,w,b,V,_,z=t.settings,L=[],k=[];z=t.settings,e=t.items().filter(":visible"),a=t.layoutRect(),i=z.columns||Math.ceil(Math.sqrt(e.length)),n=Math.ceil(e.length/i),y=z.spacingH||z.spacing||0,p=z.spacingV||z.spacing||0,R=z.alignH||z.align,d=z.alignV||z.align,H=t._paddingBox,_="reverseRows"in z?z.reverseRows:t.isRtl(),R&&"string"==typeof R&&(R=[R]),d&&"string"==typeof d&&(d=[d]);for(m=0;m<i;m++)L.push(0);for(h=0;h<n;h++)k.push(0);for(h=0;h<n;h++)for(m=0;m<i&&(c=e[h*i+m]);m++)v=(s=c.layoutRect()).minW,w=s.minH,L[m]=v>L[m]?v:L[m],k[h]=w>k[h]?w:k[h];for(b=a.innerW-H.left-H.right,M=0,m=0;m<i;m++)M+=L[m]+(m>0?y:0),b-=(m>0?y:0)+L[m];for(V=a.innerH-H.top-H.bottom,x=0,h=0;h<n;h++)x+=k[h]+(h>0?p:0),V-=(h>0?p:0)+k[h];if(M+=H.left+H.right,x+=H.top+H.bottom,(o={}).minW=M+(a.w-a.innerW),o.minH=x+(a.h-a.innerH),o.contentW=o.minW-a.deltaW,o.contentH=o.minH-a.deltaH,o.minW=Math.min(o.minW,a.maxW),o.minH=Math.min(o.minH,a.maxH),o.minW=Math.max(o.minW,a.startMinWidth),o.minH=Math.max(o.minH,a.startMinHeight),!a.autoResize||o.minW==a.minW&&o.minH==a.minH){var q;a.autoResize&&((o=t.layoutRect(o)).contentW=o.minW-a.deltaW,o.contentH=o.minH-a.deltaH),q="start"==z.packV?0:V>0?Math.floor(V/n):0;var A=0,B=z.flexWidths;if(B)for(m=0;m<B.length;m++)A+=B[m];else A=i;var G=b/A;for(m=0;m<i;m++)L[m]+=B?B[m]*G:G;for(u=H.top,h=0;h<n;h++){for(f=H.left,l=k[h]+q,m=0;m<i&&(c=e[_?h*i+i-1-m:h*i+m]);m++)g=c.settings,s=c.layoutRect(),r=Math.max(L[m],s.startMinWidth),s.x=f,s.y=u,"center"==(W=g.alignH||(R?R[m]||R[0]:null))?s.x=f+r/2-s.w/2:"right"==W?s.x=f+r-s.w:"stretch"==W&&(s.w=r),"center"==(W=g.alignV||(d?d[m]||d[0]:null))?s.y=u+l/2-s.h/2:"bottom"==W?s.y=u+l-s.h:"stretch"==W&&(s.h=l),c.layoutRect(s),f+=r+y,c.recalc&&c.recalc();u+=l+p}}else if(o.w=o.minW,o.h=o.minH,t.layoutRect(o),this.recalc(t),null===t._lastRect){var j=t.parent();j&&(j._lastRect=null,j.recalc())}}})}));