Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2117

South does not calculate correct size

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Later Later
    • 7.0.1
    • 7.0.0
    • Components
    • Security Level: Jean

      soth does not calculate it size if open state is false in the beginning and child components are set to use vflex="min"

      <zk xmlns:h="native">
      	<zscript><![CDATA[
      		public void slideOpen() {
      			south.invalidate();
      			Clients.evalJavaScript("var wgt=zk.Widget.$('" + south.getUuid() + "'); wgt.doClick_(new zk.Event(wgt, 'onClick', {domTarget: wgt.$n('colled')}))");
      		}
      		]]>
      	</zscript>
           <borderlayout vflex="1" hflex="1">
           	<center>
           		<hlayout>
      	     		<button onClick="south.invalidate(); south.setOpen(true);">Click to setOpen(south)</button>
      	     		<button onClick="slideOpen();">Click to slide open (south)</button>
           		</hlayout>
           	</center>
               <south id="south" border="normal" title="Container Detail" collapsible="true" open="false" cmargins="0,0,0,0" margins="0,0,0,0" hflex="min">
                   <window mode="embedded" border="none" vflex="min" hflex="1" id="edit_FORM_CONTAINER_DETAILS">
                       <div vflex="min" hflex="min" id="FORM_CONTAINER_DETAILS" style="background:yellow">
                       	<label value="label"></label>
                       	<label value="label"></label>
                       	<label value="label"></label>
                       	<label value="label"></label>
                       	<label value="label"></label>
                       </div>
                   </window>
               </south>
           </borderlayout>
      </zk>
      

      Steps to reproduce
      1. click on "Click to slide open(south)" button or click on the splitter bar at the bottom

      Expected: South size should be just enough to occupy its contents
      Actual: South size is bit bigger than its contents

      Note:
      1. If you open the south region by clicking first button the size is correct. We re-render south on setOpen I think.
      2. This case also doesn't work for ZK5/6/6.5

            jumperchen jumperchen
            ashishd ashishd
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: