From 5f3f72ef64095339d8bb52f0a9848d3993f60099 Mon Sep 17 00:00:00 2001 From: kongchuiyu Date: Fri, 21 Jun 2024 14:19:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20[#IA6HFZ]=20=E4=BF=AE=E6=94=B9=20openspa?= =?UTF-8?q?celabs-react-native-zoomable-view=20=E6=8C=87=E5=AF=BC=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...enspacelabs-react-native-zoomable-view.md} | 91 ++++++++++--------- 1 file changed, 46 insertions(+), 45 deletions(-) rename zh-cn/{react-native-zoom-able-view.md => openspacelabs-react-native-zoomable-view.md} (48%) diff --git a/zh-cn/react-native-zoom-able-view.md b/zh-cn/openspacelabs-react-native-zoomable-view.md similarity index 48% rename from zh-cn/react-native-zoom-able-view.md rename to zh-cn/openspacelabs-react-native-zoomable-view.md index d3ce57bf..b1527464 100644 --- a/zh-cn/react-native-zoom-able-view.md +++ b/zh-cn/openspacelabs-react-native-zoomable-view.md @@ -1,7 +1,8 @@ + > 模板版本:v0.2.2

-

react-native-zoomable-view

+

@openspacelabs/react-native-zoomable-view

@@ -134,50 +135,49 @@ const styles = StyleSheet.create({ > [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 -| Name | Type | Description | Required | Platform | HarmonyOS Support | -| -------------------------- | -------- | ---------------------------------------------------------------- | -------- | -------- | ----------------- | -| zoomEnabled | boolean | Can be used to enable or disable the zooming dynamically | no | All | yes | -| panEnabled | boolean | Can be used to enable or disable the panning dynamically | no | All | yes | -| initialZoom | number | Initial zoom level on startup | no | All | yes | -| maxZoom | number | Maximum possible zoom level (zoom in). Can be set to`null` to allow unlimited zooming | no | All | yes | -| minZoom | number | Minimum possible zoom level (zoom out) | no | All | yes | -| disablePanOnInitialZoom | boolean | If true, panning is disabled when zoom level is equal to the initial zoom level | no | All | yes | -| doubleTapDelay | number | How much delay will still be recognized as double press (ms) | no | All | yes | -| doubleTapZoomToCenter | boolean | If true, double tapping will always zoom to center of View instead of the direction it was double tapped in | no | All | yes | -| bindToBorders | boolean | If true, it makes sure the object stays within box borders | no | All | yes | -| zoomStep | number | How much zoom should be applied on double tap | no | All | yes | -| pinchToZoomInSensitivity | number | the level of resistance (sensitivity) to zoom in (0 - 10) - higher is less sensitive | no | All | yes | -| pinchToZoomOutSensitivity | number | the level of resistance (sensitivity) to zoom out (0 - 10) - higher is less sensitive | no | All | yes | -| movementSensibility | number | how resistant should shifting the view around be? (0.5 - 5) - higher is less sensitive | no | All | yes | -| initialOffsetX | number | The horizontal offset the image should start at | no | All | yes | -| initialOffsetY | number | The vertical offset the image should start at | no | All | yes | -| contentHeight | number | Specify if you want to treat the height of the**centered** content inside the zoom subject as the zoom subject's height | no | All | yes | -| contentWidth | number | Specify if you want to treat the width of the**centered** content inside the zoom subject as the zoom subject's width | no | All | yes | -| panBoundaryPadding | number | At certain scales, the edge of the content is bounded too close to the edge of the container, making it difficult to pan to and interact with the edge of the content. To fix this, we'd wanna allow the content to pan just a little further away from the container's edge. Hence, the "pan boundary padding", measured in pixels. | no | All | yes | -| longPressDuration | number | Duration in ms until a press is considered a long press | no | All | yes | -| visualTouchFeedbackEnabled | boolean | Whether to show a touch feedback circle on touch | no | All | yes | -| onTransform | function | Will be called when the transformation configuration (zoom level and offset) changes | no | All | yes | -| onDoubleTapBefore | function | Will be called, at the start of a double tap | no | All | yes | -| onDoubleTapAfter | function | Will be called at the end of a double tap | no | All | yes | -| onShiftingBefore | function | Will be called, when user taps and moves the view, but before our view movement work kicks in (so this is the place to interrupt movement, if you need to) | no | All | yes | -| onShiftingAfter | function | Will be called, when user taps and moves the view, but after the values have changed already | no | All | yes | -| onShiftingEnd | function | Will be called, when user stops a tap and move gesture | no | All | yes | -| onZoomBefore | function | Will be called, while the user pinches the screen, but before our zoom work kicks in (so this is the place to interrupt zooming, if you need to) | no | All | yes | -| onZoomAfter | function | Will be called, while the user pinches the screen, but after the values have changed already | no | All | yes | -| onZoomEnd | function | Will be called after pinchzooming has ended | no | All | yes | -| onLongPress | function | Will be called after the user pressed on the image for a while | no | All | yes | -| onStartShouldSetPanResponder | function | Determines whether the view group responds to touch events when a finger is pressed. | no | All | yes | | no | All | yes | -| onPanResponderGrant | function | The gesture has started | no | All | yes | | no | All | yes | -| onPanResponderEnd | function | Will be called when gesture ends (more accurately, on pan responder "release") | no | All | yes | | no | All | yes | -| onPanResponderTerminate | function | Will be called when the gesture is force-interrupted by another handler | no | All | yes | | no | All | yes | -| onPanResponderTerminationRequest | function | Callback asking whether the gesture should be interrupted by another handler | no | IOSs | yes | | no | All | yes | -| onPanResponderMove | function | Will be called when user moves while touching | no | All | yes | | no | All | yes | -| onShouldBlockNativeResponder | function | Returns whether this component should block native components from becoming the JS responder | no | All | yes | - -| zoomTo | function | Changes the zoom level to a specific number | no | All | yes | -| zoomBy | function | Changes the zoom level relative to the current level (use positive numbers to zoom in, negative numbers to zoom out) | no | All | yes | -| moveTo | function | Shifts the zoomed part to a specific point (in px relative to x: 0, y: 0) | no | All | yes | -| moveBy | function | Shifts the zoomed part by a specific pixel number | no | All | yes | +| Name | Type | Description | Required | Platform | HarmonyOS Support | +| -------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | -------- | ----------------- | +| zoomEnabled | boolean | Can be used to enable or disable the zooming dynamically | no | All | yes | +| panEnabled | boolean | Can be used to enable or disable the panning dynamically | no | All | yes | +| initialZoom | number | Initial zoom level on startup | no | All | yes | +| maxZoom | number | Maximum possible zoom level (zoom in). Can be set to`null` to allow unlimited zooming | no | All | yes | +| minZoom | number | Minimum possible zoom level (zoom out) | no | All | yes | +| disablePanOnInitialZoom | boolean | If true, panning is disabled when zoom level is equal to the initial zoom level | no | All | yes | +| doubleTapDelay | number | How much delay will still be recognized as double press (ms) | no | All | yes | +| doubleTapZoomToCenter | boolean | If true, double tapping will always zoom to center of View instead of the direction it was double tapped in | no | All | yes | +| bindToBorders | boolean | If true, it makes sure the object stays within box borders | no | All | yes | +| zoomStep | number | How much zoom should be applied on double tap | no | All | yes | +| pinchToZoomInSensitivity | number | the level of resistance (sensitivity) to zoom in (0 - 10) - higher is less sensitive | no | All | yes | +| pinchToZoomOutSensitivity | number | the level of resistance (sensitivity) to zoom out (0 - 10) - higher is less sensitive | no | All | yes | +| movementSensibility | number | how resistant should shifting the view around be? (0.5 - 5) - higher is less sensitive | no | All | yes | +| initialOffsetX | number | The horizontal offset the image should start at | no | All | yes | +| initialOffsetY | number | The vertical offset the image should start at | no | All | yes | +| contentHeight | number | Specify if you want to treat the height of the**centered** content inside the zoom subject as the zoom subject's height | no | All | yes | +| contentWidth | number | Specify if you want to treat the width of the**centered** content inside the zoom subject as the zoom subject's width | no | All | yes | +| panBoundaryPadding | number | At certain scales, the edge of the content is bounded too close to the edge of the container, making it difficult to pan to and interact with the edge of the content. To fix this, we'd wanna allow the content to pan just a little further away from the container's edge. Hence, the "pan boundary padding", measured in pixels. | no | All | yes | +| longPressDuration | number | Duration in ms until a press is considered a long press | no | All | yes | +| visualTouchFeedbackEnabled | boolean | Whether to show a touch feedback circle on touch | no | All | yes | +| onTransform | function | Will be called when the transformation configuration (zoom level and offset) changes | no | All | yes | +| onDoubleTapBefore | function | Will be called, at the start of a double tap | no | All | yes | +| onDoubleTapAfter | function | Will be called at the end of a double tap | no | All | yes | +| onShiftingBefore | function | Will be called, when user taps and moves the view, but before our view movement work kicks in (so this is the place to interrupt movement, if you need to) | no | All | yes | +| onShiftingAfter | function | Will be called, when user taps and moves the view, but after the values have changed already | no | All | yes | +| onShiftingEnd | function | Will be called, when user stops a tap and move gesture | no | All | yes | +| onZoomBefore | function | Will be called, while the user pinches the screen, but before our zoom work kicks in (so this is the place to interrupt zooming, if you need to) | no | All | yes | +| onZoomAfter | function | Will be called, while the user pinches the screen, but after the values have changed already | no | All | yes | +| onZoomEnd | function | Will be called after pinchzooming has ended | no | All | yes | +| onLongPress | function | Will be called after the user pressed on the image for a while | no | All | yes | +| onStartShouldSetPanResponder | function | Determines whether the view group responds to touch events when a finger is pressed. | no | All | yes | +| onPanResponderGrant | function | The gesture has started | no | All | yes | +| onPanResponderEnd | function | Will be called when gesture ends (more accurately, on pan responder "release") | no | All | yes | +| onPanResponderTerminate | function | Will be called when the gesture is force-interrupted by another handler | no | All | yes | +| onPanResponderTerminationRequest | function | Callback asking whether the gesture should be interrupted by another handler | no | IOS | yes | +| onPanResponderMove | function | Will be called when user moves while touching | no | All | yes | +| onShouldBlockNativeResponder | function | Returns whether this component should block native components from becoming the JS responder | no | All | yes | +| zoomTo | function | Changes the zoom level to a specific number | no | All | yes | +| zoomBy | function | Changes the zoom level relative to the current level (use positive numbers to zoom in, negative numbers to zoom out) | no | All | yes | +| moveTo | function | Shifts the zoomed part to a specific point (in px relative to x: 0, y: 0) | no | All | yes | +| moveBy | function | Shifts the zoomed part by a specific pixel number | no | All | yes | ## 遗留问题 @@ -186,3 +186,4 @@ const styles = StyleSheet.create({ ## 开源协议 本项目基于 [The MIT License (MIT)](https://github.com/openspacelabs/react-native-zoomable-view/blob/master/LICENSE) ,请自由地享受和参与开源。 + \ No newline at end of file -- Gitee