Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into thomas/fix-pinch-br…
Browse files Browse the repository at this point in the history
…eaking

# Conflicts:
#	lib/commonjs/ReactNativeZoomableView.js.map
#	lib/module/ReactNativeZoomableView.js.map
  • Loading branch information
thomasvo committed Oct 30, 2024
2 parents 23ded10 + 115c884 commit faa8fdc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lib/commonjs/ReactNativeZoomableView.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/commonjs/ReactNativeZoomableView.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions lib/module/ReactNativeZoomableView.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/module/ReactNativeZoomableView.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/ReactNativeZoomableView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,10 @@ class ReactNativeZoomableView extends Component<
// we don't wanna measure when zoomSubjectWrapperRef is not yet available or has been unmounted
zoomSubjectWrapperRef.current?.measureInWindow(
(x, y, width, height) => {
// When the component is off-screen, these become all 0s, so we don't set them
// to avoid messing up calculations, especially ones that are done right after
// the component transitions from hidden to visible.
if (!x && !y && !width && !height) return;
this.setState({
originalWidth: width,
originalHeight: height,
Expand Down

0 comments on commit faa8fdc

Please sign in to comment.