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

Method setMargin

src/native-ts/yoga-layout/index.ts:817–825  ·  view source on GitHub ↗
(edge: Edge, v: number | 'auto' | string | undefined)

Source from the content-addressed store, hash-verified

815 // -- Style setters: spacing
816
817 setMargin(edge: Edge, v: number | 'auto' | string | undefined): void {
818 const val = parseDimension(v)
819 this.style.margin[edge] = val
820 if (val.unit === Unit.Auto) this._hasAutoMargin = true
821 else this._hasAutoMargin = hasAnyAutoEdge(this.style.margin)
822 this._hasMargin =
823 this._hasAutoMargin || hasAnyDefinedEdge(this.style.margin)
824 this.markDirty()
825 }
826 setMarginPercent(edge: Edge, v: number): void {
827 this.style.margin[edge] = percentValue(v)
828 this._hasAutoMargin = hasAnyAutoEdge(this.style.margin)

Callers

nothing calls this directly

Calls 4

markDirtyMethod · 0.95
parseDimensionFunction · 0.85
hasAnyAutoEdgeFunction · 0.85
hasAnyDefinedEdgeFunction · 0.85

Tested by

no test coverage detected