Koloda icon indicating copy to clipboard operation
Koloda copied to clipboard

Jumping to a specific card

Open glancashire opened this issue 9 years ago • 9 comments

Dear Yalantis

First thanks for this beautiful control.

I have a minor question. Would it be possible to make the currentCardNumber settable, so I can jump to a specific card. e.g public var currentCardNumber = 0.

This seems to work if I set it and then call reload data.

Kind Regards Graham

glancashire avatar Aug 26 '15 16:08 glancashire

We'll look into this issue and may implement it in next versions.

AEugene avatar Sep 21 '15 11:09 AEugene

Hi Andrew

Thanks for getting back to me.

I really wanted the functionality of being able to jump to a specific card on loading, without deleting/recreating the cards.

Kind Regards Graham

Swift Management AG | Managing Partner St. Alban Vorstadt 104 | 4052 Basel | Switzerland [email protected] | www.swift.ch

On 23 May 2016, at 12:44, AndrewiOS [email protected] wrote:

Hi @glancashire , do following functions cover your needs? you can just remove cards between current card and the card you want to jump to.

public func insertCardAtIndexRange(indexRange: Range, animated: Bool = default) public func removeCardInIndexRange(indexRange: Range, animated: Bool)

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

glancashire avatar May 23 '16 16:05 glancashire

I've investigated the issue a bit. It's more complex than it seems at first glance There're some steps to solve the issue in a good way:

  • [ ] Encapsulate actions with Command pattern. Otherwise, it'll be too hard to revert a 'swipe 3 cards' action
  • [ ] Create one designated method for swipe actions
    • [ ] Validate preconditions
    • [ ] Handle how many visible cards should be swiped
    • [ ] Swipe visible cards and skip not visible ones
  • [ ] Update revert action

serejahh avatar Aug 11 '16 07:08 serejahh

Any updates with this? I think I the quick hack to do this is by looping until I get to the card I wish to go to.

Glenn

glennposadas avatar Aug 12 '16 05:08 glennposadas

Hi Glenn

Looping is fine if there is no visual effect and it can be done before displaying.

Kind regards

// Graham Lancashire

On 12.08.2016, at 06:25, Glenn Posadas [email protected] wrote:

Any updates with this? I think I can the quick hack to do this is by looping until I get to the card I wish to go to.

Glenn

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

glancashire avatar Aug 12 '16 05:08 glancashire

Hi @glancashire you're right. Any other way to implement this while the developers are working on it?

glennposadas avatar Aug 12 '16 10:08 glennposadas

Dear Yalantis

First thanks for this beautiful control.

Would it be possible to make the currentCardNumber settable? I want make a 'skip' action without animation.

It's posible? Regards

dvelasquezmahisoft avatar Mar 20 '17 22:03 dvelasquezmahisoft

Dear Yalantis,

I have a one question. Can possible move to specific card in this version?

Thanks Kind Regards Jay

bhadjajay23 avatar Oct 26 '17 06:10 bhadjajay23

is skipping or jumping to specific feature implemented in new version 4.5.1 ?

yatindma avatar Nov 19 '18 08:11 yatindma