You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
309 B
21 lines
309 B
|
3 years ago
|
let fixTop = (e) => {
|
||
|
|
var offset = e.offsetTop
|
||
|
|
if (e.offsetParent != null) {
|
||
|
|
offset += fixTop(e.offsetParent)
|
||
|
|
}
|
||
|
|
return offset
|
||
|
|
}
|
||
|
|
|
||
|
|
let fixLeft = (e) => {
|
||
|
|
var offset = e.offsetLeft
|
||
|
|
if (e.offsetParent != null) {
|
||
|
|
offset += fixLeft(e.offsetParent)
|
||
|
|
}
|
||
|
|
return offset
|
||
|
|
}
|
||
|
|
|
||
|
|
export default{
|
||
|
|
fixTop,
|
||
|
|
fixLeft
|
||
|
|
}
|