Function: computeZoomRectStyle()

Source: 1.0.0-rc.14 · ecc10ae38a81 (uncommitted changes)

ts
function computeZoomRectStyle(
   visualRect, 
   layoutOffset, 
   scrollOffset?
): ZoomImageStyle;

Defined in: packages/valaxy/client/composables/features/medium-zoom.ts:32

Convert the opened transform into real dimensions while keeping the same viewport rect. This avoids Chrome rendering the zoomed image blurry because of transform scaling.

Parameters

visualRect

ZoomRectLike

layoutOffset

Pick<ZoomRectLike, "left" | "top">

scrollOffset?

x

number = 0

y

number = 0

Returns

ZoomImageStyle

See