mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-30 12:59:55 +00:00
[TS] Enable noUnusedParameters (#3110)
This commit is contained in:
@@ -547,9 +547,8 @@ export class ComfyApp {
|
||||
node,
|
||||
ctx,
|
||||
size,
|
||||
fgcolor,
|
||||
bgcolor,
|
||||
selected
|
||||
_fgcolor,
|
||||
bgcolor
|
||||
) {
|
||||
const res = origDrawNodeShape.apply(this, arguments)
|
||||
|
||||
@@ -627,7 +626,7 @@ export class ComfyApp {
|
||||
}
|
||||
|
||||
const origDrawNode = LGraphCanvas.prototype.drawNode
|
||||
LGraphCanvas.prototype.drawNode = function (node, ctx) {
|
||||
LGraphCanvas.prototype.drawNode = function (node) {
|
||||
const editor_alpha = this.editor_alpha
|
||||
const old_color = node.color
|
||||
const old_bgcolor = node.bgcolor
|
||||
@@ -678,11 +677,11 @@ export class ComfyApp {
|
||||
this.ui.setStatus(detail)
|
||||
})
|
||||
|
||||
api.addEventListener('progress', ({ detail }) => {
|
||||
api.addEventListener('progress', () => {
|
||||
this.graph.setDirtyCanvas(true, false)
|
||||
})
|
||||
|
||||
api.addEventListener('executing', ({ detail }) => {
|
||||
api.addEventListener('executing', () => {
|
||||
this.graph.setDirtyCanvas(true, false)
|
||||
this.revokePreviews(this.runningNodeId)
|
||||
delete this.nodePreviewImages[this.runningNodeId]
|
||||
@@ -708,7 +707,7 @@ export class ComfyApp {
|
||||
}
|
||||
})
|
||||
|
||||
api.addEventListener('execution_start', ({ detail }) => {
|
||||
api.addEventListener('execution_start', () => {
|
||||
this.lastExecutionError = null
|
||||
this.graph.nodes.forEach((node) => {
|
||||
if (node.onExecutionStart) node.onExecutionStart()
|
||||
|
||||
@@ -240,7 +240,7 @@ export class ChangeTracker {
|
||||
true
|
||||
)
|
||||
|
||||
window.addEventListener('keyup', (e) => {
|
||||
window.addEventListener('keyup', () => {
|
||||
if (keyIgnored) {
|
||||
keyIgnored = false
|
||||
logger.debug('checkState on keyup')
|
||||
@@ -352,7 +352,7 @@ export class ChangeTracker {
|
||||
})
|
||||
}
|
||||
|
||||
static bindInput(app: ComfyApp, activeEl: Element | null): boolean {
|
||||
static bindInput(_app: ComfyApp, activeEl: Element | null): boolean {
|
||||
if (
|
||||
!activeEl ||
|
||||
activeEl.tagName === 'CANVAS' ||
|
||||
|
||||
@@ -280,7 +280,7 @@ export async function importA1111(graph, parameters) {
|
||||
model(v) {
|
||||
setWidgetValue(ckptNode, 'ckpt_name', v, true)
|
||||
},
|
||||
vae(v) {},
|
||||
vae() {},
|
||||
'cfg scale'(v) {
|
||||
setWidgetValue(samplerNode, 'cfg', +v)
|
||||
},
|
||||
|
||||
@@ -92,7 +92,7 @@ export function $el<TTag extends string>(
|
||||
return element as ElementType<TTag>
|
||||
}
|
||||
|
||||
function dragElement(dragEl, settings): () => void {
|
||||
function dragElement(dragEl): () => void {
|
||||
var posDiffX = 0,
|
||||
posDiffY = 0,
|
||||
posStartX = 0,
|
||||
@@ -640,7 +640,7 @@ export class ComfyUI {
|
||||
// Hide by default on construction so it does not interfere with other views.
|
||||
this.menuContainer.style.display = 'none'
|
||||
|
||||
this.restoreMenuPosition = dragElement(this.menuContainer, this.settings)
|
||||
this.restoreMenuPosition = dragElement(this.menuContainer)
|
||||
|
||||
// @ts-expect-error
|
||||
this.setStatus({ exec_info: { queue_remaining: 'X' } })
|
||||
|
||||
@@ -287,7 +287,7 @@ export class DraggableList extends EventTarget {
|
||||
}
|
||||
|
||||
unsetItemState() {
|
||||
this.getIdleItems().forEach((item, i) => {
|
||||
this.getIdleItems().forEach((item) => {
|
||||
delete item.dataset.isAbove
|
||||
delete item.dataset.isToggled
|
||||
item.style.transform = ''
|
||||
|
||||
@@ -74,7 +74,7 @@ export function addValueControlWidget(
|
||||
node: LGraphNode,
|
||||
targetWidget: IWidget,
|
||||
defaultValue?: string,
|
||||
values?: unknown,
|
||||
_values?: unknown,
|
||||
widgetName?: string,
|
||||
inputData?: InputSpec
|
||||
): IWidget {
|
||||
|
||||
Reference in New Issue
Block a user