ViewXY: Panning when fully zoomed out
Posted: Wed Jul 23, 2014 1:18 pm
I've been having issues trying to get my chart to disable panning when the chart is 'fully zoomed out' (i have internal values to what defines fully 'zoomed out'. The only way i could accomplish my task was using the 'before panning' event, and cancel is my chart ranges matched the fully 'zoomed out' range.
Since my latest update, it seems the 'beforepanning' method parameters have changed, and I can't cancel the pan!
What do i do from here?
Thanks
Since my latest update, it seems the 'beforepanning' method parameters have changed, and I can't cancel the pan!
What do i do from here?
Thanks
Code: Select all
//new
void ViewXY_BeforePanning(List<RangeInfo> xRanges, List<RangeInfo> yRanges)
{
// no cancel!
}
//old
void ViewXY_BeforePanning(List<RangeChangeInfo> xRanges, List<RangeChangeInfo> yRanges, ref bool cancel)
{
try
{
var range = xRanges.First();
if (range.OldMax.EqualsWithThreshold(this.XAxisMaximumValue) && range.OldMin.EqualsWithThreshold(this.XAxisMinimumValue))
{
cancel = true;
}
}
catch (Exception exception)
{
PCSException.LogException(Get.File(), Get.Line(), exception, MessageSeverity.Severe);
MessageBox.Show(
string.Format(BauerControls.NVH.NVHVisualizationControls.Properties.Resources.UnknownErrorWithLocation,
GetLocation(),
Environment.NewLine,
exception.Message),
BauerControls.NVH.NVHVisualizationControls.Properties.Resources.UnknownErrorCaption,
MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}