0?p.maxGiven0&&p.given
0?p.maxGiven
0&&p.given
100?void zog("zim build - Layout(): cannot fit regions into 100% bounds"):(M=100-f,h(),void g.resize())}for(var k=!0,H=0,L=0,d=0;d0?L+=p[m]:p.maxGiven>0?L+=p.maxGiven:p.given>0&&(L+=p.given),0==p[m]&&(k=!1);if(k||l){H+=a;var P=100-L-H;if(H-=a+i[0][w],0!=P&&0!=H)for(var d=0;d0?p.marginGiven*u[m]/100:p[w]*u[m]/100,x=p[m]>0?p[m]:p.maxGiven>0?p.maxGiven:p.given>0?p.given:0,x=x*u[m]/100,C=p[z]*u[b]/100,I=(u[b]-C)/2,A=o?e.fit(p.object,I,O,C,x):e.fit(p.object,O,I,x,C),"top"==p.valign?p.object.y=A.bY:"bottom"==p.valign&&(p.object.y=A.bY+A.bHeight-A.height),"left"==p.align?p.object.x=A.bX:"right"==p.align&&(p.object.x=A.bX+A.bWidth-A.width),r&&r.graphics&&(q.s("white").ss(2).r(A.bX,A.bY,A.bWidth,A.bHeight),q.s("#ff8203").ss(2).drawDashedRect(A.bX,A.bY,A.bWidth,A.bHeight,20)),Y=X=0,(0==O||O+x==u[m])&&(o?Y=1:X=1),C==u[b]&&(o?X=1:Y=1),""!=p.backgroundColor&&c.graphics.f(p.backgroundColor).r(A.bX,A.bY,A.bWidth+X,A.bHeight+Y),O+=x}},this.resize(),r&&t.addChild(r),t.addChildAt(c,0),window.addEventListener("keydown",l),this.disable=function(){g.active=!1,window.removeEventListener("keydown",l),r&&(r.alpha=0)},this.enable=function(){g.active=!0,window.addEventListener("keydown",l),g.resize(),r&&(r.alpha=1)},this.removeShape=function(){r&&(r.graphics.clear(),t.removeChild(r),r=null,r=!1),window.removeEventListener("keydown",l)},this.addShape=function(e){g.removeShape(),r=e,window.addEventListener("keydown",l),t.addChild(r),g.resize()},this.dispose=function(){g.removeShape()}}return h.prototype=new createjs.EventDispatcher,h.prototype.constructor=e.Layout,new h},e.LayoutManager=function(){zon&&zog("zim pages - LayoutManager");var e=this;this.items=[],this.add=function(t){e.items.push(t)},this.resize=function(){for(var t=0;t