Skip to content

Commit

Permalink
Move to litegraph.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jul 11, 2023
1 parent cef30cc commit 2b2a147
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion web/lib/litegraph.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -8191,7 +8191,7 @@ LGraphNode.prototype.executeAction = function(action)
**/
LGraphCanvas.prototype.renderInfo = function(ctx, x, y) {
x = x || 10;
y = y || this.canvas.height - 80;
y = y || this.canvas.offsetHeight - 80;

ctx.save();
ctx.translate(x, y);
Expand Down
12 changes: 0 additions & 12 deletions web/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@ import { api } from "./api.js";
import { defaultGraph } from "./defaultGraph.js";
import { getPngMetadata, importA1111, getLatentMetadata } from "./pnginfo.js";

// DPI scaling fix, see https://github.com/comfyanonymous/ComfyUI/pull/845
(function() {
const originalRenderInfo = LGraphCanvas.prototype.renderInfo
LGraphCanvas.prototype.renderInfo = function(ctx, x, y) {
// Patch renderInfo() to use canvas.offsetHeight instead of canvas.height as bottom viewpoint bound
if (!y) {
y = this.canvas.offsetHeight - 80
}
return originalRenderInfo.call(this, ctx, x, y)
}
})()

/**
* @typedef {import("types/comfy").ComfyExtension} ComfyExtension
*/
Expand Down

0 comments on commit 2b2a147

Please sign in to comment.