Auto scroll through ag-grid unpinned rows is working but I need this plunkr to loop once it hits the bottom - ag-grid

I have this plunkr I have been messing with that is basically a test of my first use of ag-grid. I started off wanting the following:
Use ag-grid for the first time - done
Sort Array of data based on count, then name - done
Pin Top 5 Results at the Top - done
Auto Scroll slowly (controllable) through bottom "unpinned" results - kind of done (works in edit mode of plunkr but in just the url view mode it just jumps to the bottom... see below for workaround)
Loop back to the top SMOOTHLY once it hits the bottom where it has the appearance of just flowing like a wheel turns - this is where I am lost.
So my problem is, I dont know how to tell it has hit the bottom of the scrollable area and be able to flow the UI to give the appearance as much as possible that it didnt skip a beat and just restarted scrolling from the top in an endless loop. Here is my plunkr https://next.plnkr.co/plunk/J2s7Aeyp2Yr3BefC
Really as long as the "animation" looks nice and smooth I can probably live with it, Im just looking for any help.
WORKAROUND: To see the scroll work if it just jumped to the bottom, hit the red minus button a few times and it will scroll up at that rate, then once at the top just hit the blue plus a few times to make it a positive number and it should scroll smoothly to the bottom.
Thanks for any help

I figured it out, you can look at my plunkr for the working model of looping through the scroll.

Related

Continuously scrolling UI Unity

So I am working working on something in unity (2d game). I have a list of button (UI) on my scene and I want to implement a scrolling mechanism. What is the best way to go about it? Currently , I can scroll through horizontally because I have added a "scroll rect" to the the canvas holding the buttons as I start the game. However when I try to scroll back (horizontally, it goes beyond the Buttons. Is there a way to make the scrolling continuous such that as I scroll, from the first UI element when I get to the last one and I keep scrolling, it continues with the first element. or what should I do. please let me Know If i should clarify.
In the Scroll rect you can set the movement type. I don't think the kind of "infinite scroll" you are asking for is available.
For your case, I think that the Use Elastic or Clamped mode to force the content to remain within the bounds of the Scroll Rect should do the work.
In the case of the infinite scroll specifically needed, you would need to ask for that explicitely and show your attempt for more specific help.

TVanimationsGestures Sample code Bug/Weird Behavior Overlapping Cells

Im trying to implement a nice accordion effect on my app. My goal is to "open up" a cell when the user tap on it, diplaying additionnal content (such as text) as the cell height increase.
The perfect sample code for that is the TableView Animations & Gestures sample code provided by Apple. However I am experiencing a strange behavior, that ruins the whole effect.
It appears that depending on the order in which the tableview will display its cells (top --> Bottom or Bottom-->up) the cells textviews will overlap each other or not.
As its a bit difficult to explain with word so here is it with images.
Those screenshots were taken from the TVAnimationsGestures Sample Code, without any changes made to it. It comes from the first version of the sample code without storyboard:
Now the version with the storyboard, first behaved well, but after a while, and without me touching the code it started drawing this :
And I have the exact problem on my custom with my custom cells.
It took me a while to understand what I think the problem comes from. If cells are drawn from the Top cell to the bottom, there is no such problem. However if cells are drawn bottom to the top, they will stack in reverse and therefore overlap each other. I don't think it is possible to control this behavior.
What gave me the hint, is that when I scroll down, forcing the top cell to redraw, they actually redraw nicely, and the screen looks like this:
A Mixture of overlapping cells and "good" cells.
Again, this all comes directly from Apple sample code, without any changes.
Does anyone knows whats going on?
Thanks a lot for your help.
You can increase the cell height by pinching on the cell.

Fully Customize UIPIckerView?

Target: To give feel like casino scrollers.
Description: I want to make a scroller which will start automatically as i click any button... which scroll with maximum speed and slow down speed and stop after certain speed just like you must have seen in Casino scrolls.
I am not allowed to use UIPickerView
Can any one please guide me so that i can complete this task
Thanks
I know this is the heck solution.
If you want to scroll on button clickable (then you would be knowing which position to stop) so you can always use
selectRow:inComponent:animated:
Selects a row in a specified component of the picker view. so you can animate that scroll by selecting row on unwanted position and after some time(you can use timer once the timer is done) select the row at wanted position.
You could use a UIScrollView with a very large content size and a repeating pattern inside it. You'd probably need extra code to make it only come to a stop at appropriate points. To avoid ever hitting the end of the scroll view, you could jump back up by the length of the repeating pattern whenever you get a chance.

Scrollviews and Cocos2D

I'm trying to develop a scrollable tile map in Cocos2D which uses an UIPanGestureRecognizer to do the dirty work, but while developing it, stumbled upon some problems for which I would like to ask for an advice.
The basic scrolling management works fine, it's precise and accurate and works by adding the translation recognized by the pan gesture manager to the tiles of the map. The problem is that the map is large and I just draw a small viewport of it, while I want to manage it like it's scrollable without any problem.
What I was thinking about is that, as soon as a whole row or column get out of the visible screen, it is moved to the opposite side, the corresponding texture rects are updated (I'm working entirely with a CCSpriteBatchNode), so that it will continuously update the viewport to make the whole thing work. This seems fine but I've found many problems in dealing with when to move the row/column, how to keep track of this issue (eg when pan changes direction from forth to back) and many little details which make me think that I should find a better approach.
Is there a common solution to my problem? That is: managing a scrollable viewport of a tilemap which should move over the whole map so the to the end user it seems like as if the map is infinite.
Thanks in advance
I solved my issue by developing a viewport in which rows and columns are effectively moved from left side to right side and from top side to bottom side.
This is done automatically when a new column or row enters the viewport and it's made by expanding the drawn viewport over the real one by an amount which is enough to avoid any graphical issue to the user.

Ancient Message Scroll Animation idea

I'm looking for some animation ideas to open and close this ancient scroll..
Anybody has any idea about it??
I've never done iPhone animation, but I've done just this in Flash. I'm assuming that the method would be pretty similar.
Cut out the rolled section of the scroll and place on a layer above the unrolled section of the scroll. Mask out the unrolled section of the scroll so you can't see it. Place the two rolled sections next to each other and then as you move them apart, unmask the unrolled portion such that it unmasks at the same rate the scrolled section is moving.
How about a animated hand, grabbing the scroll, and using drag to open and close.
Or an animated wand, that taps the scroll, indents the parchment, and hey presto it opens or closes.