Page 1 of 1
Grab and grabbing icon
Posted: 11 Feb 2016, 15:31
by MikeR
Hello,
I love the fact that we can swipe (grab) the images even on desktop version, but it's impossible for the user to guess it.
What do you think about the idea of using a grab (and grabbing) cursor to show it ?
Here a example
http://appear.dk/uk/#collapsed
Thank you
Re: Grab and grabbing icon
Posted: 11 Feb 2016, 23:50
by mjau-mjau
MikeR wrote:What do you think about the idea of using a grab (and grabbing) cursor to show it ?
I don't generally agree, for two reasons: 1) There is already a zoom in/out cursor displaying by default, which insinuates to the user that they can click to zoom in/out of the photo. 2) Swipe is not a functional navigation method from mouse/trackpads on desktop devices, when the alternative is to simply use keyboard-arrows or mouse-click. Click-drag-release is tedious.
We won't be adding this as default, but you could change it by custom CSS. It would require a few extra lines though if you want to change between the "grab" and "grabbing" cursors when the visitors actually clicks down ...
Re: Grab and grabbing icon
Posted: 12 Feb 2016, 00:01
by MikeR
In my case I don't want to use zoom in/zoom out, I put small resolution images on the web
it's just a way to inform user he can swipe if he prefer, he's free to choose the best method : swipe, button, or keyboard
But yes I'm interesting on this code, for now I've added theses lines :
.pswp__img {
cursor: move; /* fallback if grab cursor is unsupported */
cursor: grab;
cursor: -moz-grab;
cursor: -webkit-grab;
}
It miss the grabbing part
thanks
Re: Grab and grabbing icon
Posted: 12 Feb 2016, 00:34
by mjau-mjau
This is a bit of a hack, because on non-touch devices, there is no "is-dragging" class added dynamically. It seems to work with the
:active pseudo class though:
.pswp__img:active {
cursor: -webkit-grabbing !important;
cursor: -moz-grabbing !important;
cursor: grabbing !important;
}
Re: Grab and grabbing icon
Posted: 12 Feb 2016, 01:03
by MikeR
it works for google chrome but not for firefox
an idea ?
Re: Grab and grabbing icon
Posted: 12 Feb 2016, 02:07
by mjau-mjau
MikeR wrote:it works for google chrome but not for firefox
Sorry, it seems the :active pseudo class does not apply for Firefox in this case. It would require some re-programming to use another ondrag event, so your options may be limited to "grab" on Firefox. At least the visitor would know they can drag ...
Re: Grab and grabbing icon
Posted: 12 Feb 2016, 02:12
by MikeR
Ok thanks
I hope you will have the time to make re-programming in a feature release, even if I understand it's not a priority
Re: Grab and grabbing icon
Posted: 12 Feb 2016, 02:38
by MikeR
For information, the grabbing icon works (even in firefox) when I zoom in a photo
https://demo.photo.gallery/galleries/fe ... pid=forest
or in the slideshow layout (without zoom-in)
https://demo.photo.gallery/galleries/food/
Re: Grab and grabbing icon
Posted: 12 Feb 2016, 03:41
by mjau-mjau
MikeR wrote:For information, the grabbing icon works (even in firefox) when I zoom in a photo
That is because the grabbing-cursor has a different, functional purpose when image is zoomed in: It allows the visitor to move the image around by grabbing it, and is therefore a built-in feature.