BLUE
PHP 7.4.33
Path:
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/react-native/Libraries/Pressability
Run
Logout
Edit File
Size: 1.65 KB
Close
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/react-native/Libraries/Pressability/HoverState.js
Text
Base64
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict * @format */ import Platform from '../Utilities/Platform'; let isEnabled = false; /* $FlowFixMe[incompatible-type] Error found due to incomplete typing of * Platform.flow.js */ if (Platform.OS === 'web') { const canUseDOM = Boolean( typeof window !== 'undefined' && window.document && window.document.createElement, ); if (canUseDOM) { /** * Web browsers emulate mouse events (and hover states) after touch events. * This code infers when the currently-in-use modality supports hover * (including for multi-modality devices) and considers "hover" to be enabled * if a mouse movement occurs more than 1 second after the last touch event. * This threshold is long enough to account for longer delays between the * browser firing touch and mouse events on low-powered devices. */ const HOVER_THRESHOLD_MS = 1000; let lastTouchTimestamp = 0; const enableHover = () => { if (isEnabled || Date.now() - lastTouchTimestamp < HOVER_THRESHOLD_MS) { return; } isEnabled = true; }; const disableHover = () => { lastTouchTimestamp = Date.now(); if (isEnabled) { isEnabled = false; } }; document.addEventListener('touchstart', disableHover, true); document.addEventListener('touchmove', disableHover, true); document.addEventListener('mousemove', enableHover, true); } } export function isHoverEnabled(): boolean { return isEnabled; }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
HoverState.js
1.65 KB
lrw-r--r--
2025-03-28 11:04:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Pressability.js
30.85 KB
lrw-r--r--
2025-03-28 11:04:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PressabilityDebug.js
2.16 KB
lrw-r--r--
2025-03-28 11:04:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PressabilityPerformanceEventEmitter.js
1.35 KB
lrw-r--r--
2025-03-28 11:04:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PressabilityTypes.js
424 B
lrw-r--r--
2025-03-28 11:04:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
usePressability.js
1.90 KB
lrw-r--r--
2025-03-28 11:04:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).