mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-11 10:30:10 +00:00
[Refactor] Use LGraphNode.progress API (#3281)
This commit is contained in:
@@ -562,27 +562,15 @@ export class ComfyApp {
|
||||
LGraphCanvas.prototype.drawNodeShape = function (
|
||||
node,
|
||||
ctx,
|
||||
size,
|
||||
_size,
|
||||
_fgcolor,
|
||||
bgcolor
|
||||
_bgcolor
|
||||
) {
|
||||
// @ts-expect-error fixme ts strict error
|
||||
const res = origDrawNodeShape.apply(this, arguments)
|
||||
|
||||
const nodeErrors = self.lastNodeErrors?.[node.id]
|
||||
|
||||
// @ts-expect-error fixme ts strict error
|
||||
if (self.progress && node.id === +self.runningNodeId) {
|
||||
ctx.fillStyle = 'green'
|
||||
ctx.fillRect(
|
||||
0,
|
||||
0,
|
||||
size[0] * (self.progress.value / self.progress.max),
|
||||
6
|
||||
)
|
||||
ctx.fillStyle = bgcolor
|
||||
}
|
||||
|
||||
// Highlight inputs that failed validation
|
||||
if (nodeErrors) {
|
||||
ctx.lineWidth = 2
|
||||
|
||||
Reference in New Issue
Block a user