A
A
all via w2019-05-08 15:14:43
JavaScript
all via w, 2019-05-08 15:14:43

How to zoom pictures with two fingers on smartphones for the gallery?

There is a site on Joomla. OrdaSoft photo gallery with jed.
When you click on the photo, it enlarges, but you cannot change its scale with your fingers.
How to achieve this, please tell me?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya Soldatenkov, 2019-05-08
@wrqqq

Touch the smartphone screen with two fingers and drag in different directions.
Train.

M
Mazino, 2019-05-08
@Mazino

I've never done this, but it seems there are touch event handlers .
In theory, you need to catch 2 'touchmove' and check that the coordinates diverge in the opposite direction from these coordinate points, and then if the conditions are zoom or anzoom. Ideally, you would still have to somehow determine the price of the distance, i.e. how close the image will be if a certain distance has been traveled from the initial points (they need to be cached).
upd: https://developer.mozilla.org/en-US/docs/Web/API/P...
upd: https://developer.mozilla.org/ru/docs/Web/CSS/touc...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question