hqchart 1.1.14814 → 1.1.14817

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.14814",
3
+ "version": "1.1.14817",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -403,6 +403,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
403
403
  if (option.DrawTool.StorageKey && chart.ChartDrawStorage) chart.ChartDrawStorage.Load(option.DrawTool.StorageKey);
404
404
  }
405
405
 
406
+ if (option.KeyboardMove)
407
+ {
408
+ var item=option.KeyboardMove;
409
+ if (IFrameSplitOperator.IsPlusNumber(item.Delay)) chart.KeyboardMove.Delay=item.Delay;
410
+ }
411
+
406
412
  if (IFrameSplitOperator.IsNumber(option.StepPixel)) chart.StepPixel=option.StepPixel;
407
413
  if (option.ZoomStepPixel>0) chart.ZoomStepPixel=option.ZoomStepPixel;
408
414
  if (option.IsApiPeriod==true) chart.IsApiPeriod=option.IsApiPeriod;
@@ -3180,7 +3186,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3180
3186
  this.DisableMouse=false; //禁止鼠标事件
3181
3187
  this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;
3182
3188
  this.PressTime=500;
3183
- this.IsPress=false; //是否长按
3189
+ this.IsPress=false; //是否长按
3190
+ this.IsPressKeyboard=false; //是否键盘按键
3184
3191
 
3185
3192
  this.NetworkFilter; //网络请求回调 function(data, callback);
3186
3193
  this.LastMouseStatus={ MouseOnToolbar:null }; // MouseOnToolbar={ Rect:{}, Title: }
@@ -3264,6 +3271,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3264
3271
  this.AryHotKey=[]; //热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
3265
3272
 
3266
3273
  this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250, Enable:false }; //快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
3274
+ this.KeyboardMove={ Timer:null, Delay:100 , Enable:false, Event:null }; //键盘左右移动
3267
3275
 
3268
3276
  this.RestoreFocus=function(delay)
3269
3277
  {
@@ -7433,6 +7441,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7433
7441
  if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
7434
7442
 
7435
7443
  var keyID = e.keyCode ? e.keyCode :e.which;
7444
+ this.IsPressKeyboard=true;
7436
7445
 
7437
7446
  //回调事件
7438
7447
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYDOWN);
@@ -7467,6 +7476,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7467
7476
  switch(keyID)
