Reduce back-to-back resize requests by cancelling the timeout before setting it again

This commit is contained in:
Nathan Gray 2016-02-11 20:20:46 +00:00
parent 4e7521a33a
commit 3ebfe5d650

View File

@ -142,7 +142,12 @@ etemplate2.prototype.resize = function(e)
//@TODO implement getaccess height for other framework and remove //@TODO implement getaccess height for other framework and remove
if (typeof event != 'undefined' && event.type == 'resize') if (typeof event != 'undefined' && event.type == 'resize')
{ {
setTimeout(function(){ if(this.resize_timeout)
{
clearTimeout(this.resize_timeout);
}
this.resize_timeout = setTimeout(function(){
self.resize_timeout = false;
if (self.widgetContainer) if (self.widgetContainer)
{ {
var appHeader = $j('#divAppboxHeader'); var appHeader = $j('#divAppboxHeader');