Commit 68a9ac92 authored by Tae Hoon's avatar Tae Hoon

refactoring

parent 272da5d8
......@@ -85,19 +85,13 @@ const FloatingPostButton = {
}
},
checkHoverInlineReply () {
for (let i = 0; i < this.postStatusForms.length; i++) {
const rect = this.postStatusForms[i].getBoundingClientRect()
if (
rect.bottom > window.innerHeight + buttonRect.bottom - buttonRect.height &&
this.hoverInlineReply = this.postStatusForms.some(form => {
const rect = form.getBoundingClientRect()
return rect.bottom > window.innerHeight + buttonRect.bottom - buttonRect.height &&
rect.right > window.innerWidth + buttonRect.right - buttonRect.width &&
rect.bottom - rect.height < window.innerHeight + buttonRect.bottom &&
rect.right - rect.width < window.innerWidth + buttonRect.right
) {
this.hoverInlineReply = true
return
}
}
this.hoverInlineReply = false
})
},
handleScrollStart: debounce(function () {
if (window.scrollY > this.oldScrollPos) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment