mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
[TS] Prefer narrow interface - readonly network (#769)
Uses new readonly link network interface in APIs that do not require write.
This commit is contained in:
@@ -4,6 +4,7 @@ import type {
|
||||
LinkSegment,
|
||||
Point,
|
||||
Positionable,
|
||||
ReadonlyLinkNetwork,
|
||||
ReadOnlyRect,
|
||||
} from "./interfaces"
|
||||
import type { NodeId } from "./LGraphNode"
|
||||
@@ -252,7 +253,7 @@ export class Reroute implements Positionable, LinkSegment, Serialisable<Serialis
|
||||
return true
|
||||
}
|
||||
|
||||
calculateAngle(lastRenderTime: number, network: LinkNetwork, linkStart: Point): void {
|
||||
calculateAngle(lastRenderTime: number, network: ReadonlyLinkNetwork, linkStart: Point): void {
|
||||
// Ensure we run once per render
|
||||
if (!(lastRenderTime > this.#lastRenderTime)) return
|
||||
this.#lastRenderTime = lastRenderTime
|
||||
|
||||
Reference in New Issue
Block a user