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

Method setVisibleArea

packages/react-devtools-timeline/src/view-base/View.js:125–134  ·  view source on GitHub ↗
(newVisibleArea: Rect)

Source from the content-addressed store, hash-verified

123 }
124
125 setVisibleArea(newVisibleArea: Rect) {
126 if (!rectEqualToRect(this.visibleArea, newVisibleArea)) {
127 if (sizeIsValid(newVisibleArea.size)) {
128 this.visibleArea = newVisibleArea;
129 } else {
130 this.visibleArea = zeroRect;
131 }
132 this.setNeedsDisplay();
133 }
134 }
135
136 /**
137 * A size that can be used as a hint by layout functions.

Callers 2

displayIfNeededMethod · 0.80
layoutSubviewsMethod · 0.80

Calls 3

setNeedsDisplayMethod · 0.95
rectEqualToRectFunction · 0.90
sizeIsValidFunction · 0.90

Tested by

no test coverage detected