mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
fix(ui): do not change canvas bbox on video model change
This commit is contained in:
@@ -32,7 +32,6 @@ import {
|
||||
} from 'features/controlLayers/util/getScaledBoundingBoxDimensions';
|
||||
import { simplifyFlatNumbersArray } from 'features/controlLayers/util/simplify';
|
||||
import { isMainModelBase, zModelIdentifierField } from 'features/nodes/types/common';
|
||||
import { videoModelChanged } from 'features/parameters/store/videoSlice';
|
||||
import { API_BASE_MODELS, VIDEO_BASE_MODELS } from 'features/parameters/types/constants';
|
||||
import { getGridSize, getIsSizeOptimal, getOptimalDimension } from 'features/parameters/util/optimalDimension';
|
||||
import type { IRect } from 'konva/lib/types';
|
||||
@@ -1582,18 +1581,6 @@ const slice = createSlice({
|
||||
builder.addCase(canvasReset, (state) => {
|
||||
return resetState(state);
|
||||
});
|
||||
builder.addCase(videoModelChanged, (state, action) => {
|
||||
if (action.payload) {
|
||||
const { base } = action.payload;
|
||||
if (VIDEO_BASE_MODELS.includes(base)) {
|
||||
state.bbox.aspectRatio.isLocked = true;
|
||||
state.bbox.aspectRatio.value = 1;
|
||||
state.bbox.aspectRatio.id = '16:9';
|
||||
state.bbox.rect.width = 1280;
|
||||
state.bbox.rect.height = 720;
|
||||
}
|
||||
}
|
||||
});
|
||||
builder.addCase(modelChanged, (state, action) => {
|
||||
const { model } = action.payload;
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user