kopia lustrzana https://github.com/Tldraw/Tldraw
stickies: make pit/pack distance the same
rodzic
a319ad9497
commit
8b7ae64e7b
|
@ -36,9 +36,9 @@ import {
|
|||
import { getFontDefForExport } from '../shared/defaultStyleDefs'
|
||||
|
||||
import { startEditingShapeWithLabel } from '../../tools/SelectTool/selectHelpers'
|
||||
import { ADJACENT_SHAPE_MARGIN } from '../../ui/constants'
|
||||
import { useForceSolid } from '../shared/useForceSolid'
|
||||
import {
|
||||
ADJACENT_NOTE_MARGIN,
|
||||
CLONE_HANDLE_MARGIN,
|
||||
NOTE_CENTER_OFFSET,
|
||||
NOTE_SIZE,
|
||||
|
@ -402,7 +402,7 @@ function useNoteKeydownHandler(id: TLShapeId) {
|
|||
|
||||
const offsetLength =
|
||||
NOTE_SIZE +
|
||||
ADJACENT_NOTE_MARGIN +
|
||||
ADJACENT_SHAPE_MARGIN +
|
||||
// If we're growing down, we need to account for the current shape's growY
|
||||
(isCmdEnter && !e.shiftKey ? shape.props.growY : 0)
|
||||
|
||||
|
|
|
@ -12,3 +12,5 @@ export enum PORTRAIT_BREAKPOINT {
|
|||
TABLET = 6,
|
||||
DESKTOP = 7,
|
||||
}
|
||||
|
||||
export const ADJACENT_SHAPE_MARGIN = 20
|
||||
|
|
|
@ -25,6 +25,7 @@ import { getEmbedInfo } from '../../utils/embeds/embeds'
|
|||
import { fitFrameToContent, removeFrame } from '../../utils/frames/frames'
|
||||
import { EditLinkDialog } from '../components/EditLinkDialog'
|
||||
import { EmbedDialog } from '../components/EmbedDialog'
|
||||
import { ADJACENT_SHAPE_MARGIN } from '../constants'
|
||||
import { useMenuClipboardEvents } from '../hooks/useClipboardEvents'
|
||||
import { useCopyAs } from '../hooks/useCopyAs'
|
||||
import { useExportAs } from '../hooks/useExportAs'
|
||||
|
@ -818,7 +819,7 @@ export function ActionsProvider({ overrides, children }: ActionsProviderProps) {
|
|||
trackEvent('pack-shapes', { source })
|
||||
editor.mark('pack')
|
||||
const selectedShapeIds = editor.getSelectedShapeIds()
|
||||
editor.packShapes(selectedShapeIds, 16)
|
||||
editor.packShapes(selectedShapeIds, ADJACENT_SHAPE_MARGIN)
|
||||
kickoutOccludedShapes(editor, selectedShapeIds)
|
||||
},
|
||||
},
|
||||
|
|
Ładowanie…
Reference in New Issue