Group: Forum Members
Last Active: Last Year
Posts: 17,
Visits: 338
|
Following an update from 18.4.26.12 to 18.7.18.12 drag select doesn't work for one of our charts. We want to drag select when the left mouse button is down and pan when the middle mouse button is down. It now also pans with the left mouse button down, you can't drag select.
|
Group: Forum Members
Last Active: Today @ 1:54 AM
Posts: 3,054,
Visits: 4,009
|
Hi Stuart, Can you post the code that you use to configure the control for review?
Best Regards, Nevron Support Team
|
Group: Forum Members
Last Active: Last Year
Posts: 17,
Visits: 338
|
Hi, We add the pan tool first, with MouseButton.Middle as a parameter. It seems to try to pan with the left / right buttons pressed too. I have just tried to work around the problem by subclassing NDataPanTool. It seems to work:
public class NDataPanTooFix : NDataPanTool { public override bool CanBeginDrag(object sender, NMouseEventArgs e) { if ( e.Button != BeginDragMouseCommand.MouseButton ) return false; return base.CanBeginDrag(sender, e); } }
This is how we configure the tools:
var dataPanTool = new NDataPanTool(); dataPanTool.BeginDragMouseCommand = new NMouseCommand(MouseAction.Down, MouseButton.Middle, 1); dataPanTool.EndDragMouseCommand = new NMouseCommand(MouseAction.Up, MouseButton.Middle, 1); dataPanTool.EndDrag -= dataZoomOrPanTool_EndDrag; dataPanTool.EndDrag += dataZoomOrPanTool_EndDrag; _nWpfChartControl.Controller.Tools.Add(dataPanTool);
var boxSelectTool = new NDragSelectPointsTool(); boxSelectTool.BeginDragMouseCommand = new NMouseCommand(MouseAction.Down, MouseButton.Left, 1); boxSelectTool.EndDragMouseCommand = new NMouseCommand(MouseAction.Up, MouseButton.Left, 1); boxSelectTool.EndDrag -= boxSelectTool_EndDrag; boxSelectTool.EndDrag += boxSelectTool_EndDrag; _nWpfChartControl.Controller.Tools.Add(boxSelectTool);
|
Group: Forum Members
Last Active: Today @ 1:54 AM
Posts: 3,054,
Visits: 4,009
|
Hi Stuart, Thank you for posting the code. We've been able to replicate the problem and will publish a SP today or tomorrow.
Best Regards, Nevron Support Team
|