fixed issue with listview corner rounding when listviews have only a couple items.

This commit is contained in:
scottjehl 2010-12-01 16:35:17 -05:00
parent ce5ea07780
commit 9423bc199d

View file

@ -245,8 +245,9 @@ $.widget( "mobile.listview", $.mobile.widget, {
.end()
.find( ".ui-li-thumb" )
.addClass( "ui-corner-tl" );
self._removeCorners( item.next() );
if(item.next().next().length){
self._removeCorners( item.next() );
}
} else if ( pos === li.length - 1 ) {
itemClass += " ui-corner-bottom";
@ -259,7 +260,9 @@ $.widget( "mobile.listview", $.mobile.widget, {
.find( ".ui-li-thumb" )
.addClass( "ui-corner-bl" );
self._removeCorners( item.prev() );
if(item.prev().prev().length){
self._removeCorners( item.prev() );
}
}
}