mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 20:01:01 +08:00
Reverted commit D3580025
Reviewed By: mhorowitz Differential Revision: D3580025 fbshipit-source-id: 4422b6b97ef844158e369e022d62d6f0ae641222
This commit is contained in:
committed by
Facebook Github Bot 3
parent
ed89d5ba0d
commit
b83ccb5749
@@ -16,9 +16,8 @@ const NativeModules = require('NativeModules');
|
||||
const { UIManager } = NativeModules;
|
||||
|
||||
const findNodeHandle = require('react/lib/findNodeHandle');
|
||||
const invariant = require('fbjs/lib/invariant');
|
||||
|
||||
invariant(UIManager, 'UIManager is undefined. The native module config is probably incorrect.');
|
||||
const _takeSnapshot = UIManager.takeSnapshot;
|
||||
|
||||
/**
|
||||
* Capture an image of the screen, window or an individual view. The image
|
||||
@@ -40,13 +39,12 @@ invariant(UIManager, 'UIManager is undefined. The native module config is probab
|
||||
UIManager.takeSnapshot = async function(
|
||||
view ?: 'window' | ReactElement<any> | number,
|
||||
options ?: {
|
||||
width ?: number,
|
||||
height ?: number,
|
||||
format ?: 'png' | 'jpeg',
|
||||
quality ?: number,
|
||||
width ?: number;
|
||||
height ?: number;
|
||||
format ?: 'png' | 'jpeg';
|
||||
quality ?: number;
|
||||
},
|
||||
) {
|
||||
const _takeSnapshot = UIManager.takeSnapshot;
|
||||
if (!_takeSnapshot) {
|
||||
console.warn('UIManager.takeSnapshot is not available on this platform');
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user