mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-09 15:10:17 +00:00
This reverts commit 4640eaf0ac.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { LiteGraph, LGraphCanvas } from "comfyui-litegraph";
|
||||
import {app} from "../../scripts/app";
|
||||
import {$el} from "../../scripts/ui";
|
||||
import type { ColorPalettes } from "/types/colorPalette";
|
||||
@@ -761,7 +760,8 @@ app.registerExtension({
|
||||
BACKGROUND_IMAGE = base.BACKGROUND_IMAGE;
|
||||
CLEAR_BACKGROUND_COLOR = base.CLEAR_BACKGROUND_COLOR;
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
// litegraph.extensions.js
|
||||
app.canvas.updateBackground(BACKGROUND_IMAGE, CLEAR_BACKGROUND_COLOR);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { LiteGraph } from "comfyui-litegraph";
|
||||
import {app} from "../../scripts/app";
|
||||
|
||||
// Adds filtering to combo context menus
|
||||
|
||||
@@ -2,8 +2,7 @@ import { app } from "../../scripts/app";
|
||||
import { api } from "../../scripts/api";
|
||||
import { mergeIfValid } from "./widgetInputs";
|
||||
import { ManageGroupDialog } from "./groupNodeManage";
|
||||
import type { LGraphNode } from "comfyui-litegraph";
|
||||
import { LGraphCanvas, LiteGraph } from "comfyui-litegraph";
|
||||
import type { LGraphNode } from "/types/litegraph";
|
||||
|
||||
const GROUP = Symbol();
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { DraggableList } from "../../scripts/ui/draggableList";
|
||||
import { GroupNodeConfig, GroupNodeHandler } from "./groupNode";
|
||||
import "./groupNodeManage.css";
|
||||
import type { ComfyApp } from "/scripts/app";
|
||||
import { LiteGraph, type LGraphNode, type LGraphNodeConstructor } from "comfyui-litegraph";
|
||||
import type { LGraphNode, LGraphNodeConstructor } from "/types/litegraph";
|
||||
|
||||
|
||||
const ORDER: symbol = Symbol();
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {app} from "../../scripts/app";
|
||||
import { LGraphCanvas, LiteGraph } from "comfyui-litegraph";
|
||||
|
||||
function setNodeMode(node, mode) {
|
||||
node.mode = mode;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { LiteGraph } from "comfyui-litegraph";
|
||||
import { app } from "../../scripts/app";
|
||||
|
||||
// Inverts the scrolling of context menus
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { app } from "../../scripts/app";
|
||||
import { LiteGraph } from "comfyui-litegraph";
|
||||
|
||||
const id = "Comfy.LinkRenderMode";
|
||||
const ext = {
|
||||
name: id,
|
||||
|
||||
@@ -2,7 +2,6 @@ import { app } from "../../scripts/app";
|
||||
import { api } from "../../scripts/api";
|
||||
import { ComfyDialog, $el } from "../../scripts/ui";
|
||||
import { GroupNodeConfig, GroupNodeHandler } from "./groupNode";
|
||||
import { LGraphCanvas } from "comfyui-litegraph";
|
||||
|
||||
// Adds the ability to save and add multiple nodes as a template
|
||||
// To save:
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { LiteGraph } from "comfyui-litegraph";
|
||||
import {app} from "../../scripts/app";
|
||||
import {ComfyWidgets} from "../../scripts/widgets";
|
||||
// Node that add notes to your project
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { app } from "../../scripts/app";
|
||||
import { mergeIfValid, getWidgetConfig, setWidgetConfig } from "./widgetInputs";
|
||||
import { LiteGraph, LGraphCanvas } from "comfyui-litegraph";
|
||||
|
||||
// Node that allows you to redirect connections for cleaner graphs
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { app } from "../../scripts/app";
|
||||
import { LGraphCanvas, LiteGraph } from "comfyui-litegraph";
|
||||
|
||||
let touchZooming;
|
||||
let touchCount = 0;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { app } from "../../scripts/app";
|
||||
import { ComfyWidgets } from "../../scripts/widgets";
|
||||
import { LiteGraph } from "comfyui-litegraph";
|
||||
// Adds defaults for quickly adding nodes with middle click on the input/output
|
||||
|
||||
app.registerExtension({
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { app } from "../../scripts/app";
|
||||
import { LGraphCanvas, LGraphNode, LGraphGroup, LiteGraph } from "comfyui-litegraph";
|
||||
|
||||
// Shift + drag/resize to snap to grid
|
||||
|
||||
@@ -70,14 +69,12 @@ app.registerExtension({
|
||||
|
||||
let w, h;
|
||||
if (node.flags.collapsed) {
|
||||
// @ts-ignore
|
||||
w = node._collapsed_width;
|
||||
h = LiteGraph.NODE_TITLE_HEIGHT;
|
||||
shiftY -= LiteGraph.NODE_TITLE_HEIGHT;
|
||||
} else {
|
||||
w = node.size[0];
|
||||
h = node.size[1];
|
||||
// @ts-ignore
|
||||
let titleMode = node.constructor.title_mode;
|
||||
if (titleMode !== LiteGraph.TRANSPARENT_TITLE && titleMode !== LiteGraph.NO_TITLE) {
|
||||
h += LiteGraph.NODE_TITLE_HEIGHT;
|
||||
@@ -97,7 +94,7 @@ app.registerExtension({
|
||||
* The currently moving, selected group only. Set after the `selected_group` has actually started
|
||||
* moving.
|
||||
*/
|
||||
let selectedAndMovingGroup: LGraphGroup | null = null;
|
||||
let selectedAndMovingGroup = null;
|
||||
|
||||
/**
|
||||
* Handles moving a group; tracking when a group has been moved (to show the ghost in `drawGroups`
|
||||
@@ -144,13 +141,11 @@ app.registerExtension({
|
||||
if (this.selected_group_resizing) {
|
||||
roundVectorToGrid(this.selected_group.size);
|
||||
} else if (selectedAndMovingGroup) {
|
||||
// @ts-ignore
|
||||
const [x, y] = roundVectorToGrid([...selectedAndMovingGroup.pos]);
|
||||
const f = ctx.fillStyle;
|
||||
const s = ctx.strokeStyle;
|
||||
ctx.fillStyle = "rgba(100, 100, 100, 0.33)";
|
||||
ctx.strokeStyle = "rgba(100, 100, 100, 0.66)";
|
||||
// @ts-ignore
|
||||
ctx.rect(x, y, ...selectedAndMovingGroup.size);
|
||||
ctx.fill();
|
||||
ctx.stroke();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { app } from "../../scripts/app";
|
||||
import { api } from "../../scripts/api";
|
||||
import { LGraphCanvas, LiteGraph } from "comfyui-litegraph";
|
||||
|
||||
const MAX_HISTORY = 50;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { ComfyWidgets, addValueControlWidgets } from "../../scripts/widgets";
|
||||
import { app } from "../../scripts/app";
|
||||
import { applyTextReplacements } from "../../scripts/utils";
|
||||
import { LiteGraph } from "comfyui-litegraph";
|
||||
|
||||
const CONVERTED_TYPE = "converted-widget";
|
||||
const VALID_TYPES = ["STRING", "combo", "number", "BOOLEAN"];
|
||||
|
||||
Reference in New Issue
Block a user