events: don't trigger resize on invisible (height||width==0) elements
This commit is contained in:
parent
5f080e2c66
commit
d35c67ef01
1 changed files with 2 additions and 2 deletions
|
|
@ -13,11 +13,11 @@ function checkResizes(context){
|
|||
width = parseInt(style['width']) - parseInt(style['padding-left']) - parseInt(style['padding-right']),
|
||||
height = parseInt(style['height']) - parseInt(style['padding-top']) - parseInt(style['padding-bottom'])
|
||||
|
||||
if (!width) continue
|
||||
if (!width || !height) continue
|
||||
|
||||
// If element size has changed since the last time, update the element
|
||||
// data store and trigger the 'resize' event.
|
||||
if ( width != elem.resizedataw || height != elem.resizedatah ) {
|
||||
if (width != elem.resizedataw || height != elem.resizedatah) {
|
||||
elem.resizedataw = width
|
||||
elem.resizedatah = height
|
||||
resizedElems.push(elem)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue