Add bottom and right properties for getCoords()

The `createMessageUnder()` function below needs the `bottom` coordinate, but it doesn't in the result of `getCoords()`.
This commit is contained in:
华晨 2020-06-13 15:36:48 +08:00 committed by GitHub
parent b52aa942a8
commit 1358b5e70f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -216,6 +216,8 @@ function getCoords(elem) {
return {
top: box.top + window.pageYOffset,
right: box.right + window.pageXOffset,
bottom: box.bottom + window.pageYOffset,
left: box.left + window.pageXOffset
};
}