mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-05 19:24:21 +00:00
+4
-13
@@ -136,14 +136,9 @@ function resolveAssetUri(source): ?string {
|
|||||||
const Image = forwardRef<ImageProps, *>((props, ref) => {
|
const Image = forwardRef<ImageProps, *>((props, ref) => {
|
||||||
const {
|
const {
|
||||||
accessibilityLabel,
|
accessibilityLabel,
|
||||||
accessibilityRole,
|
|
||||||
accessibilityState,
|
|
||||||
accessible,
|
|
||||||
blurRadius,
|
blurRadius,
|
||||||
defaultSource,
|
defaultSource,
|
||||||
draggable,
|
draggable,
|
||||||
importantForAccessibility,
|
|
||||||
nativeID,
|
|
||||||
onError,
|
onError,
|
||||||
onLayout,
|
onLayout,
|
||||||
onLoad,
|
onLoad,
|
||||||
@@ -151,7 +146,8 @@ const Image = forwardRef<ImageProps, *>((props, ref) => {
|
|||||||
onLoadStart,
|
onLoadStart,
|
||||||
pointerEvents,
|
pointerEvents,
|
||||||
source,
|
source,
|
||||||
testID
|
style,
|
||||||
|
...rest
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
if (process.env.NODE_ENV !== 'production') {
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
@@ -180,7 +176,7 @@ const Image = forwardRef<ImageProps, *>((props, ref) => {
|
|||||||
const requestRef = useRef(null);
|
const requestRef = useRef(null);
|
||||||
const shouldDisplaySource = state === LOADED || (state === LOADING && defaultSource == null);
|
const shouldDisplaySource = state === LOADED || (state === LOADING && defaultSource == null);
|
||||||
const [flatStyle, _resizeMode, filter, tintColor] = getFlatStyle(
|
const [flatStyle, _resizeMode, filter, tintColor] = getFlatStyle(
|
||||||
props.style,
|
style,
|
||||||
blurRadius,
|
blurRadius,
|
||||||
filterRef.current
|
filterRef.current
|
||||||
);
|
);
|
||||||
@@ -274,17 +270,12 @@ const Image = forwardRef<ImageProps, *>((props, ref) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
|
{...rest}
|
||||||
accessibilityLabel={accessibilityLabel}
|
accessibilityLabel={accessibilityLabel}
|
||||||
accessibilityRole={accessibilityRole}
|
|
||||||
accessibilityState={accessibilityState}
|
|
||||||
accessible={accessible}
|
|
||||||
importantForAccessibility={importantForAccessibility}
|
|
||||||
nativeID={nativeID}
|
|
||||||
onLayout={handleLayout}
|
onLayout={handleLayout}
|
||||||
pointerEvents={pointerEvents}
|
pointerEvents={pointerEvents}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
style={[styles.root, hasTextAncestor && styles.inline, imageSizeStyle, flatStyle]}
|
style={[styles.root, hasTextAncestor && styles.inline, imageSizeStyle, flatStyle]}
|
||||||
testID={testID}
|
|
||||||
>
|
>
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
|
|||||||
Reference in New Issue
Block a user