7468
7477
  {
7469
7478
  case 37: //left
7479
+ if (this.KeyboardMove.Enable) break;
7470
7480
  if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
7471
7481
  {
7472
7482
  if (this.OnCustomKeyDown(keyID, e))
@@ -7506,6 +7516,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7506
7516
  }
7507
7517
  break;
7508
7518
  case 39: //right
7519
+ if (this.KeyboardMove.Enable) break;
7509
7520
  if ((e.ctrlKey|| e.shiftKey) && this.OnCustomKeyDown)
7510
7521
  {
7511
7522
  if (this.OnCustomKeyDown(keyID, e))
@@ -7640,11 +7651,167 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7640
7651
 
7641
7652
  if (draw) this.DrawDynamicInfo();
7642
7653
 
7654
+ if (keyID==37 || keyID==39)
7655
+ this.StartKeyboardMoveTimer(e);
7656
+
7643
7657
  //不让滚动条滚动
7644
7658
  if(e.preventDefault) e.preventDefault();
7645
7659
  else e.returnValue = false;
7646
7660
  }
7647
7661
 
7662
+
7663
+ this.ClearKeyboardMoveTimer=function()
7664
+ {
7665
+ if (!this.KeyboardMove) return;
7666
+
7667
+ this.KeyboardMove.Event=null;
7668
+
7669
+ if (this.KeyboardMove.Timer)
7670
+ {
7671
+ clearTimeout(this.KeyboardMove.Timer);
7672
+ this.KeyboardMove.Timer=null;
7673
+ JSConsole.Chart.Log(`[JSChartContainer::ClearKeyboardMoveTimer] Stop` );
7674
+ }
7675
+
7676
+ this.KeyboardMove.Enable=false;
7677
+ }
7678
+
7679
+ this.StartKeyboardMoveTimer=function(e)
7680
+ {
7681
+ if (!this.KeyboardMove) return;
7682
+ if (this.KeyboardMove.Enable) return; //已启动
7683
+
7684
+ this.KeyboardMove.Event=e;
7685
+ this.KeyboardMove.Enable=true;
7686
+
7687
+ JSConsole.Chart.Log(`[JSChartContainer::StartKeyboardMoveTimer] Start` );
7688
+
7689
+ this.AutoKeyboardMove();
7690
+ }
7691
+
7692
+ this.AutoKeyboardMove=function()
7693
+ {
7694
+ if (!this.KeyboardMove) return false;
7695
+ if (!this.KeyboardMove.Enable) return false;
7696
+ if (!this.KeyboardMove.Event) return false;
7697
+
7698
+ this.KeyboardMove.Timer=setTimeout(()=>
7699
+ {
7700
+ this.OnKeyboardMoveTimerProc();
7701
+ },this.KeyboardMove.Delay);
7702
+ }
7703
+
7704
+
7705
+ this.OnKeyboardMoveTimerProc=function()
7706
+ {
7707
+ if (!this.KeyboardMove) return false;
7708
+ if (!this.KeyboardMove.Enable) return false;
7709
+ if (!this.KeyboardMove.Event) return false;
7710
+
7711
+ var e=this.KeyboardMove.Event;
7712
+ var keyID = e.keyCode ? e.keyCode :e.which;
7713
+ var bStop=false;
7714
+ switch(keyID)
7715
+ {
7716
+ case 37: //left
7717
+ if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
7718
+ {
7719
+ if (this.OnCustomKeyDown(keyID, e))
7720
+ break;
7721
+ }
7722
+
7723
+ //K线 如果超出K线数据了 调整到最后一个数据
7724
+ if (this.FixCursorIndexValid && this.FixCursorIndexValid())
7725
+ {
7726
+ this.UpdatePointByCursorIndex();
7727
+ this.DrawDynamicInfo();
7728
+ this.ShowTooltipByKeyDown();
7729
+ break;
7730
+ }
7731
+
7732
+ if (this.CursorIndex<=0.99999)
7733
+ {
7734
+ if (!this.DataMoveLeft())
7735
+ { //左移数据到头了 触发下载新数据
7736
+ if (this.DragDownloadData) this.DragDownloadData();
7737
+ break;
7738
+ }
7739
+ this.UpdataDataoffset();
7740
+ this.UpdatePointByCursorIndex();
7741
+ this.UpdateFrameMaxMin();
7742
+ this.ResetFrameXSplit();
7743
+ this.Draw();
7744
+ this.ShowTooltipByKeyDown();
7745
+ this.OnKLinePageChange("keydown");
7746
+ }
7747
+ else
7748
+ {
7749
+ --this.CursorIndex;
7750
+ this.UpdatePointByCursorIndex();
7751
+ this.DrawDynamicInfo();
7752
+ this.ShowTooltipByKeyDown();
7753
+ }
7754
+ break;
7755
+
7756
+ case 39: //right
7757
+ if ((e.ctrlKey|| e.shiftKey) && this.OnCustomKeyDown)
7758
+ {
7759
+ if (this.OnCustomKeyDown(keyID, e))
7760
+ break;
7761
+ }
7762
+
7763
+ //K线 如果超出K线数据了 调整到最后一个数据
7764
+ if (this.FixCursorIndexValid && this.FixCursorIndexValid())
7765
+ {
7766
+ this.UpdatePointByCursorIndex();
7767
+ this.DrawDynamicInfo();
7768
+ this.ShowTooltipByKeyDown();
7769
+ break;
7770
+ }
7771
+
7772
+ var xPointcount=0;
7773
+ if (this.Frame.XPointCount) xPointcount=this.Frame.XPointCount;
7774
+ else xPointcount=this.Frame.SubFrame[0].Frame.XPointCount;
7775
+ if (this.CursorIndex+1>=xPointcount)
7776
+ {
7777
+ if (!this.DataMoveRight()) break;
7778
+ this.UpdataDataoffset();
7779
+ this.UpdatePointByCursorIndex();
7780
+ this.UpdateFrameMaxMin();
7781
+ this.ResetFrameXSplit();
7782
+ this.Draw();
7783
+ this.ShowTooltipByKeyDown();
7784
+ this.OnKLinePageChange("keydown");
7785
+ }
7786
+ else
7787
+ {
7788
+ //判断是否在最后一个数据上
7789
+ var data=null;
7790
+ if (this.Frame.Data) data=this.Frame.Data;
7791
+ else data=this.Frame.SubFrame[0].Frame.Data;
7792
+ if (!data) break;
7793
+ if (this.CursorIndex+data.DataOffset+1>=data.Data.length) break;
7794
+
7795
+ ++this.CursorIndex;
7796
+ this.UpdatePointByCursorIndex();
7797
+ this.DrawDynamicInfo();
7798
+ this.ShowTooltipByKeyDown();
7799
+ }
7800
+ break;
7801
+ }
7802
+
7803
+
7804
+ if (!bStop) this.AutoKeyboardMove();
7805
+ return true;
7806
+ }
7807
+
7808
+
7809
+ this.OnKeyUp=function(e)
7810
+ {
7811
+ this.IsPressKeyboard=false;
7812
+ this.ClearKeyboardMoveTimer();
7813
+ }
7814
+
7648
7815
  this.OnDoubleClick=function(x,y,e)
7649
7816
  {
7650
7817
 
@@ -79759,7 +79926,12 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
79759
79926
  }
79760
79927
  }
