mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Prevent ability to scroll slightly
This commit is contained in:
@@ -155,6 +155,7 @@ public class VZoneDisplay extends VCardDisplayArea {
|
||||
float cardWidth = visibleWidth / 2;
|
||||
float cardHeight = getCardHeight(cardWidth);
|
||||
float dy = cardHeight;
|
||||
float scrollHeight;
|
||||
|
||||
int rowCount = (int)Math.ceil((float)cardPanels.size() / 2f);
|
||||
float totalHeight = cardHeight * rowCount;
|
||||
@@ -166,9 +167,11 @@ public class VZoneDisplay extends VCardDisplayArea {
|
||||
if (revealedPanel == null) {
|
||||
revealedPanel = cardPanels.get(cardPanels.size() - 1);
|
||||
}
|
||||
scrollHeight = visibleHeight;
|
||||
}
|
||||
else {
|
||||
revealedPanel = null;
|
||||
scrollHeight = rowCount * dy;
|
||||
}
|
||||
|
||||
for (CardAreaPanel cardPanel : cardPanels) {
|
||||
@@ -183,7 +186,7 @@ public class VZoneDisplay extends VCardDisplayArea {
|
||||
}
|
||||
}
|
||||
|
||||
return new ScrollBounds(visibleWidth, cardHeight + (rowCount - 1) * dy);
|
||||
return new ScrollBounds(visibleWidth, scrollHeight);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user