JS scroll to center with flex reverse

Hi intresting moment which i didnt find in google.

How i can scroll to vertical center with flex reverse ?

Problem in example:

i have temp1.scrollHeight = 1000

but in top position of scroll property temp1.scrollTop return
‘-940’ (not -1000)

i think it calculate how scrollHeight-minus selft scroll element height:

enter image description here

How i can center scroll?
(temp1.scrollTop / 2) return 470px not 500px !