Any idea how to implement (or at least, which should be the pieces of the puzzle for) something like this on Ionic? Namely, like in FourSquare, having on top a map, below a list of places (possibly pointed out in the map) and by pulling down getting the map enlarged and zoomed in?
cheers
I don’t get 404 if I click your url with the /shrinking-header suffixed but if you try just ionicframework.com/demos to get a listing of avail demos it does 404 assume there is no index.html with a listings page.
@mhartington It works great! A really helpful basis, thanks.
There would be some extra features in order to mimic foursquare’s views (they seemed to me general enough the be mentioned in the forum). I will list list them below. The first two seem to me easy, and I should probably solve them by myself. But the last to look harder and any help/suggestion would be much appreciated.
By default, the map should be shrinked at its minimum size (not maximum). This should be easy.
When the map is rolled out at its maximum size, it zooms-in in a little bit automatically. This should be also easy.
In foursquare, when I shrink the map, it dinamically resizes. in other words, it maintains the red flag always in the middle, while in the example above it is static. This seems harder to implement.
There should be just two positions when the drag is released, namely minimum os maximum map size. If the dragging ends before reaching one of the two end positions, it should automatically go for one of the two options (e.g., by picking the nearest). This is done with an animation that continues the dragging for the user up to the end position. This seems also harder to me.
@mhartington: Hei, probably a very trivial question, but in the codepen below I’ve combined tabs and your example on map scrolling, so that each tab has its own map and item list. The problem is that as soon as I switch from one tab to the other I loose the shrinking.
I just did a screen cast and got this. The scroll position won’t be remembered from tab 1 to tab 2 because each tab is it’s own separate view/history. What you are describing is the default behavior.
(I meant the shrinking capability. If you notice, also in your screen cast once you switch to the second tab, the map does not shrink anymore. And the capability isn’t there for each of the three tabs)