Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
fix(canvas): add fine-grid hint to move tool (#9227)
Valeri Che9a61f4ebee30
diff --git a/invokeai/frontend/web/src/features/ui/layouts/canvasToolModifierHints.test.ts b/invokeai/frontend/web/src/features/ui/layouts/canvasToolModifierHints.test.tsindex 244634fd38..a13699295f 100644--- a/invokeai/frontend/web/src/features/ui/layouts/canvasToolModifierHints.test.ts+++ b/invokeai/frontend/web/src/features/ui/layouts/canvasToolModifierHints.test.ts@@ -56,6 +56,15 @@ describe('getCanvasToolModifierHintIds', () => {]);});+ it('adds fine-grid hint for the move tool', () => {+ expect(getCanvasToolModifierHintIds(buildArgs({ tool: 'move' }))).toEqual([+ 'arrowKeysNudgeSelection',+ 'modFineGrid',+ 'spacePan',+ 'altPickColor',+ ]);+ });+it('only shows text-session hints when a text session is active', () => {expect(getCanvasToolModifierHintIds(buildArgs({ tool: 'text', hasActiveTextSession: true }))).toEqual(['enterCommitText',diff --git a/invokeai/frontend/web/src/features/ui/layouts/canvasToolModifierHints.ts b/invokeai/frontend/web/src/features/ui/layouts/canvasToolModifierHints.tsindex 3543ac4358..d81ade8c1e 100644--- a/invokeai/frontend/web/src/features/ui/layouts/canvasToolModifierHints.ts+++ b/invokeai/frontend/web/src/features/ui/layouts/canvasToolModifierHints.ts@@ -162,7 +162,7 @@ export const getCanvasToolModifierHintIds = ({'altScaleFromCenter','modFineGrid',],- move: () => ['arrowKeysNudgeSelection', ...SHARED_HINT_IDS],+ move: () => ['arrowKeysNudgeSelection', 'modFineGrid', ...SHARED_HINT_IDS],text: ({ hasActiveTextSession: active }) =>active? ['enterCommitText', 'shiftEnterNewLine', 'escCancelText', 'modDragText', 'shiftSnapRotation']@@ -193,7 +193,14 @@ export const getCanvasToolModifierHintIds = ({return [];}return Array.from(- resolver({ tool, lassoMode, shapeType, bboxAspectRatioLocked, hasActiveTextSession, isPrimaryPointerDown })+ resolver({+ tool,+ lassoMode,+ shapeType,+ bboxAspectRatioLocked,+ hasActiveTextSession,+ isPrimaryPointerDown,+ }));};