next / previous RTL direction - keyboard arrows !

Phoca Gallery - image gallery extension
sofian
Phoca Member
Phoca Member
Posts: 26
Joined: 09 Sep 2022, 09:47

next / previous RTL direction - keyboard arrows !

Post by sofian »

hi
my site is
RTL direction
i converted the next / previous on the screen that the left is on right and the right is on left and it works ok .

But the next / previous keyboard arrows still works LTR .
how can i convert it with css or javascript code .
thanks.

Image
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48714
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: next / previous RTL direction - keyboard arrows !

Post by Jan »

Hi, where exactly did you change it, for some specific Popup method?

Jan
If you find Phoca extensions useful, please support the project
sofian
Phoca Member
Phoca Member
Posts: 26
Joined: 09 Sep 2022, 09:47

Re: next / previous RTL direction - keyboard arrows !

Post by sofian »

Jan wrote: 16 Sep 2022, 16:50 Hi, where exactly did you change it, for some specific Popup method?

Jan
i added this css code to my custom css file :

Code: Select all

.pswp__button.pswp__button--arrow--right{left: 0;right: auto;}
.pswp__button.pswp__button--arrow--left{right: 0;left: auto;}
now i need same direction on keyboard left and right arrows .
Jan wrote: 16 Sep 2022, 16:50 for some specific Popup method?
i dont have any info about Popup method !
how many Popups has phoca gallery ? i dont know about this .
christine
Phoca Hero
Phoca Hero
Posts: 2887
Joined: 28 Nov 2010, 17:20

Re: next / previous RTL direction - keyboard arrows !

Post by christine »

Hi sofian,
sofian wrote: 16 Sep 2022, 17:22

i added this css code to my custom css file :

Code: Select all

.pswp__button.pswp__button--arrow--right{left: 0;right: auto;}
.pswp__button.pswp__button--arrow--left{right: 0;left: auto;}
It appears to be photoswipe.

i dont have any info about Popup method !
how many Popups has phoca gallery ? i dont know about this .
PG > Options > Detail View > Detail Window > there are 5 methods. (Joomla 4)

About the keyboards: I don't know

Kind regards
Christine
sofian
Phoca Member
Phoca Member
Posts: 26
Joined: 09 Sep 2022, 09:47

Re: next / previous RTL direction - keyboard arrows !

Post by sofian »

christine wrote: 16 Sep 2022, 18:30
It appears to be photoswipe.

PG > Options > Detail View > Detail Window > there are 5 methods. (Joomla 4)

About the keyboards: I don't know

Kind regards
Christine
yes it is photoswipe .
Image
sofian
Phoca Member
Phoca Member
Posts: 26
Joined: 09 Sep 2022, 09:47

Re: next / previous RTL direction - keyboard arrows !

Post by sofian »

this is the code that do the arrows slide :
media\com_phocagallery\js\photoswipe\js\photoswipe.min.js

Code: Select all

Xa=function(a){var b="";i.escKey&&27===a.keyCode?b="close":i.arrowKeys&&(37===a.keyCode?b="prev":39===a.keyCode&&(b="next"))
i want to add this code to my custom js file :

Code: Select all

document.addEventListener('keydown', function(event) {
    if(event.keyCode == 37) {
       next image.....
    }
    else if(event.keyCode == 39) {
      prev image ..... 
    }
});
i just need to complete the final code .
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48714
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: next / previous RTL direction - keyboard arrows !

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
sofian
Phoca Member
Phoca Member
Posts: 26
Joined: 09 Sep 2022, 09:47

Re: next / previous RTL direction - keyboard arrows !

Post by sofian »

Jan wrote: 17 Sep 2022, 13:30Ok
it not solved yet .
sofian wrote: 17 Sep 2022, 00:35 i just need to complete the final code .
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48714
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: next / previous RTL direction - keyboard arrows !

Post by Jan »

Hi, OK (I understand), if you will solve it will be great to get updated solution here.
I think, the original version of the JS should be taken, not the minified and the changes should be done directly there :idea:
Jan
If you find Phoca extensions useful, please support the project
Post Reply