Replace canvas "action" magic strings (#271)

This commit is contained in:
filtered
2024-11-04 10:30:19 +11:00
committed by GitHub
parent ce8d39f650
commit ba52402851
2 changed files with 18 additions and 11 deletions

View File

@@ -2255,10 +2255,7 @@ export class LGraphNode implements Positionable {
/* Forces to redraw or the main canvas (LGraphNode) or the bg canvas (links) */
setDirtyCanvas(dirty_foreground: boolean, dirty_background?: boolean): void {
this.graph?.sendActionToCanvas("setDirty", [
dirty_foreground,
dirty_background
])
this.graph?.canvasAction(c => c.setDirty(dirty_foreground, dirty_background))
}
loadImage(url: string): HTMLImageElement {