MCPcopy
hub / github.com/Lightricks/ComfyUI-LTXVideo / getScale

Function getScale

web/js/sparse_track_editor.js:288–294  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

286// ---------------------------------------------------------------------------
287
288function getScale(node) {
289 const ed = node._ed;
290 const c = ed.canvas;
291 const scaleX = c.width / ed.imgW;
292 const scaleY = c.height / ed.imgH;
293 return Math.min(scaleX, scaleY);
294}
295
296function imgToCanvas(node, p) {
297 const s = getScale(node);

Callers 3

imgToCanvasFunction · 0.85
canvasToImgFunction · 0.85
renderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected