minor updates
This commit is contained in:
+2
-2
@@ -1,10 +1,10 @@
|
||||
// Round to the cloest multiples of this value
|
||||
export const GRID_SIZE = 10;
|
||||
|
||||
// NodeType, (Width, Height)
|
||||
// "NodeType": [Width, Height]
|
||||
export const FIXED_SIZE = {
|
||||
|
||||
"CLIPTextEncode": [400.0, 160.0],
|
||||
"CLIPTextEncode": [400.0, 150.0],
|
||||
"PreviewImage": [420.0, 420.0],
|
||||
|
||||
};
|
||||
|
||||
+3
-4
@@ -11,10 +11,9 @@ export function Process(graph) {
|
||||
node["size"] = FIXED_SIZE[node["type"]];
|
||||
}
|
||||
|
||||
["pos", "size"].forEach((mode) => {
|
||||
[0, 1].forEach((index) => {
|
||||
node[mode][index] = round(node[mode][index]);
|
||||
});
|
||||
["pos", "size"].forEach((prop) => {
|
||||
node[prop][0] = round(node[prop][0]);
|
||||
node[prop][1] = round(node[prop][1]);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user