MCPcopy
hub / github.com/facebook/react / setFrame

Method setFrame

packages/react-devtools-timeline/src/view-base/View.js:113–123  ·  view source on GitHub ↗
(newFrame: Rect)

Source from the content-addressed store, hash-verified

111 }
112
113 setFrame(newFrame: Rect) {
114 if (!rectEqualToRect(this.frame, newFrame)) {
115 this.frame = newFrame;
116 if (sizeIsValid(newFrame.size)) {
117 this.frame = newFrame;
118 } else {
119 this.frame = zeroRect;
120 }
121 this.setNeedsDisplay();
122 }
123 }
124
125 setVisibleArea(newVisibleArea: Rect) {
126 if (!rectEqualToRect(this.visibleArea, newVisibleArea)) {

Callers 4

collapseLayoutIntoViewsFunction · 0.45
displayIfNeededMethod · 0.45
layoutSubviewsMethod · 0.45
_updateSubviewFramesMethod · 0.45

Calls 3

setNeedsDisplayMethod · 0.95
rectEqualToRectFunction · 0.90
sizeIsValidFunction · 0.90

Tested by

no test coverage detected