成功定位坐标

This commit is contained in:
john 2019-02-09 11:09:56 +08:00
parent 82c1e640a7
commit cb01fafe3f
5 changed files with 41 additions and 1 deletions

View file

@ -244,6 +244,10 @@ ConversationPageState.prototype = {
}
return value;
},
getAnchorTargetY: function(id) {
let anchorTarget = document.getElementById(id);
return anchorTarget.getBoundingClientRect().top+document.documentElement.scrollTop;
},
linkClicked: function(link) {
let cancelClick = false;
let href = link.href;