|
@@ -121,11 +121,16 @@ const GameSmallList=({data,user})=>{
|
|
|
let rect=gridList.getBoundingClientRect();
|
|
let rect=gridList.getBoundingClientRect();
|
|
|
let gridListTop=rect.top-rectP.top;
|
|
let gridListTop=rect.top-rectP.top;
|
|
|
let height=0;
|
|
let height=0;
|
|
|
|
|
+ let gap=0;
|
|
|
if (gridList.children&&gridList.children.length>0){
|
|
if (gridList.children&&gridList.children.length>0){
|
|
|
let first=gridList.children[0];
|
|
let first=gridList.children[0];
|
|
|
- height=first.clientHeight;
|
|
|
|
|
|
|
+ let cB=rect.top+first.clientHeight;
|
|
|
|
|
+ let cH = document.documentElement.clientHeight;
|
|
|
|
|
+ if (cH-cB>90){
|
|
|
|
|
+ height=first.clientHeight;
|
|
|
|
|
+ gap=rowGap*16*fontScale;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- let gap=rowGap*16*fontScale;
|
|
|
|
|
let top=gridListTop+height+gap*2;
|
|
let top=gridListTop+height+gap*2;
|
|
|
return top;
|
|
return top;
|
|
|
}
|
|
}
|
|
@@ -268,11 +273,19 @@ const GameSmallList=({data,user})=>{
|
|
|
const renderMobileList = () => {
|
|
const renderMobileList = () => {
|
|
|
let gridStyle = {}
|
|
let gridStyle = {}
|
|
|
let len=list.length;
|
|
let len=list.length;
|
|
|
|
|
+ let roomTop=getRoomConTop();
|
|
|
if (selected !== -1) {
|
|
if (selected !== -1) {
|
|
|
- if (len<5){
|
|
|
|
|
- gridStyle.marginBottom=`${rowTop}rem`;
|
|
|
|
|
|
|
+ let top=roomTop;
|
|
|
|
|
+ if (top<50){
|
|
|
|
|
+ gridStyle.paddingTop=`${roomHeight+rowGap}rem`;
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ if (len<5){
|
|
|
|
|
+ gridStyle.paddingBottom=`${roomHeight+rowGap}rem`;
|
|
|
|
|
+ }
|
|
|
|
|
+ else gridStyle.rowGap=`${rowTop}rem`;
|
|
|
}
|
|
}
|
|
|
- else gridStyle.rowGap=`${rowTop}rem`;
|
|
|
|
|
}
|
|
}
|
|
|
return (
|
|
return (
|
|
|
<>
|
|
<>
|
|
@@ -298,7 +311,7 @@ const GameSmallList=({data,user})=>{
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
</div>
|
|
</div>
|
|
|
- <StyledRoomCon top={getRoomConTop()}>
|
|
|
|
|
|
|
+ <StyledRoomCon top={roomTop}>
|
|
|
{renderRoom()}
|
|
{renderRoom()}
|
|
|
</StyledRoomCon>
|
|
</StyledRoomCon>
|
|
|
</>
|
|
</>
|