using animate scrollleft on a div that has css scaling is not working properly

using animate scrollleft on a div that has css scaling is not working properly

Hi,

I got a div with multiple element stacked horizontally with a scrollbar (overflow-x:auto;overflow-y:none)
if I don't apply a scale to the div it works find to position an element center but when the div is scaled, the scrollLeft isn't centering my element so I assume that it doesn't take into accound the scale.  Any good idea or easy workaround for that ?

  1. $("#CalendarId").animate({ scrollLeft: $("#CalendarId").position().left }, 0); // This is necessary to go at the first element in the collection before going where we want below
    $("#CalendarId").animate({ scrollLeft: $("#" + Today).position().left - $("#CalendarId").width() / 2 + 80 }, 0); // Small calcul to put the today in the middle of the calendar