using nameBlock as reference for position as it's more predictable than the root esp. with the op

This commit is contained in:
ebinBuddha 2019-04-16 07:51:58 +02:00
parent 7a2f431008
commit 6fce6cbf4f

View File

@ -50,8 +50,8 @@ PostJumper =
span
scroll: (fromID,toID) ->
prevPos = g.posts[fromID].nodes.root.getBoundingClientRect().top
destPos = g.posts[toID].nodes.root.getBoundingClientRect().top
prevPos = g.posts[fromID].nodes.nameBlock.getBoundingClientRect().top
destPos = g.posts[toID].nodes.nameBlock.getBoundingClientRect().top
window.scrollBy 0, destPos-prevPos
indexOfPair: (array,key) ->