feat: make compatible to single files
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
* GitHub: https://github.com/failfa-st
|
||||
* Discord: https://discord.com/invite/m3TBB9XEkb
|
||||
*/
|
||||
import { app } from "../../../scripts/app.js";
|
||||
import { $el } from "../../../scripts/ui.js";
|
||||
import { app } from "../scripts/app.js";
|
||||
import { $el } from "../scripts/ui.js";
|
||||
|
||||
function getColor(index, lengthOfItems, l = 0.5) {
|
||||
// Normalize the index value to be between 0 and 360 for full spectrum of hue
|
||||
@@ -154,28 +154,28 @@ function setColorMode(value, app) {
|
||||
case 1:
|
||||
app.graph.afterChange = function () {
|
||||
uncolor(app);
|
||||
return applyChanges?.apply(this, arguments);
|
||||
return afterChange?.apply(this, arguments);
|
||||
};
|
||||
uncolor(app);
|
||||
break;
|
||||
case 2:
|
||||
app.graph.afterChange = function () {
|
||||
rainbowify(app);
|
||||
return applyChanges?.apply(this, arguments);
|
||||
return afterChange?.apply(this, arguments);
|
||||
};
|
||||
rainbowify(app);
|
||||
break;
|
||||
case 3:
|
||||
app.graph.afterChange = function () {
|
||||
colorByType(app);
|
||||
return applyChanges?.apply(this, arguments);
|
||||
return afterChange?.apply(this, arguments);
|
||||
};
|
||||
colorByType(app);
|
||||
break;
|
||||
case 4:
|
||||
app.graph.afterChange = function () {
|
||||
colorPositiveNegative(app);
|
||||
return applyChanges?.apply(this, arguments);
|
||||
return afterChange?.apply(this, arguments);
|
||||
};
|
||||
colorPositiveNegative(app);
|
||||
break;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* GitHub: https://github.com/failfa-st
|
||||
* Discord: https://discord.com/invite/m3TBB9XEkb
|
||||
*/
|
||||
import { app } from "../../../scripts/app.js";
|
||||
import { app } from "../scripts/app.js";
|
||||
|
||||
/**
|
||||
* Connections Width
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* GitHub: https://github.com/failfa-st
|
||||
* Discord: https://discord.com/invite/m3TBB9XEkb
|
||||
*/
|
||||
import { app } from "../../../scripts/app.js";
|
||||
import { app } from "../scripts/app.js";
|
||||
|
||||
/**
|
||||
* Render all nodes as box
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* GitHub: https://github.com/failfa-st
|
||||
* Discord: https://discord.com/invite/m3TBB9XEkb
|
||||
*/
|
||||
import { app } from "../../../scripts/app.js";
|
||||
import { app } from "../scripts/app.js";
|
||||
|
||||
/**
|
||||
* Always snap to grid
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
* Discord: https://discord.com/invite/m3TBB9XEkb
|
||||
*/
|
||||
|
||||
import { app } from "../../../scripts/app.js";
|
||||
import { $el } from "../../../scripts/ui.js";
|
||||
import { app } from "../scripts/app.js";
|
||||
import { $el } from "../scripts/ui.js";
|
||||
|
||||
/**
|
||||
* Toggle links render mode
|
||||
|
||||
+1
-3
@@ -9,7 +9,7 @@
|
||||
* GitHub: https://github.com/failfa-st
|
||||
* Discord: https://discord.com/invite/m3TBB9XEkb
|
||||
*/
|
||||
import { app } from "../../../scripts/app.js";
|
||||
import { app } from "../scripts/app.js";
|
||||
|
||||
/**
|
||||
* Nodes
|
||||
@@ -33,14 +33,12 @@ app.registerExtension({
|
||||
});
|
||||
},
|
||||
async setup(app) {
|
||||
console.log(app);
|
||||
app.graph._nodes.forEach((node) => {
|
||||
let active = JSON.parse(
|
||||
window.localStorage.getItem(`Comfy.Settings.${nodesName}`) ?? "false",
|
||||
);
|
||||
const onResize = node.onResize;
|
||||
node.onResize = function (size) {
|
||||
console.log(active);
|
||||
if (active) {
|
||||
Array.from(store.stack)
|
||||
.filter((node_) => node_ !== node)
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
* GitHub: https://github.com/failfa-st
|
||||
* Discord: https://discord.com/invite/m3TBB9XEkb
|
||||
*/
|
||||
import { app } from "../../../scripts/app.js";
|
||||
import { $el } from "../../../scripts/ui.js";
|
||||
import { app } from "../scripts/app.js";
|
||||
import { $el } from "../scripts/ui.js";
|
||||
|
||||
/**
|
||||
* Pin/Unpin all nodes on canvas
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* GitHub: https://github.com/failfa-st
|
||||
* Discord: https://discord.com/invite/m3TBB9XEkb
|
||||
*/
|
||||
import { app } from "../../../scripts/app.js";
|
||||
import { app } from "../scripts/app.js";
|
||||
|
||||
/**
|
||||
* Render Shadow
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
* GitHub: https://github.com/failfa-st
|
||||
* Discord: https://discord.com/invite/m3TBB9XEkb
|
||||
*/
|
||||
import { app } from "../../../scripts/app.js";
|
||||
import { $el } from "../../../scripts/ui.js";
|
||||
import { app } from "../scripts/app.js";
|
||||
import { $el } from "../scripts/ui.js";
|
||||
|
||||
/**
|
||||
* Font size of prompt fields
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export * from "../../../scripts/app.js";
|
||||
@@ -0,0 +1 @@
|
||||
export * from "../../../scripts/ui.js";
|
||||
Reference in New Issue
Block a user