Open bram-aerts opened 2 years ago
The problem occurs when zooming in on an svg image, specifically in the lower-right region, and only when options.bounds = true.
The view region jumps to the far-right-bottom of the image (showing a blank screen).
The issue seems to be resolved when the following code
else { var transformAdjusted = keepTransformInsideBounds(); if (!transformAdjusted) transform.scale *= ratio; }
is changed to
else { var transformAdjusted = keepTransformInsideBounds(); if (!transformAdjusted || ratio > 1) transform.scale *= ratio; }
i.e., do not prevent zooming in while guarding bounds.
bram-aerts, thank you for suggestion and just additional remark: This is not only related to svg and lower-right region - I am exiriencing the same issue in general and provided chagne does fix it perectly.
The problem occurs when zooming in on an svg image, specifically in the lower-right region, and only when options.bounds = true.
The view region jumps to the far-right-bottom of the image (showing a blank screen).
The issue seems to be resolved when the following code
is changed to
i.e., do not prevent zooming in while guarding bounds.