3 ms·
Why does the adjusted function use pixels as a unit of measurement when the objective is to make the position of each 'click zone' show correctly? Is that not w
by chrisacky 7y ago
Why does the adjusted function use pixels as a unit of measurement when the objective is to make the position of each 'click zone' show correctly? Is that not was percentages are for? ie. You have
var steps = [
['/img/flow/click-users.png', [1, 280]],
['/img/flow/click-header.png', [765, 155]],
Where the array is x,y coords in pixels? Why would you not use percentages instead for the top and left offsets? I see your adjusted function is getting the correct offset for the screen aspect ratio, but wouldn't you get the same result on percentages?
- tagspace 7y agohey chrisacky. I think you're totally right. Would probably have been much simpler using percentages. When I was building it I just wanted to get it working for a fixed width and height. Then did the adjusted function when we decided we were actually going to use it, and it needed to work on mobile.