Skip to content

Commit

Permalink
Use forked version of react-zoom-pan-pinch
Browse files Browse the repository at this point in the history
Remove a bunch of hacks and hopefully make it work on mobile now
  • Loading branch information
jboolean committed Dec 22, 2024
1 parent 9c25777 commit bf2e723
Show file tree
Hide file tree
Showing 7 changed files with 215 additions and 161 deletions.
51 changes: 36 additions & 15 deletions frontend/package-lock.json

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

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"author": "Julian Boilen",
"license": "UNLICENSED",
"dependencies": {
"@jboolean/react-zoom-pan-pinch": "^3.7.0",
"@sentry/react": "^7.119.2",
"@sentry/tracing": "^7.114.0",
"@stripe/stripe-js": "^1.42.0",
Expand All @@ -42,7 +43,6 @@
"react-virtualized-auto-sizer": "^1.0.7",
"react-window": "^1.8.7",
"react-window-infinite-loader": "^1.0.9",
"react-zoom-pan-pinch": "^3.6.1",
"zustand": "^4.1.5"
},
"devDependencies": {
Expand Down
11 changes: 11 additions & 0 deletions frontend/src/screens/App/screens/ViewerPane/ViewerPane.less
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
box-sizing: border-box;

color: white;

user-select: all;
}

.buttons {
Expand Down Expand Up @@ -136,6 +138,15 @@
grid-area: zoomHitArea;
}

// Class name to exclude from pinch zoom
.panPinchExcluded {
user-select: text;
}

.panning {
cursor: grabbing !important;
}

.transformWrapper,
.transformContent {
width: 100% !important;
Expand Down
Loading

0 comments on commit bf2e723

Please sign in to comment.