fix(refboard): reduce distribute H/V min selection from 3 to 2
This commit is contained in:
@@ -82,8 +82,8 @@ export function buildContextMenuItems(ctx: MenuContext): MenuItem[] {
|
|||||||
{ label: 'Align Right', shortcut: 'Ctrl+\u2192', onClick: () => { ops.alignRight(selected); selection?.transformBox.update(selected); ctx.onChange(); }, disabled: !multiSel },
|
{ label: 'Align Right', shortcut: 'Ctrl+\u2192', onClick: () => { ops.alignRight(selected); selection?.transformBox.update(selected); ctx.onChange(); }, disabled: !multiSel },
|
||||||
{ label: 'Align Top', shortcut: 'Ctrl+\u2191', onClick: () => { ops.alignTop(selected); selection?.transformBox.update(selected); ctx.onChange(); }, disabled: !multiSel },
|
{ label: 'Align Top', shortcut: 'Ctrl+\u2191', onClick: () => { ops.alignTop(selected); selection?.transformBox.update(selected); ctx.onChange(); }, disabled: !multiSel },
|
||||||
{ label: 'Align Bottom', shortcut: 'Ctrl+\u2193', onClick: () => { ops.alignBottom(selected); selection?.transformBox.update(selected); ctx.onChange(); }, disabled: !multiSel },
|
{ label: 'Align Bottom', shortcut: 'Ctrl+\u2193', onClick: () => { ops.alignBottom(selected); selection?.transformBox.update(selected); ctx.onChange(); }, disabled: !multiSel },
|
||||||
{ label: 'Distribute H', shortcut: '', onClick: () => { ops.distributeHorizontal(selected); selection?.transformBox.update(selected); ctx.onChange(); }, disabled: selected.length < 3 },
|
{ label: 'Distribute H', shortcut: '', onClick: () => { ops.distributeHorizontal(selected); selection?.transformBox.update(selected); ctx.onChange(); }, disabled: !multiSel },
|
||||||
{ label: 'Distribute V', shortcut: '', onClick: () => { ops.distributeVertical(selected); selection?.transformBox.update(selected); ctx.onChange(); }, disabled: selected.length < 3 },
|
{ label: 'Distribute V', shortcut: '', onClick: () => { ops.distributeVertical(selected); selection?.transformBox.update(selected); ctx.onChange(); }, disabled: !multiSel },
|
||||||
{ label: '', shortcut: '', onClick: () => {}, divider: true },
|
{ label: '', shortcut: '', onClick: () => {}, divider: true },
|
||||||
|
|
||||||
// -- Layer ordering --
|
// -- Layer ordering --
|
||||||
|
|||||||
@@ -143,12 +143,12 @@ export const shortcuts: ShortcutDef[] = [
|
|||||||
|
|
||||||
{
|
{
|
||||||
id: 'distribute-h', keys: { key: 'arrowup', ctrl: true, alt: true, shift: true },
|
id: 'distribute-h', keys: { key: 'arrowup', ctrl: true, alt: true, shift: true },
|
||||||
category: 'alignment', description: 'Distribute horizontal', needsSelection: true, minSelection: 3,
|
category: 'alignment', description: 'Distribute horizontal', needsSelection: true, minSelection: 2,
|
||||||
handler: (ctx) => _opUpdate(ctx, ops.distributeHorizontal),
|
handler: (ctx) => _opUpdate(ctx, ops.distributeHorizontal),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'distribute-v', keys: { key: 'arrowdown', ctrl: true, alt: true, shift: true },
|
id: 'distribute-v', keys: { key: 'arrowdown', ctrl: true, alt: true, shift: true },
|
||||||
category: 'alignment', description: 'Distribute vertical', needsSelection: true, minSelection: 3,
|
category: 'alignment', description: 'Distribute vertical', needsSelection: true, minSelection: 2,
|
||||||
handler: (ctx) => _opUpdate(ctx, ops.distributeVertical),
|
handler: (ctx) => _opUpdate(ctx, ops.distributeVertical),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user