File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
- using FairyGUI ;
4
3
using UnityEngine ;
5
4
6
5
namespace FairyGUI
Original file line number Diff line number Diff line change @@ -1279,7 +1279,11 @@ void RefreshVirtualList(object param)
1279
1279
ch += _virtualItems [ i ] . size . y + _lineGap ;
1280
1280
if ( ch > 0 )
1281
1281
ch -= _lineGap ;
1282
- cw = this . scrollPane . contentWidth ;
1282
+
1283
+ for ( int i = 0 ; i < _curLineItemCount ; i ++ )
1284
+ cw += _virtualItems [ i ] . size . x + _columnGap ;
1285
+ if ( cw > 0 )
1286
+ cw -= _columnGap ;
1283
1287
}
1284
1288
else if ( _layout == ListLayoutType . SingleRow || _layout == ListLayoutType . FlowVertical )
1285
1289
{
@@ -1288,6 +1292,11 @@ void RefreshVirtualList(object param)
1288
1292
if ( cw > 0 )
1289
1293
cw -= _columnGap ;
1290
1294
ch = this . scrollPane . contentHeight ;
1295
+
1296
+ for ( int i = 0 ; i < _curLineItemCount ; i ++ )
1297
+ ch += _virtualItems [ i ] . size . y + _lineGap ;
1298
+ if ( ch > 0 )
1299
+ ch -= _lineGap ;
1291
1300
}
1292
1301
else
1293
1302
{
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Linq ;
4
- using System . Text ;
5
-
1
+
6
2
namespace FairyGUI
7
3
{
8
4
/// <summary>
You can’t perform that action at this time.
0 commit comments