Improve status div positioning
This commit is contained in:
parent
953d0ef548
commit
e8b1ab94d9
11
service2.js
11
service2.js
@ -308,10 +308,13 @@ class BesService {
|
|||||||
*/
|
*/
|
||||||
setStatusDivPosition() {
|
setStatusDivPosition() {
|
||||||
const rect = this.hostElement.getBoundingClientRect()
|
const rect = this.hostElement.getBoundingClientRect()
|
||||||
const scrollLeft = window.scrollX || document.documentElement.scrollLeft
|
const parentRect = this.hostElement.parentElement.getBoundingClientRect()
|
||||||
const scrollTop = window.scrollY || document.documentElement.scrollTop
|
const scrollbarWidth =
|
||||||
this.statusDiv.style.left = `${rect.right - 40 + scrollLeft}px`
|
this.hostElement.offsetWidth - this.hostElement.clientWidth
|
||||||
this.statusDiv.style.top = `${rect.bottom - 30 + scrollTop}px`
|
this.statusDiv.style.left = `${
|
||||||
|
rect.right - parentRect.left - 40 - scrollbarWidth
|
||||||
|
}px`
|
||||||
|
this.statusDiv.style.top = `${rect.bottom - parentRect.top - 30}px`
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user