mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
[react-packager][streamline oss] Move open sourced JS source to react-native-github
This commit is contained in:
25
Libraries/ReactIOS/ReactIOSGlobalInteractionHandler.js
Normal file
25
Libraries/ReactIOS/ReactIOSGlobalInteractionHandler.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* @providesModule ReactIOSGlobalInteractionHandler
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var InteractionManager = require('InteractionManager');
|
||||
|
||||
// Interaction handle is created/cleared when responder is granted or
|
||||
// released/terminated.
|
||||
var interactionHandle = null;
|
||||
|
||||
var ReactIOSGlobalInteractionHandler = {
|
||||
onChange: function(numberActiveTouches) {
|
||||
if (numberActiveTouches === 0) {
|
||||
if (interactionHandle) {
|
||||
InteractionManager.clearInteractionHandle(interactionHandle);
|
||||
interactionHandle = null;
|
||||
}
|
||||
} else if (!interactionHandle) {
|
||||
interactionHandle = InteractionManager.createInteractionHandle();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = ReactIOSGlobalInteractionHandler;
|
||||
Reference in New Issue
Block a user