FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix-next: restrict to safe area when transform by MartoYankov · Pull Request #6405 · NativeScript/NativeScript · GitHub

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .ts  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
11 changes: 6 additions & 5 deletions tns-core-modules/ui/core/view/view.ios.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export class View extends ViewCommon {
traceWrite(this + " :_setNativeViewFrame: " + JSON.stringify(ios.getPositionFromFrame(frame)), traceCategories.Layout);
}
this._cachedFrame = frame;
let adjustedFrame = null;
if (this._hasTransfrom) {
// Always set identity transform before setting frame;
const transform = nativeView.transform;
Expand All @@ -167,11 +168,11 @@ export class View extends ViewCommon {
nativeView.transform = transform;
} else {
nativeView.frame = frame;
}

const adjustedFrame = this.applySafeAreaInsets(frame);
if (adjustedFrame) {
nativeView.frame = adjustedFrame;
// apply safe area insets only if no transform is in place
adjustedFrame = this.applySafeAreaInsets(frame);
if (adjustedFrame) {
nativeView.frame = adjustedFrame;
}
}

const boundsOrigin = nativeView.bounds.origin;
Expand Down

Back | FazBrowse Home | New Git URL