dimsemenov / PhotoSwipe

JavaScript image gallery for mobile and desktop, modular, framework independent
http://photoswipe.com
MIT License
24.18k stars 3.31k forks source link

gallery.getCurrentIndex() and other not working. Need an example. #806

Closed Inlesco closed 9 years ago

Inlesco commented 9 years ago

var gallery = new photoswipe(pswpEl, pswp_default_ui, items, options);

gallery.getCurrentIndex() and other properties in the documentation are not working (listed here: http://photoswipe.com/documentation/api.html) as I call them as methods? Could you provide a working example on this?

Also, how do I extend the new Photoswipe ( ); constructor to accept more values? Do I need to edit the core? I've got all of my custom Options coded into photoswipe-default-ui.js. I could post a commit for a review then.

Pswp is great and seeing its functionality expanded would be good. Thanks, Dim!

dimsemenov commented 9 years ago
var gallery = new PhotoSwipe( ...
gallery.init();

...

gallery.getCurrentIndex();