79761
79928
 
79762
- if (bRegisterKeydown) this.UIElement.addEventListener("keydown", (e)=>{ this.OnKeyDown(e); }, true); //键盘消息
79929
+ if (bRegisterKeydown)
79930
+ {
79931
+ this.UIElement.addEventListener("keydown", (e)=>{ this.OnKeyDown(e); }, true); //键盘消息
79932
+ this.UIElement.addEventListener("keyup", (e)=>{ this.OnKeyUp(e);}, true);
79933
+ }
79934
+
79763
79935
  if (bRegisterWheel) this.UIElement.addEventListener("wheel", (e)=>{ this.OnWheel(e); }, true); //上下滚动消息
79764
79936
 
79765
79937
  this.InitalPopMinuteChart(option);
@@ -81539,7 +81711,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
81539
81711
 
81540
81712
  this.RecvRealtimeData=function(data)
81541
81713
  {
81542
- if (this.IsOnTouch==true) return; //正在操作中不更新数据
81714
+ if (this.IsOnTouch==true) return; //正在操作手势不更新数据
81715
+ if (this.IsPressKeyboard==true) return; //正在操作键盘不更新数据
81543
81716
 
81544
81717
  if (data.Ver==3.0)
81545
81718
  {
@@ -81879,6 +82052,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
81879
82052
  this.RecvMinuteRealtimeDataV2=function(data) //新版本的
81880
82053
  {
81881
82054
  if (this.IsOnTouch==true) return; //正在操作中不更新数据
82055
+ if (this.IsPressKeyboard==true) return; //正在操作键盘不更新数据
82056
+
81882
82057
  if (this.EnableVerifyRecvData && data.symbol!=this.Symbol)
81883
82058
  {
81884
82059
  JSConsole.Chart.Warn(`[KLineChartContainer::RecvMinuteRealtimeDataV2] recv data symbol not match. HQChart[${this.Symbol}] , Recv[${data.symbol}]`);
@@ -95545,7 +95720,11 @@ function DepthChartContainer(uielement)
95545
95720
  }
95546
95721
  }
95547
95722
 
95548
- if (bRegisterKeydown) this.UIElement.addEventListener("keydown", (e)=>{ this.OnKeyDown(e); }, true); //键盘消息
95723
+ if (bRegisterKeydown)
95724
+ {
95725
+ this.UIElement.addEventListener("keydown", (e)=>{ this.OnKeyDown(e); }, true); //键盘消息
95726
+ this.UIElement.addEventListener("keyup", (e)=>{ this.OnKeyUp(e);}, true);
95727
+ }
95549
95728
  if (bRegisterWheel) this.UIElement.addEventListener("wheel", (e)=>{ this.OnWheel(e); }, true); //上下滚动消息
95550
95729
  }
95551
95730
 
@@ -4499,6 +4499,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4499
4499
  if (option.DrawTool.StorageKey && chart.ChartDrawStorage) chart.ChartDrawStorage.Load(option.DrawTool.StorageKey);
4500
4500
  }
