эм...
смещается на столька же
function setNewPosition (zoom, nWidth, nHeight) {
var i = 0;
points.each(function(index, element) {
var left = posLeft[i];
var top = posTop[i];
if (zoom) {
left *= nWidth / width;
top *= nHeight / height;
} else {
left /= zooming.width() / width;
top /= zooming.height() / height;
}
i++;
$(this).css({
left: Math.round(left) +'px',
top: Math.round(top) +'px'
});
});
}
как и тут
function setNewPosition (zoom, width, height) {
points.each(function(index, element) {
var left = parseInt($(this).css('left'));
var top = parseInt($(this).css('top'));
if (zoom) {
left *= width / zooming.width();
top *= height / zooming.height();
} else {
left /= zooming.width() / width;
top /= zooming.height() / height;
}
$(this).css({
left: Math.round(left) +'px',
top: Math.round(top) +'px'
});
});
}