Closed damienen closed 1 year ago
Hi @icegriffinguru
I'll give this to you.
Have a look and ask me any questions.
Mobile-friendly.
Also for SVG stuff https://www.npmjs.com/package/react-zoom-pan-pinch Based on npm trends and downloads / maintain looks good and it's light it's minzipped and have 9.4 kb https://npmtrends.com/pan-zoom-vs-panzoom-vs-react-svg-pan-zoom-vs-react-zoom-pan-pinch-vs-svg-pan-zoom And also found the storybook to test this library which is nice https://prc5.github.io/react-zoom-pan-pinch/?path=/story/examples-rerendering-content--rerendering-content
@vmradulescu test link - https://github.com/Itheum/explorer-dapp/pull/130
CC @fuzzyduke @damienen
https://www.loom.com/share/1c6db298a9b344f3aedc1d0e3e5364c1?sid=e26ff09c-22f7-4d9a-a3fb-c65810a71b86
@icegriffinguru
Above my feedback for the implementation on desktop. Thanks @Enciusan for the tips as well.
@icegriffinguru I agree with @vmradulescu 's recommendations above.
In Summary, let's do the following>
See example in image.. i.e.
width: auto;
aspect-ratio: 1 / 1;
height: 475px; // you may need a way to dynamically detect and set this based on actual screen (desktop, mobile etc)
margin: auto;
Only issue I just saw, is that we may end up with this when we do the above and do "pan and zoom"
Need to think of a better UX... give me some time
I think this solves it: https://www.loom.com/share/ee46c55f7c244fcbacc67f20b20d3356
See video above.
@icegriffinguru @vmradulescu
When initially opening the bubble map, it does not fit the screen, its around 60-70% of the bubble map. Reproduceable both on desktop and mobile. When clicking the fit to screen button, it is the same behaviour.
Expected: When opening the bubble map, it should completely fit the screen. Same with clicking the fit to screen button.
References: https://www.npmjs.com/package/react-svg-pan-zoom https://blog.logrocket.com/using-dangerouslysetinnerhtml-in-a-react-application/ https://npm.io/package/dompurify