1Ext.layout.FloatLayout = Ext.extend(Ext.layout.ContainerLayout, { 2 setContainer: function(ct){ 3 var ce = ct.getLayoutTarget(); 4 this.padding = this.parseMargins(this.padding || '0'); 5 this.padding.top += ce.getPadding('t'); 6 this.padding.left += ce.getPadding('l'); 7 Ext.layout.FloatLayout.superclass.setContainer.apply(this, arguments); 8 ct.addClass('ux-float-layout-ct'); 9 }, 10 11 renderAll: function(ct){ 12 var ce = this.container.getLayoutTarget(), nh; 13 this.cw = ce.getWidth(true) + ce.getPadding('r'); 14 this.top = this.padding.top; 15 this.left = this.padding.left; 16 this.contentHeight = 0; 17 this.rowHeight = 0; 18 Ext.layout.FloatLayout.superclass.renderAll.apply(this, arguments); 19 this.contentHeight += this.rowHeight; 20 if ((nh = this.contentHeight + this.padding.top + this.padding.bottom + ce.getPadding('tb')) != ct.getHeight()) { 21 ct.setHeight(nh); 22 ct.ownerCt && ct.ownerCt.doLayout(); 23 } 24 }, 25 26 renderItem: function(c, position, target){ 27 var r = c.rendered, e, p, pe, w, nextLeft; 28 delete c.removeMode; 29 Ext.layout.FloatLayout.superclass.renderItem.apply(this, arguments); 30 e = c.getPositionEl(); 31 if (!r) { 32 e.setStyle('position', 'absolute'); 33 } 34 w = e.getWidth(); 35 36 // Wrap to the next line if necessary 37 if (this.left + w > this.cw) { 38 this.left = this.padding.left; 39 this.top += this.rowHeight; 40 this.contentHeight += this.rowHeight; 41 this.rowHeight = 0; 42 } 43 e.setStyle({ 44 top: this.top + 'px', 45 left: this.left + 'px' 46 }); 47 this.rowHeight = Math.max(this.rowHeight, e.getHeight() + e.getMargins('tb')); 48 49 // Move onwards 50 this.left = this.left + w; 51 }, 52 53 isValidParent: function(){ 54 return false; 55 } 56}); 57Ext.Container.LAYOUTS['float'] = Ext.layout.FloatLayout;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.