Details
-
Suggestion
-
Resolution: Out of scope
-
P4: Low
-
4.7.0
-
None
-
6018c6138018eb322ccdc8f34516e77ee43ed83d
Description
The problem we encountered with our image viewer, which is also seen in the flickr demo, is that it is tricky to keep the center the same when zooming in/out. We first took the same solution as in the flickr demo, but the image was slightly "wiggling" while zooming in/out. We then discovered this was due to contentX/Y being int rather than real, so each time the zoom level changed it was affected by rounding errors.
We solved this by introducing another pair of properties that were real, and calculate with those before applying it to contentX/Y. It would all be a lot easier if contentX and contentY simply had real precision.
Probably same for contentWidth/contentHeight.