mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-28 12:08:46 +00:00
优化DataZoom的Marquee框选功能
This commit is contained in:
@@ -117,7 +117,7 @@ namespace XCharts.Runtime
|
||||
dataZoom.context.isCoordinateDrag = true;
|
||||
}
|
||||
}
|
||||
if (dataZoom.supportMarquee)
|
||||
if (dataZoom.supportMarquee && grid.Contains(pos))
|
||||
{
|
||||
dataZoom.context.isMarqueeDrag = true;
|
||||
dataZoom.context.marqueeStartPos = pos;
|
||||
@@ -167,7 +167,7 @@ namespace XCharts.Runtime
|
||||
|
||||
var dataZoom = component;
|
||||
var grid = chart.GetGridOfDataZoom(dataZoom);
|
||||
if (dataZoom.supportMarquee)
|
||||
if (dataZoom.supportMarquee && dataZoom.context.isMarqueeDrag)
|
||||
{
|
||||
Vector2 pos;
|
||||
if (!chart.ScreenPointToChartPoint(eventData.position, out pos))
|
||||
@@ -211,7 +211,7 @@ namespace XCharts.Runtime
|
||||
|
||||
var dataZoom = component;
|
||||
|
||||
if (dataZoom.supportMarquee)
|
||||
if (dataZoom.supportMarquee && dataZoom.context.isMarqueeDrag)
|
||||
{
|
||||
dataZoom.context.isMarqueeDrag = false;
|
||||
if (dataZoom.marqueeStyle.apply)
|
||||
@@ -264,7 +264,8 @@ namespace XCharts.Runtime
|
||||
var dataZoom = component;
|
||||
var grid = chart.GetGridOfDataZoom(dataZoom);
|
||||
if (dataZoom.IsInStartZoom(localPos) ||
|
||||
dataZoom.IsInEndZoom(localPos))
|
||||
dataZoom.IsInEndZoom(localPos) ||
|
||||
dataZoom.IsInSelectedZoom(localPos))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user