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

Method setFlex

src/native-ts/yoga-layout/index.ts:722–738  ·  view source on GitHub ↗
(v: number | undefined)

Source from the content-addressed store, hash-verified

720 this.markDirty()
721 }
722 setFlex(v: number | undefined): void {
723 if (v === undefined || isNaN(v)) {
724 this.style.flexGrow = 0
725 this.style.flexShrink = 0
726 } else if (v > 0) {
727 this.style.flexGrow = v
728 this.style.flexShrink = 1
729 this.style.flexBasis = pointValue(0)
730 } else if (v < 0) {
731 this.style.flexGrow = 0
732 this.style.flexShrink = -v
733 } else {
734 this.style.flexGrow = 0
735 this.style.flexShrink = 0
736 }
737 this.markDirty()
738 }
739 setFlexBasis(v: number | 'auto' | string | undefined): void {
740 this.style.flexBasis = parseDimension(v)
741 this.markDirty()

Callers

nothing calls this directly

Calls 2

markDirtyMethod · 0.95
pointValueFunction · 0.85

Tested by

no test coverage detected