mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48: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 cardWidth = visibleWidth / 2;
|
||||||
float cardHeight = getCardHeight(cardWidth);
|
float cardHeight = getCardHeight(cardWidth);
|
||||||
float dy = cardHeight;
|
float dy = cardHeight;
|
||||||
|
float scrollHeight;
|
||||||
|
|
||||||
int rowCount = (int)Math.ceil((float)cardPanels.size() / 2f);
|
int rowCount = (int)Math.ceil((float)cardPanels.size() / 2f);
|
||||||
float totalHeight = cardHeight * rowCount;
|
float totalHeight = cardHeight * rowCount;
|
||||||
@@ -166,9 +167,11 @@ public class VZoneDisplay extends VCardDisplayArea {
|
|||||||
if (revealedPanel == null) {
|
if (revealedPanel == null) {
|
||||||
revealedPanel = cardPanels.get(cardPanels.size() - 1);
|
revealedPanel = cardPanels.get(cardPanels.size() - 1);
|
||||||
}
|
}
|
||||||
|
scrollHeight = visibleHeight;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
revealedPanel = null;
|
revealedPanel = null;
|
||||||
|
scrollHeight = rowCount * dy;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (CardAreaPanel cardPanel : cardPanels) {
|
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
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user