rn-web-cli
Version:
React Native for Web
1 lines • 2.02 kB
Source Map (JSON)
{"version":3,"sources":["node_modules\\fbjs\\lib\\TouchEventUtils.js"],"names":["TouchEventUtils","extractSingleTouch","nativeEvent","touches","changedTouches","hasTouches","length","hasChangedTouches","module","exports"],"mappings":"AAAA;;;;;;;;;;;;AAYA,GAAIA,iBAAkB;;;;;;;;;;;AAWpBC,mBAAoB,QAASA,mBAAT,CAA4BC,WAA5B,CAAyC;AAC3D,GAAIC,SAAUD,YAAYC,OAA1B;AACA,GAAIC,gBAAiBF,YAAYE,cAAjC;AACA,GAAIC,YAAaF,SAAWA,QAAQG,MAAR,CAAiB,CAA7C;AACA,GAAIC,mBAAoBH,gBAAkBA,eAAeE,MAAf,CAAwB,CAAlE;;AAEA,MAAO,CAACD,UAAD,EAAeE,iBAAf,CAAmCH,eAAe,CAAf,CAAnC,CAAuDC,WAAaF,QAAQ,CAAR,CAAb,CAA0BD,WAAxF;AACD,CAlBmB,CAAtB;;;AAqBAM,OAAOC,OAAP,CAAiBT,eAAjB","file":"TouchEventUtils.js","sourceRoot":"D:/Work/Office/react-native-on-web/cli/tmpl/project","sourcesContent":["\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\nvar TouchEventUtils = {\n /**\n * Utility function for common case of extracting out the primary touch from a\n * touch event.\n * - `touchEnd` events usually do not have the `touches` property.\n * http://stackoverflow.com/questions/3666929/\n * mobile-sarai-touchend-event-not-firing-when-last-touch-is-removed\n *\n * @param {Event} nativeEvent Native event that may or may not be a touch.\n * @return {TouchesObject?} an object with pageX and pageY or null.\n */\n extractSingleTouch: function extractSingleTouch(nativeEvent) {\n var touches = nativeEvent.touches;\n var changedTouches = nativeEvent.changedTouches;\n var hasTouches = touches && touches.length > 0;\n var hasChangedTouches = changedTouches && changedTouches.length > 0;\n\n return !hasTouches && hasChangedTouches ? changedTouches[0] : hasTouches ? touches[0] : nativeEvent;\n }\n};\n\nmodule.exports = TouchEventUtils;"]}