swipecards icon indicating copy to clipboard operation
swipecards copied to clipboard

Card sometimes scales incorrectly

Open robinmanuelthiel opened this issue 7 years ago • 1 comments

When swiping very fast, the top card sometimes takes the scaling of the back card.

screen shot 2018-02-26 at 10 27 14

robinmanuelthiel avatar Feb 26 '18 09:02 robinmanuelthiel

This could be caused by the switch of cards, as this happens on the UI-Thread and might be slow.

// Switch cards if this method has been called after a swipe and not at init
if (itemIndex != 0)
{
    // Remove swiped-away card (topcard) from stack
    CardStack.Children.Remove(topCard);

    // Scale swiped-away card (topcard) down and add it at the bottom of the stack
    topCard.Scale = defaultSubcardScale;
    CardStack.Children.Insert(0, topCard);
}

robinmanuelthiel avatar Feb 26 '18 09:02 robinmanuelthiel