use of mage.view.CardView in project mage by magefree.
the class MageActionCallback method enlargeCard.
/**
* Show the big card image on mouse position while hovering over a card
*
* @param showAlternative defines if the original image (if it's a copied
* card) or the opposite side of a transformable card will be shown
*/
public void enlargeCard(EnlargeMode showAlternative) {
if (enlargedWindowState == EnlargedWindowState.CLOSED) {
this.enlargeMode = showAlternative;
CardView cardView = null;
if (popupData != null) {
cardView = popupData.getCard();
}
if (this.popupTextWindowOpen) {
hideTooltipPopup();
}
if (cardView != null) {
if (cardView.isToRotate()) {
enlargedWindowState = EnlargedWindowState.ROTATED;
} else {
enlargedWindowState = EnlargedWindowState.NORMAL;
}
displayEnlargedCard(cardView, popupData);
}
}
}
Aggregations