MCPcopy Create free account
hub / github.com/microsoft/SandDance / imageYOffset

Function imageYOffset

docs/app/js/sanddance-app.js:122671–122673  ·  view source on GitHub ↗
(baseline, h11)

Source from the content-addressed store, hash-verified

122669 return align === "center" ? w6 / 2 : align === "right" ? w6 : 0;
122670}
122671function imageYOffset(baseline, h11) {
122672 return baseline === "middle" ? h11 / 2 : baseline === "bottom" ? h11 : 0;
122673}
122674function attr$4(emit8, item, renderer) {
122675 const img = getImage(item, renderer), w7 = imageWidth(item, img), h12 = imageHeight(item, img), x34 = (item.x || 0) - imageXOffset(item.align, w7), y33 = (item.y || 0) - imageYOffset(item.baseline, h12), i = !img.src && img.toDataURL ? img.toDataURL() : img.src || "";
122676 emit8("href", i, metadata["xmlns:xlink"], "xlink:href");

Callers 3

attr$4Function · 0.70
bound$4Function · 0.70
draw$3Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected