Comments (3)
Hey @naveed1239 ,
can you please try whether setting the captureEvent
prop to true
works?
Generally, it is quite complicated to handle the gestures in subviews, because there could be a conflict with it.
from react-native-zoomable-view.
Hey @naveed1239 ,
can you please try whether setting thecaptureEvent
prop totrue
works?
Generally, it is quite complicated to handle the gestures in subviews, because there could be a conflict with it.
I have already set the "captureEvent" prop to "true" but it's not working. If i am putting the pdf or html views outside the "ReactNativeZoomableView" user able to scroll it smoothly but when I put it inside "ReactNativeZoomableView" user not able to scroll it smoothly. Below is my code
<ReactNativeZoomableView
maxZoom={maxZoomValue}
minZoom={minZoomValue}
zoomStep={zoomingValue}
initialZoom={zoom}
zoomEnabled={zoomEnabled}
bindToBorders
captureEvent={true}
onZoomEnd={(
event: any,
gestureState: any,
zoomableViewEventObject: { lastZoomLevel: any; zoomLevel: any }
) => {
if (zoomableViewEventObject) {
setZoomPercentage(zoomableViewEventObject.zoomLevel);
}
}}
style={{
zIndex: -10,
}}
>
{contentType === "Html" && (
// <View testID="htmlContainer" style={{ flex: 1 }}>
<TouchableWithoutFeedback
style={{ width: "100%", height: "100%" }}
onPress={showAndHideHeaderView}
>
<WebView
source={{
uri: `${BaseURL()}/${filePath}`,
}}
onHttpError={() => {
DisplayAlertWithActions({
title: MultiLanguageSupport.SometingWentWrong,
message: MultiLanguageSupport.HtmlNotAvailable!,
okAction: () => {},
});
}}
onError={() => {
errorLoadingContent(
MultiLanguageSupport.HtmlNotAvailable!,
"error_loading_html_page"
);
}}
onLoad={() => {
callAddToRecentlyView();
addEventToFB("html_page_loaded");
}}
style={{
flex: 1,
zIndex: 10,
elevation: 10,
}}
/>
</TouchableWithoutFeedback>
// </View>
)}
from react-native-zoomable-view.
Unfortunately I am not sure if this problem can be solved, because it's a gesture listener problem.
Both of our packages try to access them and steal them away from each other.
Maybe you can try with custom buttons or something.
Here are the details:
https://github.com/DuDigital/react-native-zoomable-view/releases/tag/v1.1.0
I will close this for now, because I think this is not a specific problem in this package.
If somebody has a solution for this. Please comment here. We would really appreciate it!
from react-native-zoomable-view.
Related Issues (20)
- Better description of the zoomLevel in the documentation HOT 4
- Performance error when zooming HOT 1
- Pinch zoom not centering on users fingers HOT 3
- This package support with IOS or not?
- Getting the same error between all hot reloads on Android
- Getting error when running build on react native app
- bindToBorder Doesn't work. HOT 4
- Is there a way to get the X, Y, Width, and Height of the original image from the section in view? HOT 1
- [feature] Add a feature to stay at maxZoom instead of resetting to initialZoom
- What the ...., thousands of lines of code? HOT 16
- zoomTo doesn't work with multiple images HOT 1
- Cannot scroll left to right without first scrolling up or down.
- return to original size after zoom ends
- If the InitialOffset prop is set, the zoomableView "jumps" on the first pan...
- TouchableOpacity isn't working inside <ReactNativeZoomableView>
- zoom methods (zoomBy, zoomTo etc.) are not found inside ref HOT 1
- Possibility to show videos inside ReactNativeZoomableView
- How Can i stop default double tap ?
- Disable drag HOT 1
- onpress event overate shift behavior
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-zoomable-view.