mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-03 04:00:31 +00:00
Enforce curly braces in multi-line if statements (#619)
Removes formatters' ability to print code that goes to a new line, but uses no braces to delineate. It becomes more difficult to follow when using JS-style indents (two spaces). No effort required - braces added by auto-fixer.
This commit is contained in:
@@ -1213,8 +1213,9 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
|
||||
!output ||
|
||||
output.type !== LiteGraph.EVENT ||
|
||||
(action && output.name != action)
|
||||
)
|
||||
) {
|
||||
continue
|
||||
}
|
||||
this.triggerSlot(i, param, null, options)
|
||||
}
|
||||
}
|
||||
@@ -1893,8 +1894,9 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
|
||||
(widget.disabled && !includeDisabled) ||
|
||||
widget.hidden ||
|
||||
(widget.advanced && !this.showAdvanced)
|
||||
)
|
||||
) {
|
||||
continue
|
||||
}
|
||||
|
||||
const h = widget.computeSize
|
||||
? widget.computeSize(nodeWidth)[1]
|
||||
@@ -1903,8 +1905,9 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
|
||||
if (
|
||||
widget.last_y !== undefined &&
|
||||
isInRectangle(x, y, 6, widget.last_y, w - 12, h)
|
||||
)
|
||||
) {
|
||||
return widget
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
@@ -2972,14 +2975,14 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
|
||||
}
|
||||
|
||||
ctx.fillStyle = this.renderingBoxColor
|
||||
if (low_quality)
|
||||
if (low_quality) {
|
||||
ctx.fillRect(
|
||||
title_height * 0.5 - box_size * 0.5,
|
||||
title_height * -0.5 - box_size * 0.5,
|
||||
box_size,
|
||||
box_size,
|
||||
)
|
||||
else {
|
||||
} else {
|
||||
ctx.beginPath()
|
||||
ctx.arc(
|
||||
title_height * 0.5,
|
||||
|
||||
Reference in New Issue
Block a user