Closed rampr closed 11 years ago
Hey rampr. I can't reproduce this. Here's my test code:
import ui.View as View; import ui.ViewPool as ViewPool;
var colors = [ 'red', 'green', 'yellow', 'blue', 'purple' ]; var sizeIndex = 0; var sizes = [ '20%', '50%', '80%' ];
exports = Class(GC.Application, function () { this.initUI = function () { var supe = new View({ superview: this, backgroundColor: 'gray', layout: 'linear', direction: 'vertical', layoutWidth: '80%', layoutHeight: '80%', centerX: true, centerY: true }); var vp = new ViewPool({ ctor: View, initCount: 5, initOpts: { layout: 'box', flex: 1 } }); supe.on('InputSelect', function() { var kids = supe.getSubviews(); if (kids.length) { kids.forEach(function(kid) { kid.removeFromSuperview(); vp.releaseView(kid); }); } else { sizeIndex = (sizeIndex + 1) % 3; supe.style.layoutWidth = supe.style.layoutHeight = sizes[sizeIndex]; for (var i = 0; i < 5; i++) { var v = vp.obtainView(); v.updateOpts({ superview: supe, backgroundColor: colors[i], visible: true }); } } }); }; });
If you are still experiencing this bug, could you please provide a test case?
Hi, I'll try creating a testcase. Maybe the steps are more complex than what I mentioned to get the bug
Hi, seems like problem is with box layout inside a parent box. here is your test case modified to create the problem. http://sprunge.us/UEPf
Thanks for the bug report. Fixed!
This particular scenario doesn't work
This has started appearing in the release-0.1.30 version of timestep. release-0.1.29 did not have this issue.