Filter location tags
This commit is contained in:
parent
72fda72de5
commit
62e7ccf17b
5 changed files with 93 additions and 47 deletions
|
@ -22,7 +22,7 @@ function addPopoverStyle() {
|
|||
document.querySelectorAll("[popovertarget]").forEach(e => {
|
||||
e.addEventListener("click", () => {
|
||||
const rect = e.getBoundingClientRect()
|
||||
const width = Math.floor(rect.width + 85)
|
||||
const width = 266
|
||||
const left = Math.max(Math.floor(rect.left + rect.width / 2), width / 2)
|
||||
const t = `:popover-open { position: fixed; top: ${Math.floor(rect.bottom)}px; left: ${left}px; width: ${width}px; transform: translateX(-50%); margin: 0 }`
|
||||
document.styleSheets[0].insertRule(t, document.styleSheets[0].cssRules.length)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue