hqchart 1.1.14489 → 1.1.14496
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/jscommon/umychart.js
CHANGED
|
@@ -859,7 +859,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
859
859
|
if (option.DisableMouse==true) chart.DisableMouse=option.DisableMouse;
|
|
860
860
|
if (option.ScriptError) chart.ScriptErrorCallback=option.ScriptError; //指标执行错误回调
|
|
861
861
|
if (IFrameSplitOperator.IsString(option.SplashTitle)) chart.LoadDataSplashTitle=option.SplashTitle;
|
|
862
|
-
if (IFrameSplitOperator.IsBool(option.EnableSelectRect)) chart.EnableSelectRect=option.EnableSelectRect; //是否启用区间选择
|
|
863
862
|
if (IFrameSplitOperator.IsBool(option.EnableZoomIndexWindow)) chart.EnableZoomIndexWindow=option.EnableZoomIndexWindow;
|
|
864
863
|
if (IFrameSplitOperator.IsBool(option.IsDrawPictureXY)) chart.IsDrawPictureXY=option.IsDrawPictureXY;
|
|
865
864
|
if (IFrameSplitOperator.IsBool(option.EnableNewIndex)) chart.EnableNewIndex=option.EnableNewIndex;
|
|
@@ -867,6 +866,14 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
867
866
|
if (IFrameSplitOperator.IsBool(option.EnableVerifyRecvData)) chart.EnableVerifyRecvData=option.EnableVerifyRecvData;
|
|
868
867
|
if (IFrameSplitOperator.IsBool(option.EnableNightDayBG)) chart.EnableNightDayBG=option.EnableNightDayBG;
|
|
869
868
|
|
|
869
|
+
//老版本开启左键区间选择
|
|
870
|
+
if (IFrameSplitOperator.IsBool(option.EnableSelectRect))
|
|
871
|
+
{
|
|
872
|
+
if (!option.DragSelectRect) option.DragSelectRect={ };
|
|
873
|
+
option.DragSelectRect.Enable=true;
|
|
874
|
+
option.DragSelectRect.EnableLButton=true;
|
|
875
|
+
}
|
|
876
|
+
|
|
870
877
|
if (option.GlobalOption)
|
|
871
878
|
{
|
|
872
879
|
var item=option.GlobalOption;
|
|
@@ -939,7 +946,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
939
946
|
{
|
|
940
947
|
if (!option.DragSelectRect)
|
|
941
948
|
{
|
|
942
|
-
option.DragSelectRect={
|
|
949
|
+
option.DragSelectRect={ EnableLButton:true }; //默认开启区间选中画布
|
|
943
950
|
}
|
|
944
951
|
|
|
945
952
|
if (option.DragSelectRect)
|
|
@@ -2843,7 +2850,7 @@ var JSCHART_MENU_ID=
|
|
|
2843
2850
|
CMD_SHOW_STOCKCHIP_ID:20, //筹码分布
|
|
2844
2851
|
CMD_HIDE_STOCKCHIP_ID:21,
|
|
2845
2852
|
|
|
2846
|
-
|
|
2853
|
+
CMD_XXXXXX_NONE_ID:22, //未用!!!!
|
|
2847
2854
|
CMD_CHANGE_DAY_COUNT_ID:23, //切换天数
|
|
2848
2855
|
CMD_SHOW_BEFORE_DATA_ID:24, //显示|隐藏集合竞价
|
|
2849
2856
|
|
|
@@ -2887,6 +2894,9 @@ var JSCHART_MENU_ID=
|
|
|
2887
2894
|
CMD_CORSS_ON_KLINE_ID:51, //十字光标只能画在K线上
|
|
2888
2895
|
CMD_CORSS_POINT_ID:52, //十字光标圆点
|
|
2889
2896
|
|
|
2897
|
+
CMD_RBUTTON_SELECT_RECT_ID:53, //右键区间选择
|
|
2898
|
+
CMD_LBUTTON_SELECT_RECT_ID:54, //左键区间选择
|
|
2899
|
+
|
|
2890
2900
|
|
|
2891
2901
|
|
|
2892
2902
|
CMD_REPORT_CHANGE_BLOCK_ID:100, //报价列表 切换板块ID
|
|
@@ -3139,6 +3149,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3139
3149
|
|
|
3140
3150
|
|
|
3141
3151
|
this.RestoreFocusTimer=null; //恢复焦点定时器
|
|
3152
|
+
this.DocContextMenuTimer=null; //清空整体的框架
|
|
3142
3153
|
|
|
3143
3154
|
this.RestoreFocus=function(delay)
|
|
3144
3155
|
{
|
|
@@ -3589,7 +3600,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3589
3600
|
|
|
3590
3601
|
if(typeof(this.OnRightMenu)=='function') this.OnRightMenu(x,y,e); //右键菜单事件
|
|
3591
3602
|
|
|
3592
|
-
|
|
3603
|
+
if (e && e.preventDefault) e.preventDefault();
|
|
3604
|
+
if (e && e.stopPropagation) e.stopPropagation();
|
|
3605
|
+
e.returnValue=false;
|
|
3593
3606
|
}
|
|
3594
3607
|
|
|
3595
3608
|
this.UIOnDblClick=function(e)
|
|
@@ -4112,15 +4125,17 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4112
4125
|
|
|
4113
4126
|
document.onmousemove=(e)=>{ this.DocOnMouseMove(e); }
|
|
4114
4127
|
document.onmouseup=(e)=> { this.DocOnMouseUp(e); }
|
|
4115
|
-
|
|
4116
|
-
|
|
4128
|
+
document.oncontextmenu=(e)=> { this.DocContextMenu(e); }
|
|
4117
4129
|
}
|
|
4118
4130
|
|
|
4119
4131
|
this.DocOnMouseMove=function(e)
|
|
4120
4132
|
{
|
|
4121
4133
|
//加载数据中,禁用鼠标事件
|
|
4122
4134
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash) return;
|
|
4123
|
-
|
|
4135
|
+
|
|
4136
|
+
var bRButtonSelectRect=this.IsEnableRSelectRect(e, "DocOnMouseMove"); //右键区间选择
|
|
4137
|
+
var bLButtonSelectRect=this.IsEnableLSelectRect(e, "DocOnMouseMove"); //左键区间选择
|
|
4138
|
+
|
|
4124
4139
|
var drag=this.MouseDrag;
|
|
4125
4140
|
if (!drag) return;
|
|
4126
4141
|
|
|
@@ -4159,7 +4174,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4159
4174
|
drag.LastMove.X=e.clientX;
|
|
4160
4175
|
drag.LastMove.Y=e.clientY;
|
|
4161
4176
|
}
|
|
4162
|
-
else if (this.IndexChartDrag && this.IndexChartDrag.SelectedChart)
|
|
4177
|
+
else if (this.IndexChartDrag && this.IndexChartDrag.SelectedChart) //选中图形移动
|
|
4163
4178
|
{
|
|
4164
4179
|
if(Math.abs(drag.LastMove.Y-e.clientY)<2 && Math.abs(drag.LastMove.X-e.clientX)<2) return;
|
|
4165
4180
|
|
|
@@ -4189,7 +4204,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4189
4204
|
var sendData={X:x, Y:y, e:e, ChartDrag:this.CustomChartDrag, Drag:drag };
|
|
4190
4205
|
this.TryDragMove_CustomChartDrag(sendData);
|
|
4191
4206
|
}
|
|
4192
|
-
else if (this.CurrentChartDrawPicture && this.CurrentChartDrawPicture.EnableMove===true)
|
|
4207
|
+
else if (this.CurrentChartDrawPicture && this.CurrentChartDrawPicture.EnableMove===true) //画图工具移动
|
|
4193
4208
|
{
|
|
4194
4209
|
var drawPicture=this.CurrentChartDrawPicture;
|
|
4195
4210
|
if (drawPicture.Status==1 || drawPicture.Status==2)
|
|
@@ -4231,11 +4246,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4231
4246
|
drag.LastMove.X=e.clientX;
|
|
4232
4247
|
drag.LastMove.Y=e.clientY;
|
|
4233
4248
|
}
|
|
4234
|
-
else if (
|
|
4235
|
-
{
|
|
4236
|
-
this.OnDragMode_One({X:moveSetp, Y:moveSetpY}, e);
|
|
4237
|
-
}
|
|
4238
|
-
else if (this.DragMode==2) //区间选择
|
|
4249
|
+
else if ((bLButtonSelectRect || bRButtonSelectRect) && !isDragSelectRect && !isDragSubSelectRect) //左右键区间选择
|
|
4239
4250
|
{
|
|
4240
4251
|
var yMoveSetp=Math.abs(drag.LastMove.Y-e.clientY);
|
|
4241
4252
|
|
|
@@ -4249,7 +4260,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4249
4260
|
|
|
4250
4261
|
drag.LastMove.X=e.clientX;
|
|
4251
4262
|
drag.LastMove.Y=e.clientY;
|
|
4252
|
-
|
|
4263
|
+
}
|
|
4264
|
+
else if (this.DragMode==1 || isDragSelectRect || isDragSubSelectRect) //数据上下左右拖拽 区间选择框左右拖动
|
|
4265
|
+
{
|
|
4266
|
+
this.OnDragMode_One({X:moveSetp, Y:moveSetpY}, e);
|
|
4253
4267
|
}
|
|
4254
4268
|
}
|
|
4255
4269
|
|
|
@@ -4390,11 +4404,32 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4390
4404
|
return true;
|
|
4391
4405
|
}
|
|
4392
4406
|
|
|
4407
|
+
this.ClearDocContextMenuTimer=function(delay)
|
|
4408
|
+
{
|
|
4409
|
+
var value=5000;
|
|
4410
|
+
if (IFrameSplitOperator.IsNumber(delay)) value=delay;
|
|
4411
|
+
|
|
4412
|
+
if (this.DocContextMenuTimer)
|
|
4413
|
+
{
|
|
4414
|
+
clearTimeout(this.DocContextMenuTimer);
|
|
4415
|
+
this.DocContextMenuTimer = null;
|
|
4416
|
+
}
|
|
4417
|
+
|
|
4418
|
+
this.DocContextMenuTimer=setTimeout(()=>
|
|
4419
|
+
{
|
|
4420
|
+
document.oncontextmenu=null;
|
|
4421
|
+
}, value);
|
|
4422
|
+
}
|
|
4423
|
+
|
|
4393
4424
|
this.DocOnMouseUp=function(e)
|
|
4394
4425
|
{
|
|
4395
4426
|
//清空事件
|
|
4396
4427
|
document.onmousemove=null;
|
|
4397
4428
|
document.onmouseup=null;
|
|
4429
|
+
|
|
4430
|
+
var bRButtonSelectRect=this.IsEnableRSelectRect(e, "DocOnMouseUp"); //右键区间选择
|
|
4431
|
+
var bLButtonSelectRect=this.IsEnableLSelectRect(e, "DocOnMouseUp"); //左键区间选择
|
|
4432
|
+
|
|
4398
4433
|
var IsMinuteChart=(this.ClassName=="MinuteChartContainer" || this.ClassName=="MinuteChartHScreenContainer") ? true:false;
|
|
4399
4434
|
var isDragSelectRect=(this.RectSelectDrag && this.RectSelectDrag.Index>=0);
|
|
4400
4435
|
var isDragSubSelectRect=(this.RectSelectDrag && this.RectSelectDrag.Type==4);
|
|
@@ -4441,7 +4476,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4441
4476
|
{
|
|
4442
4477
|
if (this.OnMinuteSelectRectMouseUp) this.OnMinuteSelectRectMouseUp(e);
|
|
4443
4478
|
}
|
|
4444
|
-
else if (
|
|
4479
|
+
else if (bLButtonSelectRect || bRButtonSelectRect) //区间选择
|
|
4445
4480
|
{
|
|
4446
4481
|
var drag=this.MouseDrag;
|
|
4447
4482
|
drag.LastMove.X=e.clientX;
|
|
@@ -4457,7 +4492,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4457
4492
|
selectData.JSChartContainer=this;
|
|
4458
4493
|
selectData.Stock={Symbol:this.Symbol, Name:this.Name};
|
|
4459
4494
|
|
|
4460
|
-
if (
|
|
4495
|
+
if (!this.BorderDrag && this.GetSelectRectData(selectData))
|
|
4461
4496
|
{
|
|
4462
4497
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_SELECT_RECT);
|
|
4463
4498
|
var paint=this.GetRectSelectPaint();
|
|
@@ -4534,6 +4569,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4534
4569
|
this.IndexChartDrag=null;
|
|
4535
4570
|
this.CustomChartDrag=null;
|
|
4536
4571
|
if (bClearDrawPicture===true) this.CurrentChartDrawPicture=null;
|
|
4572
|
+
|
|
4573
|
+
this.ClearDocContextMenuTimer(5000);
|
|
4574
|
+
}
|
|
4575
|
+
|
|
4576
|
+
this.DocContextMenu=function(e)
|
|
4577
|
+
{
|
|
4578
|
+
e.preventDefault();
|
|
4537
4579
|
}
|
|
4538
4580
|
|
|
4539
4581
|
this.UIOnMounseOut=function(e)
|
|
@@ -10093,10 +10135,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10093
10135
|
this.Draw();
|
|
10094
10136
|
}
|
|
10095
10137
|
break;
|
|
10096
|
-
case JSCHART_MENU_ID.CMD_ENABLE_SELECT_RECT_ID:
|
|
10097
|
-
if (IFrameSplitOperator.IsBool(srcParam))
|
|
10098
|
-
this.EnableSelectRect=srcParam;
|
|
10099
|
-
break;
|
|
10100
10138
|
case JSCHART_MENU_ID.CMD_CHANGE_DAY_COUNT_ID:
|
|
10101
10139
|
if (this.ChangeDayCount && param!=null)
|
|
10102
10140
|
this.ChangeDayCount(param);
|
|
@@ -10291,6 +10329,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10291
10329
|
case JSCHART_MENU_ID.CMD_CORSS_POINT_ID:
|
|
10292
10330
|
if (IFrameSplitOperator.IsBool(srcParam) && this.ChartCorssCursor) this.ChartCorssCursor.CorssPointConfig.Enable=srcParam;
|
|
10293
10331
|
break;
|
|
10332
|
+
case JSCHART_MENU_ID.CMD_RBUTTON_SELECT_RECT_ID:
|
|
10333
|
+
if (IFrameSplitOperator.IsBool(srcParam) && this.ChartDragSelectRect) this.ChartDragSelectRect.EnableRButton=srcParam;
|
|
10334
|
+
break;
|
|
10335
|
+
case JSCHART_MENU_ID.CMD_LBUTTON_SELECT_RECT_ID:
|
|
10336
|
+
if (IFrameSplitOperator.IsBool(srcParam) && this.ChartDragSelectRect) this.ChartDragSelectRect.EnableLButton=srcParam;
|
|
10337
|
+
break;
|
|
10294
10338
|
}
|
|
10295
10339
|
}
|
|
10296
10340
|
|
|
@@ -10465,7 +10509,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10465
10509
|
var chart=g_ExtendChartPaintFactory.Create("RectDragPaint",option);
|
|
10466
10510
|
if (!chart) return null;
|
|
10467
10511
|
|
|
10468
|
-
if (option && option.Enable===true) chart.Enable=true;
|
|
10469
10512
|
chart.ChartBorder=this.Frame.ChartBorder;
|
|
10470
10513
|
chart.ChartFrame=this.Frame;
|
|
10471
10514
|
chart.HQChart=this;
|
|
@@ -10700,6 +10743,44 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10700
10743
|
{
|
|
10701
10744
|
return null;
|
|
10702
10745
|
}
|
|
10746
|
+
|
|
10747
|
+
this.IsEnableRSelectRect=function(event, funcName)
|
|
10748
|
+
{
|
|
10749
|
+
if (!this.ChartDragSelectRect) return false;
|
|
10750
|
+
if (!this.ChartDragSelectRect.EnableRButton) return false;
|
|
10751
|
+
if (!event) return false;
|
|
10752
|
+
|
|
10753
|
+
//两个事件使用不同的变量获取鼠标按键状态
|
|
10754
|
+
if (funcName=="DocOnMouseUp")
|
|
10755
|
+
{
|
|
10756
|
+
if (event.button!=2) return false;
|
|
10757
|
+
}
|
|
10758
|
+
else if (funcName=="DocOnMouseMove")
|
|
10759
|
+
{
|
|
10760
|
+
if (event.buttons!=2) return false;
|
|
10761
|
+
}
|
|
10762
|
+
|
|
10763
|
+
return true;
|
|
10764
|
+
}
|
|
10765
|
+
|
|
10766
|
+
this.IsEnableLSelectRect=function(event, funcName)
|
|
10767
|
+
{
|
|
10768
|
+
if (!this.ChartDragSelectRect) return false;
|
|
10769
|
+
if (!this.ChartDragSelectRect.EnableLButton) return false;
|
|
10770
|
+
if (!event) return false;
|
|
10771
|
+
|
|
10772
|
+
//两个事件使用不同的变量获取鼠标按键状态
|
|
10773
|
+
if (funcName=="DocOnMouseUp")
|
|
10774
|
+
{
|
|
10775
|
+
if (event.button!=0) return false;
|
|
10776
|
+
}
|
|
10777
|
+
else if (funcName=="DocOnMouseMove")
|
|
10778
|
+
{
|
|
10779
|
+
if (event.buttons!=1) return false;
|
|
10780
|
+
}
|
|
10781
|
+
|
|
10782
|
+
return true;
|
|
10783
|
+
}
|
|
10703
10784
|
}
|
|
10704
10785
|
|
|
10705
10786
|
function GetDevicePixelRatio()
|
|
@@ -23386,7 +23467,9 @@ function ChartData()
|
|
|
23386
23467
|
if (this.Data[i] && this.Data[i].Value!=null)
|
|
23387
23468
|
{
|
|
23388
23469
|
var item=this.Data[i].Value;
|
|
23389
|
-
if (
|
|
23470
|
+
if (IFrameSplitOperator.IsNumber(item))
|
|
23471
|
+
result[i]=item;
|
|
23472
|
+
else if (IFrameSplitOperator.IsString(item))
|
|
23390
23473
|
result[i]=item;
|
|
23391
23474
|
else if (item instanceof Array) //支持数组
|
|
23392
23475
|
result[i]=item;
|
|
@@ -33420,7 +33503,7 @@ function ChartIndexTitle()
|
|
|
33420
33503
|
|
|
33421
33504
|
this.GetMaxMin=function()
|
|
33422
33505
|
{
|
|
33423
|
-
return
|
|
33506
|
+
return { Min:null, Max:null };
|
|
33424
33507
|
}
|
|
33425
33508
|
}
|
|
33426
33509
|
|
|
@@ -48062,13 +48145,20 @@ function RectDragPaint()
|
|
|
48062
48145
|
this.LineWidth=g_JSChartResource.RectDrag.LineWidth;
|
|
48063
48146
|
this.BGColor=g_JSChartResource.RectDrag.BGColor;
|
|
48064
48147
|
this.ShowMode=0; //0=只画边框 1=遮挡未选中区域 2=整体全选
|
|
48065
|
-
|
|
48148
|
+
|
|
48149
|
+
this.EnableRButton=false; //右键选择
|
|
48150
|
+
this.EnableLButton=false; //左键选择
|
|
48066
48151
|
|
|
48067
48152
|
this.FirstPoint;
|
|
48068
48153
|
this.SecondPoint;
|
|
48069
48154
|
|
|
48070
48155
|
this.IsClearCanvas=true; //画布是否是清空状态
|
|
48071
48156
|
|
|
48157
|
+
this.IsEnable=function()
|
|
48158
|
+
{
|
|
48159
|
+
return this.EnableRButton || this.EnableLButton;
|
|
48160
|
+
}
|
|
48161
|
+
|
|
48072
48162
|
//设置参数接口
|
|
48073
48163
|
this.SetOption=function(option)
|
|
48074
48164
|
{
|
|
@@ -48077,6 +48167,8 @@ function RectDragPaint()
|
|
|
48077
48167
|
if (option.LineColor) this.LineColor=option.LineColor;
|
|
48078
48168
|
if (option.BGColor) this.BGColor=option.BGColor;
|
|
48079
48169
|
if (IFrameSplitOperator.IsNumber(option.ShowMode)) this.ShowMode=option.ShowMode;
|
|
48170
|
+
if (IFrameSplitOperator.IsBool(option.EnableRButton)) this.EnableRButton=option.EnableRButton;
|
|
48171
|
+
if (IFrameSplitOperator.IsBool(option.EnableLButton)) this.EnableLButton=option.EnableLButton;
|
|
48080
48172
|
}
|
|
48081
48173
|
}
|
|
48082
48174
|
|
|
@@ -48171,7 +48263,7 @@ function RectDragPaint()
|
|
|
48171
48263
|
|
|
48172
48264
|
this.Draw=function()
|
|
48173
48265
|
{
|
|
48174
|
-
if (!this.
|
|
48266
|
+
if (!this.IsEnable()) return;
|
|
48175
48267
|
if (!this.HQChart) return;
|
|
48176
48268
|
|
|
48177
48269
|
var finder=this.HQChart.GetExtraCanvas(JSChart.RectDragCanvasKey);
|
|
@@ -81244,6 +81336,14 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81244
81336
|
var bPopMinuteChart=false;
|
|
81245
81337
|
if (this.PopMinuteChart) bPopMinuteChart=true;
|
|
81246
81338
|
|
|
81339
|
+
var bRButtonSelectRect=false, bLButtonSelectRect=false;
|
|
81340
|
+
if (this.ChartDragSelectRect)
|
|
81341
|
+
{
|
|
81342
|
+
bRButtonSelectRect=this.ChartDragSelectRect.EnableRButton;
|
|
81343
|
+
bLButtonSelectRect=this.ChartDragSelectRect.EnableLButton;
|
|
81344
|
+
}
|
|
81345
|
+
|
|
81346
|
+
|
|
81247
81347
|
var kItem=null;
|
|
81248
81348
|
if (frameID>=0 && option && IFrameSplitOperator.IsNumber(option.CursorIndex))
|
|
81249
81349
|
{
|
|
@@ -81425,7 +81525,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81425
81525
|
|
|
81426
81526
|
{ Name:"禁止拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[0]}, Checked:0==this.DragMode },
|
|
81427
81527
|
{ Name:"启动拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1]}, Checked:1==this.DragMode },
|
|
81428
|
-
{ Name:"左键区间选择", Data:{ ID:JSCHART_MENU_ID.
|
|
81528
|
+
{ Name:"左键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_LBUTTON_SELECT_RECT_ID, Args:[!bLButtonSelectRect]}, Checked:bLButtonSelectRect },
|
|
81529
|
+
{ Name:"右键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_RBUTTON_SELECT_RECT_ID, Args:[!bRButtonSelectRect]}, Checked:bRButtonSelectRect },
|
|
81429
81530
|
{ Name:JSPopMenu.SEPARATOR_LINE_NAME },
|
|
81430
81531
|
|
|
81431
81532
|
{ Name:"背景分割", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_BG_SPLIT_ID, Args:[!bBGSpit]}, Checked:bBGSpit},
|
|
@@ -83655,7 +83756,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
83655
83756
|
this.HistoryMinuteApiUrl=g_JSChartResource.Domain+'/API/StockMinuteData'; //历史分钟数据
|
|
83656
83757
|
|
|
83657
83758
|
this.ColorLineData; //主图价格线颜色自定义配置
|
|
83658
|
-
this.EnableSelectRect=false; //是否可以区间选择
|
|
83659
83759
|
|
|
83660
83760
|
this.CorssCursorIndex={ DayIndex:-1, DataIndex:-1, Point:{X:-1, Y:-1} ,Type:-1 }; //Type: 单日(1=主图 2=盘前 3=盘后) 多日(10=主图 20=盘前 30=盘后)
|
|
83661
83761
|
this.EnableNewIndex=false //是否使用新的索引版本
|
|
@@ -84016,7 +84116,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84016
84116
|
}
|
|
84017
84117
|
}
|
|
84018
84118
|
}
|
|
84019
|
-
else if (this.RectSelectDrag && this.RectSelectDrag.Index>=0) //区间选择
|
|
84119
|
+
else if (this.RectSelectDrag && this.RectSelectDrag.Index>=0) //区间选择 左右调整
|
|
84020
84120
|
{
|
|
84021
84121
|
if (moveSetp<5) return;
|
|
84022
84122
|
var obj={ X:e.clientX, Y:e.clientY, PointIndex:this.RectSelectDrag.Index, Name:"MoveRectSelectLine" };
|
|
@@ -84026,10 +84126,10 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84026
84126
|
bNeedDraw=true;
|
|
84027
84127
|
}
|
|
84028
84128
|
}
|
|
84029
|
-
else
|
|
84129
|
+
else //显示区间选择
|
|
84030
84130
|
{
|
|
84031
84131
|
if (moveSetp<5 && yMoveSetp<5) return;
|
|
84032
|
-
if (!this.
|
|
84132
|
+
if (this.ChartDragSelectRect && !this.ChartDragSelectRect.Enable) return;
|
|
84033
84133
|
|
|
84034
84134
|
//this.UIElement.style.cursor="default";
|
|
84035
84135
|
this.SetCursor({Cursor:"default"});
|
|
@@ -84047,6 +84147,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84047
84147
|
|
|
84048
84148
|
this.OnMinuteSelectRectMouseUp=function(e)
|
|
84049
84149
|
{
|
|
84150
|
+
var bRButtonSelectRect=this.IsEnableRSelectRect(e, "DocOnMouseUp"); //右键区间选择
|
|
84151
|
+
var bLButtonSelectRect=this.IsEnableLSelectRect(e, "DocOnMouseUp"); //左键区间选择
|
|
84152
|
+
|
|
84050
84153
|
var drag=this.MouseDrag;
|
|
84051
84154
|
drag.LastMove.X=e.clientX;
|
|
84052
84155
|
drag.LastMove.Y=e.clientY;
|
|
@@ -84065,7 +84168,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84065
84168
|
{
|
|
84066
84169
|
|
|
84067
84170
|
}
|
|
84068
|
-
else if (
|
|
84171
|
+
else if ((bRButtonSelectRect || bLButtonSelectRect) && !this.BorderDrag && this.GetSelectRectData(selectData))
|
|
84069
84172
|
{
|
|
84070
84173
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_SELECT_RECT);
|
|
84071
84174
|
var paint=this.GetRectSelectPaint();
|
|
@@ -85404,7 +85507,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
85404
85507
|
bCorssDrawPoint=this.ChartCorssCursor.CorssPointConfig.Enable;
|
|
85405
85508
|
}
|
|
85406
85509
|
|
|
85407
|
-
|
|
85510
|
+
var bRButtonSelectRect=false,bLButtonSelectRect=false;
|
|
85511
|
+
if (this.ChartDragSelectRect)
|
|
85512
|
+
{
|
|
85513
|
+
bRButtonSelectRect=this.ChartDragSelectRect.EnableRButton;
|
|
85514
|
+
bLButtonSelectRect=this.ChartDragSelectRect.EnableLButton;
|
|
85515
|
+
}
|
|
85516
|
+
|
|
85408
85517
|
var minItem=null;
|
|
85409
85518
|
if (frameID>=0 && option && IFrameSplitOperator.IsNumber(option.CursorIndex))
|
|
85410
85519
|
{
|
|
@@ -85477,7 +85586,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
85477
85586
|
]
|
|
85478
85587
|
},
|
|
85479
85588
|
{
|
|
85480
|
-
Name:"区间选择",
|
|
85589
|
+
Name:"区间选择",
|
|
85590
|
+
SubMenu:
|
|
85591
|
+
[
|
|
85592
|
+
{ Name:"左键区间选择",Data:{ ID:JSCHART_MENU_ID.CMD_LBUTTON_SELECT_RECT_ID, Args:[!bLButtonSelectRect]}, Checked:bLButtonSelectRect },
|
|
85593
|
+
{ Name:"右键区间选择",Data:{ ID:JSCHART_MENU_ID.CMD_RBUTTON_SELECT_RECT_ID, Args:[!bRButtonSelectRect]}, Checked:bRButtonSelectRect },
|
|
85594
|
+
]
|
|
85481
85595
|
},
|
|
85482
85596
|
{
|
|
85483
85597
|
Name:"十字光标",
|