mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): unable to hold shit while transforming to retain ratio
This commit is contained in:
parent
d60ec53762
commit
d99ae58001
@ -150,6 +150,11 @@ export class CanvasTransformer {
|
|||||||
return { x: scaledTargetX, y: scaledTargetY };
|
return { x: scaledTargetX, y: scaledTargetY };
|
||||||
},
|
},
|
||||||
boundBoxFunc: (oldBoundBox, newBoundBox) => {
|
boundBoxFunc: (oldBoundBox, newBoundBox) => {
|
||||||
|
// Bail if we are not rotating, we don't need to do anything.
|
||||||
|
if (this.konva.transformer.getActiveAnchor() !== 'rotater') {
|
||||||
|
return newBoundBox;
|
||||||
|
}
|
||||||
|
|
||||||
// This transform constraint operates on the bounding box of the transformer. This box has x, y, width, and
|
// This transform constraint operates on the bounding box of the transformer. This box has x, y, width, and
|
||||||
// height in stage coordinates, and rotation in radians. This can be used to snap the transformer rotation to
|
// height in stage coordinates, and rotation in radians. This can be used to snap the transformer rotation to
|
||||||
// the nearest 45 degrees when shift is held.
|
// the nearest 45 degrees when shift is held.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user