Removed unnecessary exportedConstants

Summary: The exportedConstants method incurrs a penalty at bridge startup time for every module that implements it. This diff removes exportedConstants from a few modules that don't really need to use it.

Reviewed By: majak

Differential Revision: D2982341

fb-gh-sync-id: be016187d7b731a073311daacfcf88a0402e1688
shipit-source-id: be016187d7b731a073311daacfcf88a0402e1688
This commit is contained in:
Nick Lockwood
2016-03-10 10:20:53 -08:00
committed by Facebook Github Bot 5
parent d71c05164c
commit 520ad05ba0
8 changed files with 47 additions and 96 deletions

View File

@@ -10,18 +10,11 @@
*/
'use strict';
var ScrollViewConsts = require('UIManager').RCTScrollView.Constants;
function processDecelerationRate(decelerationRate) {
var ScrollViewDecelerationRateNormal = ScrollViewConsts && ScrollViewConsts.DecelerationRate.normal;
var ScrollViewDecelerationRateFast = ScrollViewConsts && ScrollViewConsts.DecelerationRate.fast;
if (typeof decelerationRate === 'string') {
if (decelerationRate === 'fast') {
return ScrollViewDecelerationRateFast;
} else if (decelerationRate === 'normal') {
return ScrollViewDecelerationRateNormal;
}
if (decelerationRate === 'normal') {
decelerationRate = 0.998;
} else if (decelerationRate === 'fast') {
decelerationRate = 0.99;
}
return decelerationRate;
}