Here is the current Galleria API: http://galleria.aino.se/docs/1.2/api/methods/
Given this API, I want to display the picture I just uploaded and pushed to galleria:
Galleria.get(0).push({
image: '<%= @photo.photo.url %>',
thumb: '<%= @photo.photo.thumb.url %>',
title: '<%= @photo.title %>'
});
I was thinking about simply using the .show( index ) method, but I don’t see how to get the index without having to count the children of some container…
Do you see a way to get the index of the last picture using the api?
Thanks.
EDIT
Looking at the galleria object, I guess I could access “private” variables like _data and get the length… but if you find a better way, go ahead 😉
internals: