Hi,
I wonder if it would be possible to extend the ionic.views.Slider control to achieve a carousel effect.
When using the does-continue=“true” parameter it is already possible “to carousel” the containing slides. But for a true carousel the user must always see a fragment of both preceding and following slide - see picture below:
I managed to extend the ionic.views.Slider control to achieve the effect shown above
(currently 2 lines of hard coded code):
ionic.views.Slider
function setup() {
…
// determine width of each slide
width = container.offsetWidth || container.getBoundingClientRect().width;
width = width - 300; //CAROUSEL EFFECT -> 300 has to be replaced with 2*options.carousel_offset
…
function translate(index, dist, speed) {
dist = dist + 150 //CAROUSEL EFFECT -> 150 has to be replaced with options.carousel_offset
...
Because my solution is rather a hack here my question to the community: is there a way to extend
an existing ionic control in more generic way?
Best,
famibo
Ionic is a really fantastic piece of code