tidy(ui): rename canvas state "regions" -> "regionalGuidance"

This commit is contained in:
psychedelicious
2024-09-16 19:53:41 +10:00
committed by Kent Keirsey
parent 7725baf6c8
commit 0e0076d819
13 changed files with 29 additions and 27 deletions

View File

@@ -8,7 +8,7 @@ import { selectCanvasSlice, selectSelectedEntityIdentifier } from 'features/cont
import { memo } from 'react';
const selectEntityIds = createMemoizedSelector(selectCanvasSlice, (canvas) => {
return canvas.regions.entities.map(mapId).reverse();
return canvas.regionalGuidance.entities.map(mapId).reverse();
});
const selectIsSelected = createSelector(selectSelectedEntityIdentifier, (selectedEntityIdentifier) => {
return selectedEntityIdentifier?.type === 'regional_guidance';

View File

@@ -31,8 +31,8 @@ const getIndexAndCount = (
};
} else if (type === 'regional_guidance') {
return {
index: canvas.regions.entities.findIndex((entity) => entity.id === id),
count: canvas.regions.entities.length,
index: canvas.regionalGuidance.entities.findIndex((entity) => entity.id === id),
count: canvas.regionalGuidance.entities.length,
};
} else if (type === 'inpaint_mask') {
return {