mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
fix(shared-transitions): layer opacity set back to original on next tick (#10310)
This commit is contained in:
@ -286,7 +286,10 @@ export function snapshotView(view: UIView, scale: number): UIImage {
|
|||||||
view.layer.renderInContext(UIGraphicsGetCurrentContext());
|
view.layer.renderInContext(UIGraphicsGetCurrentContext());
|
||||||
const image = UIGraphicsGetImageFromCurrentImageContext();
|
const image = UIGraphicsGetImageFromCurrentImageContext();
|
||||||
UIGraphicsEndImageContext();
|
UIGraphicsEndImageContext();
|
||||||
|
setTimeout(() => {
|
||||||
|
// ensure set back properly on next tick
|
||||||
view.layer.opacity = originalOpacity;
|
view.layer.opacity = originalOpacity;
|
||||||
|
});
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user