We just released a big update to Galleria version 1.2.4 including many new features, optimizations and bug fixes. Here are some of the most important new features, for a full changelog, visit the docs.
Mobile improvements
This version greatly improves the mobile experience in general by adding swipe gestures, CSS3 animations, double tap fullscreen toggle and much more. We also optimized each theme for touch devices. iOS now uses transform3d for many animations that brings true hardware accelerated animations on iPhone and iPad.
Error handling
This version also improves error handling and now prints out human errors when the gallery fails to load. We changed the way we work with the debug parameter, now debug is true by default, wich makes the Gallery print out all warnings and errors in the Gallery container. If you turn debug off, the gallery simply prints a generic message that the gallery failed to load. To turn debug off for deployment, simply pass debug:false as an option.
Flickr Plugin (MIT)
We added the Flickr plugin to the github repo, and licensed it as MIT, wich means that it is absolutely free to use and abuse. The Flickr plugin adds som really simple galleria options for fetching galleries, sets, search results or user streams from Flickr into a Galleria container:
$('#galleria').galleria({
flickr: 'search:dogs'
});
$('#galleria').galleria({
flickr: 'set:123456',
flickrOptions: {
sort: 'date-posted-asc'
}
});
The plugin and a small demo is now included in the Galleria download. We are working on setting up more examples online.
Full documentation here: Galleria Flickr documentation
Code at GitHub: Galleria Flickr @ GitHub.
Canvas scaling of thumbnails
As previously mentioned we are experimenting with alternate scaling methods on the client to speed up the user experience. On of those techniques is the use of Canvas for modern browsers that supports it (Chrome, FF, IE9, Opera). If you feel that your thumbnail interaction is getting sluggish, try passing useCanvas:true when calling Galleria.
Galleria.ready
We added a new static method to make it easier to add custom logic into each gallery instance. You can now use Galleria.ready to bind functions that should be called when the gallery is ready instead of the extend option for each caller:
$('#galleria').galleria();
Galleria.ready(function(options) {
this.bind('image', function(e) {
Galleria.log('image ' + e.index + ' is showing!');
});
});