MCPcopy Create free account
hub / github.com/codeaashu/claude-code / resolveEdgeRaw

Function resolveEdgeRaw

src/native-ts/yoga-layout/index.ts:233–248  ·  view source on GitHub ↗
(edges: Value[], physicalEdge: number)

Source from the content-addressed store, hash-verified

231}
232
233function resolveEdgeRaw(edges: Value[], physicalEdge: number): Value {
234 let v = edges[physicalEdge]!
235 if (v.unit === Unit.Undefined) {
236 if (physicalEdge === EDGE_LEFT || physicalEdge === EDGE_RIGHT) {
237 v = edges[Edge.Horizontal]!
238 } else {
239 v = edges[Edge.Vertical]!
240 }
241 }
242 if (v.unit === Unit.Undefined) v = edges[Edge.All]!
243 if (v.unit === Unit.Undefined) {
244 if (physicalEdge === EDGE_LEFT) v = edges[Edge.Start]!
245 if (physicalEdge === EDGE_RIGHT) v = edges[Edge.End]!
246 }
247 return v
248}
249
250function isMarginAuto(edges: Value[], physicalEdge: number): boolean {
251 return resolveEdgeRaw(edges, physicalEdge).unit === Unit.Auto

Callers 4

isMarginAutoFunction · 0.85
calculateLayoutMethod · 0.85
layoutNodeFunction · 0.85
layoutAbsoluteChildFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected