mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Stop expose Image.resizeMode
Summary:
Exposing this enum is essentially useless and at worst is a runtime cost that isn't necessary by just using the string.
The value of this enum, as far as I understand it, is to enforce that only valid options are used. We can enforce this at build time with Flow.
I was able to migrate our codebase with a few Find and Replace for things like
```
resizeMode={Image.resizeMode.contain}
```
Reviewed By: yungsters
Differential Revision: D7983982
fbshipit-source-id: ddd7024023f8d2f01aad1fff6c8103983a1bec1a
This commit is contained in:
committed by
Facebook Github Bot
parent
a9a612bfb6
commit
870775ee73
@@ -10,7 +10,6 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const ImageResizeMode = require('ImageResizeMode');
|
||||
const ImageStylePropTypes = require('ImageStylePropTypes');
|
||||
const NativeMethodsMixin = require('NativeMethodsMixin');
|
||||
const NativeModules = require('NativeModules');
|
||||
@@ -132,8 +131,6 @@ const Image = createReactClass({
|
||||
},
|
||||
|
||||
statics: {
|
||||
resizeMode: ImageResizeMode,
|
||||
|
||||
getSize(
|
||||
url: string,
|
||||
success: (width: number, height: number) => void,
|
||||
|
||||
Reference in New Issue
Block a user