4501
4501
 
4502
+ if (option.KeyboardMove)
4503
+ {
4504
+ var item=option.KeyboardMove;
4505
+ if (IFrameSplitOperator.IsPlusNumber(item.Delay)) chart.KeyboardMove.Delay=item.Delay;
4506
+ }
4507
+
4502
4508
  if (IFrameSplitOperator.IsNumber(option.StepPixel)) chart.StepPixel=option.StepPixel;
4503
4509
  if (option.ZoomStepPixel>0) chart.ZoomStepPixel=option.ZoomStepPixel;
4504
4510
  if (option.IsApiPeriod==true) chart.IsApiPeriod=option.IsApiPeriod;
@@ -7276,7 +7282,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7276
7282
  this.DisableMouse=false; //禁止鼠标事件
7277
7283
  this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;
7278
7284
  this.PressTime=500;
7279
- this.IsPress=false; //是否长按
7285
+ this.IsPress=false; //是否长按
7286
+ this.IsPressKeyboard=false; //是否键盘按键
7280
7287
 
7281
7288
  this.NetworkFilter; //网络请求回调 function(data, callback);
7282
7289
  this.LastMouseStatus={ MouseOnToolbar:null }; // MouseOnToolbar={ Rect:{}, Title: }
@@ -7360,6 +7367,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7360
7367
  this.AryHotKey=[]; //热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
7361
7368
 
7362
7369
  this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250, Enable:false }; //快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
7370
+ this.KeyboardMove={ Timer:null, Delay:100 , Enable:false, Event:null }; //键盘左右移动
7363
7371
 
7364
7372
  this.RestoreFocus=function(delay)
7365
7373
  {
@@ -11529,6 +11537,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
11529
11537
  if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
11530
11538
 
11531
11539
  var keyID = e.keyCode ? e.keyCode :e.which;
11540
+ this.IsPressKeyboard=true;
11532
11541
 
11533
11542
  //回调事件
11534
11543
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYDOWN);
@@ -11563,6 +11572,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
11563
11572
  switch(keyID)
