mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-13 17:26:22 +00:00
Migrate all window.devicePixelRatio reads to use LGraphCanvas.dpr, the single source of truth set by applyViewport. LGraphCanvas: - Add dpr property, initialized in constructor, updated on resize() - Migrate 6 internal DPR reads: drawFrontCanvas compositing, drawBackCanvas transform reset, centerOnNode, renderInfo, processMouseDown hit-testing, LOD threshold calculation - Mark resize() as @deprecated External consumers: - litegraphService.getCanvasCenter(): use canvas.dpr - useMinimapViewport: use canvas.dpr - layoutStore: documented TODO (no canvas reference at this layer) - DragAndScale: documented exception (no canvas reference) app.ts: - Mark resizeCanvas() as @deprecated - Inline viewport calls in scheduler path - Set canvas.dpr after applyViewport canvasViewport.ts: - Export CanvasViewport type - applyViewport returns the viewport for chaining ADR 0009: Proposed -> Accepted