Move to litegraph.

This commit is contained in:
comfyanonymous 2023-07-11 03:12:00 -04:00
parent cef30cc6b6
commit 2b2a1474f7
2 changed files with 1 additions and 13 deletions

View File

@ -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);

View File

@ -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
*/