Skip to content

Inner working of the menu machine #227

Answered by anubra266
suimong asked this question in Q&A
Discussion options

You must be logged in to vote

@suimong

middleware.push(transformOrigin)
middleware.push(
size({
padding: options.overflowPadding,
apply({ rects, availableHeight, availableWidth }) {
const referenceWidth = Math.round(rects.reference.width)
floating.style.setProperty("--reference-width", `${referenceWidth}px`)
floating.style.setProperty("--available-width", `${availableWidth}px`)
floating.style.setProperty("--available-height", `${availableHeight}px`)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by suimong
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants