mirror of https://github.com/logseq/logseq
fix: decrease Object Action Bar distance when below portal
parent
0d520265ef
commit
9f66c25240
|
@ -29,7 +29,7 @@ const _ContextBar: TLContextBarComponent<Shape> = ({ shapes, offsets, hidden })
|
|||
const elm = rContextBar.current
|
||||
if (!elm) return
|
||||
const size = rSize.current ?? [0, 0]
|
||||
const [x, y] = getContextBarTranslation(size, { ...offsets, bottom: offsets.bottom - 32 })
|
||||
const [x, y] = getContextBarTranslation(size, offsets)
|
||||
elm.style.setProperty('transform', `translateX(${x}px) translateY(${y}px)`)
|
||||
}, [offsets])
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ export function getContextBarTranslation(barSize: number[], offset: TLOffset) {
|
|||
let y = 0
|
||||
if (offset.top < 116) {
|
||||
// Show on bottom
|
||||
y = offset.height / 2 + 72
|
||||
y = offset.height / 2 + 40
|
||||
// Too far down, move up
|
||||
if (offset.bottom < 140) {
|
||||
y += offset.bottom - 140
|
||||
|
|
Loading…
Reference in New Issue