Issue 53: possible to change direction of arrows in gallery?
Status:  Fixed
Owner: ----
Closed:  Sep 2008
Reported by kneid...@gmail.com, Jul 23, 2008
Hi folks

i am usign this on a Hebrew page,s which flows from right to left, so the 
arrows actually function the wrong way - moving the right arrow, takes you 
to the next pictures, which is on the left
so its not so intuative.

is ther a way to swap around the actions, so the left takes you next and 
right takes you previous?

thanks!
Snoop

 
Jul 23, 2008
Project Member #1 william....@gmail.com
the code that does that is here
// Wrap the content and update the modal size if needed
	function wrapContent() {
		debug('wrapContent');
		
		var wrap = $(currentSettings.wrap[currentSettings.type]);
		modal.content.append(wrap.children().remove());
		modal.contentWrapper.wrapInner(wrap);
		
		if (currentSettings.type == 'gallery') {
			// Set the action for the next and prev button (or remove 
them)
			var gallery = $('[rel="'+currentSettings.from.rel+'"]');
			var currentIndex = gallery.index(currentSettings.from);
			if (currentIndex > 0) {
				var linkPrev = gallery.eq(currentIndex-1);
				$('.nyroModalPrev', modal.contentWrapper)
					.attr('href', linkPrev.attr('href'))
					.click(function(e) {
						e.preventDefault();
						linkPrev.nyroModalManual
(currentSettings);
						return false;
					});
			} else {
				$('.nyroModalPrev', modal.contentWrapper).remove();
			}
			if (currentIndex < gallery.length-1) {
				var linkNext = gallery.eq(currentIndex+1);
				$('.nyroModalNext', modal.contentWrapper)
					.attr('href', linkNext.attr('href'))
					.click(function(e) {
						e.preventDefault();
						linkNext.nyroModalManual
(currentSettings);
						return false;
					});
			} else {
				$('.nyroModalNext', modal.contentWrapper).remove();
			}
		}
		
		calculateSize();
	}

this is a function we are not given the option to overwrite.  what could be done is 
u edit the .js file to invert the ordering on that or in the future hopefully those 
two if statments can be made into function that we can overrride
Jul 23, 2008
#2 kneid...@gmail.com
thanks for this.
i had another idea - what about swapping around the styles in the CSS - between the 
prev/next classes?
Jul 24, 2008
Project Member #3 william....@gmail.com
yea that might work.
Jul 28, 2008
#4 kneid...@gmail.com
it works, this can be closed.
thanks
Aug 27, 2008
Project Member #5 nyro...@gmail.com
Hi kneidels,
What about the keyboard arrow? Should they also change to go to the other way than
right now?
I'm asking that because I'm looking for a way to add a setting rtf that will take
care of that (even for the button link and the keyboard arrow)
Aug 27, 2008
#6 kneid...@gmail.com
hey there

yes, i guess they should be changed - i forgot about that!
Sep 1, 2008
Project Member #7 nyro...@gmail.com
In the next release (coming soon), there will be a rtf setting, set to true by default.
By changing this value to false, the gallery will work as you described here.
Status: Fixed
Sep 14, 2008
#8 kneid...@gmail.com
thats great!

btw - what is 'rtf'? 
Sep 14, 2008
Project Member #9 nyro...@gmail.com
Oops, I misspelled it.
It will be rtl for "Right-To-Left"
Sep 14, 2008
#10 kneid...@gmail.com
:-)
Oct 22, 2008
Project Member #11 nyro...@gmail.com
this new setting is now available on the new just released 1.3.0 version
Oct 22, 2008
#12 kneid...@gmail.com
thats great news - thanks!