Allow overriding getReferenceClientRect in floating menu

This commit is contained in:
fleonus
2022-03-31 22:12:06 +02:00
committed by GitHub
parent 71c78ed53b
commit 285f89b5a9

View File

@@ -156,7 +156,7 @@ export class FloatingMenuView {
}
this.tippy?.setProps({
getReferenceClientRect: () => posToDOMRect(view, from, to),
getReferenceClientRect: this.tippyOptions.getReferenceClientRect || () => posToDOMRect(view, from, to),
})
this.show()