cozy / cozy-photos-v3

Cozy Photos app for Cozy Cloud
GNU Affero General Public License v3.0
1 stars 9 forks source link

feat: Zoom and pan images in the viewer #140

Closed y-lohse closed 7 years ago

y-lohse commented 7 years ago

(3) [PHO] Ajout du zoom et du drag à la visionneuse sur mobile

y-lohse commented 7 years ago

I considered moving the pan and zoom code into a HOC, but ultimately I decided against it because there are a few places where the photo viewer and this code are tightly coupled:

It's possible to make these things generic and package everything into a library, but I don't think it would make the code clearer. IMO the pan & zoom code is related to the photo viewer, and only the photo viewer, so that's where it should be.

enguerran commented 7 years ago

I like when we apply SRP, and the component here has way too much responsibilities. But if you did consider every possible solution, I can swallow back my SRP needs.