X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=Roo%2Fbootstrap%2Fpanel%2FContent.js;fp=Roo%2Fbootstrap%2Fpanel%2FContent.js;h=93691e568a5a3f3d8bc2683a5b3138096e89825f;hp=ed26ba68dfa2d9caad5f3a52dfa868bac0494c64;hb=5ba88dd4a3a3098a79287438e6aebe26b076010d;hpb=d75026bef72394ce3d2c021d94f5b33a9cfca10b diff --git a/Roo/bootstrap/panel/Content.js b/Roo/bootstrap/panel/Content.js index ed26ba68df..93691e568a 100644 --- a/Roo/bootstrap/panel/Content.js +++ b/Roo/bootstrap/panel/Content.js @@ -172,7 +172,15 @@ Roo.bootstrap.panel.Content = function( config){ * Fires when this tab is created * @param {Roo.ContentPanel} this */ - "render" : true + "render" : true, + + /** + * @event scroll + * Fires when this content is scrolled + * @param {Roo.ContentPanel} this + * @param {Event} scrollEvent + */ + "scroll" : true @@ -183,6 +191,7 @@ Roo.bootstrap.panel.Content = function( config){ if(this.autoScroll && !this.iframe){ this.resizeEl.setStyle("overflow", "auto"); + this.resizeEl.on('scroll', this.onScroll, this); } else { // fix randome scrolling //this.el.on('scroll', function() { @@ -222,6 +231,9 @@ Roo.extend(Roo.bootstrap.panel.Content, Roo.bootstrap.Component, { iframe : false, iframeEl : false, + /* Resize Element - use this to work out scroll etc. */ + resizeEl : false, + setRegion : function(region){ this.region = region; this.setActiveClass(region && !this.background); @@ -531,6 +543,12 @@ layout.addxtype({ getChildContainer: function () { return this.getEl(); + }, + + + onScroll : function(e) + { + this.fireEvent('scroll', this, e); }