11564
11573
  {
11565
11574
  case 37: //left
11575
+ if (this.KeyboardMove.Enable) break;
11566
11576
  if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
11567
11577
  {
11568
11578
  if (this.OnCustomKeyDown(keyID, e))
@@ -11602,6 +11612,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
11602
11612
  }
11603
11613
  break;
11604
11614
  case 39: //right
11615
+ if (this.KeyboardMove.Enable) break;
11605
11616
  if ((e.ctrlKey|| e.shiftKey) && this.OnCustomKeyDown)
11606
11617
  {
11607
11618
  if (this.OnCustomKeyDown(keyID, e))
@@ -11736,11 +11747,167 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
11736
11747
 
11737
11748
  if (draw) this.DrawDynamicInfo();
11738
11749
 
11750
+ if (keyID==37 || keyID==39)
11751
+ this.StartKeyboardMoveTimer(e);
11752
+
11739
11753
  //不让滚动条滚动
11740
11754
  if(e.preventDefault) e.preventDefault();
11741
11755
  else e.returnValue = false;
11742
11756
  }
11743
11757
 
11758
+
11759
+ this.ClearKeyboardMoveTimer=function()
11760
+ {
11761
+ if (!this.KeyboardMove) return;
11762
+
11763
+ this.KeyboardMove.Event=null;
11764
+
11765
+ if (this.KeyboardMove.Timer)
11766
+ {
11767
+ clearTimeout(this.KeyboardMove.Timer);
11768
+ this.KeyboardMove.Timer=null;
11769
+ JSConsole.Chart.Log(`[JSChartContainer::ClearKeyboardMoveTimer] Stop` );
11770
+ }
11771
+
11772
+ this.KeyboardMove.Enable=false;
11773
+ }
11774
+
11775
+ this.StartKeyboardMoveTimer=function(e)
11776
+ {
11777
+ if (!this.KeyboardMove) return;
11778
+ if (this.KeyboardMove.Enable) return; //已启动
11779
+
11780
+ this.KeyboardMove.Event=e;
11781
+ this.KeyboardMove.Enable=true;
11782
+
11783
+ JSConsole.Chart.Log(`[JSChartContainer::StartKeyboardMoveTimer] Start` );
11784
+
11785
+ this.AutoKeyboardMove();
11786
+ }
11787
+
11788
+ this.AutoKeyboardMove=function()
11789
+ {
11790
+ if (!this.KeyboardMove) return false;
11791
+ if (!this.KeyboardMove.Enable) return false;
11792
+ if (!this.KeyboardMove.Event) return false;
11793
+
11794
+ this.KeyboardMove.Timer=setTimeout(()=>
11795
+ {
11796
+ this.OnKeyboardMoveTimerProc();
11797
+ },this.KeyboardMove.Delay);
11798
+ }
11799
+
11800
+
11801
+ this.OnKeyboardMoveTimerProc=function()
11802
+ {
11803
+ if (!this.KeyboardMove) return false;
11804
+ if (!this.KeyboardMove.Enable) return false;
11805
+ if (!this.KeyboardMove.Event) return false;
11806
+
11807
+ var e=this.KeyboardMove.Event;
11808
+ var keyID = e.keyCode ? e.keyCode :e.which;
11809
+ var bStop=false;
11810
+ switch(keyID)
11811
+ {
11812
+ case 37: //left
11813
+ if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
11814
+ {
11815
+ if (this.OnCustomKeyDown(keyID, e))
11816
+ break;
11817
+ }
11818
+
11819
+ //K线 如果超出K线数据了 调整到最后一个数据
11820
+ if (this.FixCursorIndexValid && this.FixCursorIndexValid())
11821
+ {
11822
+ this.UpdatePointByCursorIndex();
11823
+ this.DrawDynamicInfo();
11824
+ this.ShowTooltipByKeyDown();
11825
+ break;
11826
+ }
11827
+
11828
+ if (this.CursorIndex<=0.99999)
11829
+ {
11830
+ if (!this.DataMoveLeft())
11831
+ { //左移数据到头了 触发下载新数据
11832
+ if (this.DragDownloadData) this.DragDownloadData();
11833
+ break;
11834
+ }
11835
+ this.UpdataDataoffset();
11836
+ this.UpdatePointByCursorIndex();
11837
+ this.UpdateFrameMaxMin();
11838
+ this.ResetFrameXSplit();
11839
+ this.Draw();
11840
+ this.ShowTooltipByKeyDown();
11841
+ this.OnKLinePageChange("keydown");
11842
+ }
11843
+ else
11844
+ {
11845
+ --this.CursorIndex;
11846
+ this.UpdatePointByCursorIndex();
11847
+ this.DrawDynamicInfo();
11848
+ this.ShowTooltipByKeyDown();
11849
+ }
11850
+ break;
11851
+
11852
+ case 39: //right
11853
+ if ((e.ctrlKey|| e.shiftKey) && this.OnCustomKeyDown)
11854
+ {
11855
+ if (this.OnCustomKeyDown(keyID, e))
11856
+ break;
11857
+ }
11858
+
11859
+ //K线 如果超出K线数据了 调整到最后一个数据
11860
+ if (this.FixCursorIndexValid && this.FixCursorIndexValid())
11861
+ {
11862
+ this.UpdatePointByCursorIndex();
11863
+ this.DrawDynamicInfo();
11864
+ this.ShowTooltipByKeyDown();
11865
+ break;
11866
+ }
11867
+
11868
+ var xPointcount=0;
11869
+ if (this.Frame.XPointCount) xPointcount=this.Frame.XPointCount;
11870
+ else xPointcount=this.Frame.SubFrame[0].Frame.XPointCount;
11871
+ if (this.CursorIndex+1>=xPointcount)
11872
+ {
11873
+ if (!this.DataMoveRight()) break;
11874
+ this.UpdataDataoffset();
11875
+ this.UpdatePointByCursorIndex();
11876
+ this.UpdateFrameMaxMin();
11877
+ this.ResetFrameXSplit();
11878
+ this.Draw();
11879
+ this.ShowTooltipByKeyDown();
11880
+ this.OnKLinePageChange("keydown");
11881
+ }
11882
+ else
11883
+ {
11884
+ //判断是否在最后一个数据上
11885
+ var data=null;
11886
+ if (this.Frame.Data) data=this.Frame.Data;
11887
+ else data=this.Frame.SubFrame[0].Frame.Data;
11888
+ if (!data) break;
11889
+ if (this.CursorIndex+data.DataOffset+1>=data.Data.length) break;
11890
+
11891
+ ++this.CursorIndex;
11892
+ this.UpdatePointByCursorIndex();
11893
+ this.DrawDynamicInfo();
11894
+ this.ShowTooltipByKeyDown();
11895
+ }
11896
+ break;
11897
+ }
11898
+
11899
+
11900
+ if (!bStop) this.AutoKeyboardMove();
11901
+ return true;
11902
+ }
11903
+
11904
+
11905
+ this.OnKeyUp=function(e)
11906
+ {
11907
+ this.IsPressKeyboard=false;
11908
+ this.ClearKeyboardMoveTimer();
11909
+ }
11910
+
11744
11911
  this.OnDoubleClick=function(x,y,e)
11745
11912
  {
11746
11913
 
@@ -83855,7 +84022,12 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
83855
84022
  }
83856
84023
  }
