R
R
Rad1calDreamer2016-03-09 12:39:29
css
Rad1calDreamer, 2016-03-09 12:39:29

How does position:fixed and zoom work on touch devices?

Actually there are a bunch of blocks with a fixed position and the ability to drag them. At scale 1 it works fine. But if you make a zoom, then visually they will be pulled into the visible area (should it be?) and when you try to drag, the movement will start from the place that it was at a scale of 1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shcherbakov, 2016-03-09
@WestTrade

You started from the wrong place to build logic. In this case, the calculation of the position of the blocks should be calculated in JS based on the screen size (windows.width / windows.height / current scale position).
When rebuilding the zoom - accordingly calculate the coordinates and sizes of the blocks, assign them new values.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question