06-14-2019, 06:07 PM
I've been experimenting with the Painter sample. If I check the 'Is Viewbox limited', I get the panning behavior I desired (I can't pan outside normal display bounds with the mini map).
I won't be allowing mouse wheel on the MiniMap. I only want to limit panning.
I don't really understand what the Viewbox rect represent (I've read and re-read the documentation), but I can't wrap my head around it for some reason.
If I want to allow any zoom, but limit panning, what would I set for the ViewboxLimits and/or ViewboxMinSize?
------
Also, I noticed a bit of a behavior I don't really like with the MiniMap, and don't like, but also unsure how to fix: when zoomed in partially, but not enough where the red box is smaller than the width / height of the actual image, I'm able to pan outside of the bounds (slightly) even when IsViewboxLimited is true.
IE, in the Painter sample, when I'm slightly zoomed in, the vertical bars are enabled, but horizontal bars are disabled (because the content isn't wide enough yet). But even though the horizontal bars are disabled, I can pan left and right. I'd like the content to remain centered (vertically & horizontally), and only allow panning if the appropriate direction scrollbar is enabled / visible.
Here's some screenshots of what I'm trying to describe:
I've zoomed in but haven't panned yet:
I panned to the left most edge:
I panned to the right most edge:
Basically, in the above screenshots, I should be allowed to pan vertically (because the scroll bars are enabled), but not horizontally. Horizontal should remain centered on the content.
I'm also going to have causes where because I'm using StretchAndZoomDirection: DownAndZoom, I will have an image that even when slightly zoomed in will not have vertical or horizontal scrollbars yet, and the panning there should not be allowed to pan in any direction.
I won't be allowing mouse wheel on the MiniMap. I only want to limit panning.
I don't really understand what the Viewbox rect represent (I've read and re-read the documentation), but I can't wrap my head around it for some reason.
If I want to allow any zoom, but limit panning, what would I set for the ViewboxLimits and/or ViewboxMinSize?
------
Also, I noticed a bit of a behavior I don't really like with the MiniMap, and don't like, but also unsure how to fix: when zoomed in partially, but not enough where the red box is smaller than the width / height of the actual image, I'm able to pan outside of the bounds (slightly) even when IsViewboxLimited is true.
IE, in the Painter sample, when I'm slightly zoomed in, the vertical bars are enabled, but horizontal bars are disabled (because the content isn't wide enough yet). But even though the horizontal bars are disabled, I can pan left and right. I'd like the content to remain centered (vertically & horizontally), and only allow panning if the appropriate direction scrollbar is enabled / visible.
Here's some screenshots of what I'm trying to describe:
I've zoomed in but haven't panned yet:
I panned to the left most edge:
I panned to the right most edge:
Basically, in the above screenshots, I should be allowed to pan vertically (because the scroll bars are enabled), but not horizontally. Horizontal should remain centered on the content.
I'm also going to have causes where because I'm using StretchAndZoomDirection: DownAndZoom, I will have an image that even when slightly zoomed in will not have vertical or horizontal scrollbars yet, and the panning there should not be allowed to pan in any direction.