-
Bug
-
Resolution: Fixed
-
Normal
-
7.0.2
-
None
-
None
How to reproduce:
1. Go to http://www.zkoss.org/zkdemo/layout/business_portal
2. Maximize any panel
3. Click add
Workaround: add the following code to zul
<script><![CDATA[ zk.afterLoad("zkmax.layout", function () { var _xPortallayout = {}; zk.override(zkmax.layout.Portallayout.prototype, _xPortallayout, { render: _zkf = function() { var cmp = this.$n(); if (!zk(cmp).isRealVisible()) return; var vert = this.isVertical(), total = vert ? cmp.offsetWidth : cmp.offsetHeight, cns = jq(cmp).find('>div:first')[0], portalChildren; for( ; cns; cns = jq(cns).next('div:first')[0]) { portalChildren = zk.Widget.$(cns.id); if (portalChildren.desktop && zkmax.layout.Portallayout.isInstance(portalChildren)) { var oriSize = portalChildren._oriSize; if (oriSize.indexOf('px') > 0) total -= vert ? cns.offsetWidth : cns.offsetHeight; } } total = Math.max(0, total); cns = jq(cmp).find('>div:first')[0]; for( ; cns; cns = jq(cns).next('div:first')[0]) { portalChildren = zk.Widget.$(cns.id); if (portalChildren.desktop && zkmax.layout.Portallayout.isInstance(portalChildren)) { var oriSize = portalChildren._oriSize; if (oriSize.indexOf('%') > 0) { cns.style[vert ? 'width' : 'height'] = jq.px0((Math.floor(zk.parseInt(oriSize) / 100 * total)) - 1); } } } }, onSize: _zkf, }); }); ]]></script>