MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / performLayout

Function performLayout

packages/core/ui/core/view-base/index.ts:947–957  ·  view source on GitHub ↗
(currentRun = 0)

Source from the content-addressed store, hash-verified

945 }
946
947 private performLayout(currentRun = 0) {
948 // if there's an animation in progress we need to delay the layout
949 // we've added a guard of 5000 milliseconds execution
950 // to make sure that the layout will happen even if the animation haven't finished in 5 seconds
951 if (this._shouldDelayLayout() && currentRun < 100) {
952 setTimeout(() => this.performLayout(currentRun), currentRun);
953 currentRun++;
954 } else {
955 this.parent.requestLayout();
956 }
957 }
958
959 /**
960 * Invalidates the layout of the view and triggers a new layout pass.

Callers

nothing calls this directly

Calls 3

_shouldDelayLayoutMethod · 0.80
setTimeoutFunction · 0.50
requestLayoutMethod · 0.45

Tested by

no test coverage detected