83857
84024
 
83858
- if (bRegisterKeydown) this.UIElement.addEventListener("keydown", (e)=>{ this.OnKeyDown(e); }, true); //键盘消息
84025
+ if (bRegisterKeydown)
84026
+ {
84027
+ this.UIElement.addEventListener("keydown", (e)=>{ this.OnKeyDown(e); }, true); //键盘消息
84028
+ this.UIElement.addEventListener("keyup", (e)=>{ this.OnKeyUp(e);}, true);
84029
+ }
84030
+
83859
84031
  if (bRegisterWheel) this.UIElement.addEventListener("wheel", (e)=>{ this.OnWheel(e); }, true); //上下滚动消息
83860
84032
 
83861
84033
  this.InitalPopMinuteChart(option);
@@ -85635,7 +85807,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
85635
85807
 
85636
85808
  this.RecvRealtimeData=function(data)
85637
85809
  {
85638
- if (this.IsOnTouch==true) return; //正在操作中不更新数据
85810
+ if (this.IsOnTouch==true) return; //正在操作手势不更新数据
85811
+ if (this.IsPressKeyboard==true) return; //正在操作键盘不更新数据
85639
85812
 
85640
85813
  if (data.Ver==3.0)
85641
85814
  {
@@ -85975,6 +86148,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
85975
86148
  this.RecvMinuteRealtimeDataV2=function(data) //新版本的
85976
86149
  {
85977
86150
  if (this.IsOnTouch==true) return; //正在操作中不更新数据
86151
+ if (this.IsPressKeyboard==true) return; //正在操作键盘不更新数据
86152
+
85978
86153
  if (this.EnableVerifyRecvData && data.symbol!=this.Symbol)
85979
86154
  {
85980
86155
  JSConsole.Chart.Warn(`[KLineChartContainer::RecvMinuteRealtimeDataV2] recv data symbol not match. HQChart[${this.Symbol}] , Recv[${data.symbol}]`);
@@ -99641,7 +99816,11 @@ function DepthChartContainer(uielement)
99641
99816
  }
99642
99817
  }
99643
99818
 
99644
- if (bRegisterKeydown) this.UIElement.addEventListener("keydown", (e)=>{ this.OnKeyDown(e); }, true); //键盘消息
99819
+ if (bRegisterKeydown)
99820
+ {
99821
+ this.UIElement.addEventListener("keydown", (e)=>{ this.OnKeyDown(e); }, true); //键盘消息
99822
+ this.UIElement.addEventListener("keyup", (e)=>{ this.OnKeyUp(e);}, true);
99823
+ }
99645
99824
  if (bRegisterWheel) this.UIElement.addEventListener("wheel", (e)=>{ this.OnWheel(e); }, true); //上下滚动消息
99646
99825
  }
99647
99826
 
@@ -149378,7 +149557,7 @@ function ScrollBarBGChart()
149378
149557
 
149379
149558
 
149380
149559
 
149381
- var HQCHART_VERSION="1.1.14813";
149560
+ var HQCHART_VERSION="1.1.14816";
149382
149561
 
149383
149562
  function PrintHQChartVersion()
149384
149563
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14813";
8
+ var HQCHART_VERSION="1.1.14816";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {