mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 15:40:10 +00:00
Draw canvas image preview in a widget (#2952)
This commit is contained in:
@@ -2,7 +2,17 @@
|
||||
import { app } from '../app'
|
||||
import { $el } from '../ui'
|
||||
|
||||
export function calculateImageGrid(imgs, dw, dh) {
|
||||
export function calculateImageGrid(
|
||||
imgs,
|
||||
dw,
|
||||
dh
|
||||
): {
|
||||
cellWidth: number
|
||||
cellHeight: number
|
||||
cols: number
|
||||
rows: number
|
||||
shiftX: number
|
||||
} {
|
||||
let best = 0
|
||||
let w = imgs[0].naturalWidth
|
||||
let h = imgs[0].naturalHeight
|
||||
|
||||
Reference in New Issue
Block a user