mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
tidy(ui): background layer
This commit is contained in:
parent
b39e95966c
commit
aea03b4e92
@ -49,10 +49,6 @@ export const renderBackgroundLayer = (stage: Konva.Stage): void => {
|
|||||||
y1: 0,
|
y1: 0,
|
||||||
x2: width,
|
x2: width,
|
||||||
y2: height,
|
y2: height,
|
||||||
offset: {
|
|
||||||
x: x / scale,
|
|
||||||
y: y / scale,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const gridOffset = {
|
const gridOffset = {
|
||||||
@ -74,8 +70,8 @@ export const renderBackgroundLayer = (stage: Konva.Stage): void => {
|
|||||||
y2: Math.max(stageRect.y2, gridRect.y2),
|
y2: Math.max(stageRect.y2, gridRect.y2),
|
||||||
};
|
};
|
||||||
|
|
||||||
const // find the x & y size of the grid
|
// find the x & y size of the grid
|
||||||
xSize = gridFullRect.x2 - gridFullRect.x1;
|
const xSize = gridFullRect.x2 - gridFullRect.x1;
|
||||||
const ySize = gridFullRect.y2 - gridFullRect.y1;
|
const ySize = gridFullRect.y2 - gridFullRect.y1;
|
||||||
// compute the number of steps required on each axis.
|
// compute the number of steps required on each axis.
|
||||||
const xSteps = Math.round(xSize / gridSpacing) + 1;
|
const xSteps = Math.round(xSize / gridSpacing) + 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user