onSize is calculated twice when borderlayout's region with "flex=true"

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Normal
    • 6.5.0
    • Affects Version/s: 6.0.1
    • Component/s: Components
    • None

      For example,

      <zk>
      	<script>
      	zk.load('zul.mesh', function () {
      	var _meshWidget = {}
      	zk.override(zul.mesh.MeshWidget.prototype, _meshWidget, {
      		_calcSize: function () {
      			zk.log(this.uuid);
      			_meshWidget._calcSize.apply(this, arguments); //call the original method
      		}
      	});
      	});
      	</script>
      	<borderlayout>
      		<center flex="true">
      			<listbox>
      				<listitem label="1" />
      				<listitem label="2" />
      				<listitem label="3" />
      				<listitem label="4" />
      			</listbox>
      		</center>
      	</borderlayout>
      </zk>
      

      The issue is that, the flex of LayoutRegion with true will specify the child component to be vflex=true and hflex=true, and then the SelectWidget will trigger this.onSize() when invoking setVflex() and setHflex() functions in the SelectWidget.js

            Assignee:
            vincentjian
            Reporter:
            jumperchen
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: