kopia lustrzana https://github.com/Tldraw/Tldraw
Restores context menu
rodzic
f8b5906520
commit
e45977167a
|
@ -54,7 +54,7 @@ interface ContextMenuProps {
|
|||
children: React.ReactNode
|
||||
}
|
||||
|
||||
export const ContextMenu = React.memo(({ children }: ContextMenuProps): JSX.Element => {
|
||||
export const ContextMenu = ({ children }: ContextMenuProps): JSX.Element => {
|
||||
const { tlstate, useSelector } = useTLDrawContext()
|
||||
const hasSelection = useSelector(has1SelectedIdsSelector)
|
||||
const hasTwoOrMore = useSelector(has2SelectedIdsSelector)
|
||||
|
@ -225,7 +225,7 @@ export const ContextMenu = React.memo(({ children }: ContextMenuProps): JSX.Elem
|
|||
</RadixContextMenu.Content>
|
||||
</ContextMenuRoot>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
function AlignDistributeSubMenu({
|
||||
hasThreeOrMore,
|
||||
|
@ -305,7 +305,6 @@ function AlignDistributeSubMenu({
|
|||
<SpaceEvenlyHorizontallyIcon />
|
||||
</ContextMenuIconButton>
|
||||
)}
|
||||
|
||||
<ContextMenuIconButton onSelect={alignTop}>
|
||||
<AlignTopIcon />
|
||||
</ContextMenuIconButton>
|
||||
|
|
|
@ -19,7 +19,7 @@ import { Menu } from '~components/menu'
|
|||
import { breakpoints, iconButton } from '~components'
|
||||
import { DotFilledIcon } from '@radix-ui/react-icons'
|
||||
import { TLDR } from '~state/tldr'
|
||||
import { ContextMenu } from '@radix-ui/react-context-menu'
|
||||
import { ContextMenu } from '~components/context-menu'
|
||||
|
||||
// Selectors
|
||||
const isInSelectSelector = (s: Data) => s.appState.activeTool === 'select'
|
||||
|
|
Ładowanie…
Reference in New Issue