I need to show real sizes of objects on screen (1mm - 20mm). At the top, I have a button "Calibrate view". I click it and a modal opens where user can calibrate view using a credit card (Put it on screen, and using + and - buttons, he adjusts the slider until the lines matches credit's height). User submit calibration. After this, for every element I run a function:
Credit card width is 85.6mm;
card__pad - is the container that has at the bottom and on top lines, that user need to match with credit's height;
function mmToPx(mm) {
return parseFloat($('.card__pad').width()) * mm / 85.6
}
// 20 mm show
$('.obj').css('width', mmToPx(20))
This code works perfectly on Desktop and Android (at least tested with my phone), but on Apple device, object doesn't look 20mm, but a little smaller. Tell me please what is wrong here, what need to be used for showing correct size on Apple devices??