hqchart 1.1.14829 → 1.1.14834

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.14829",
3
+ "version": "1.1.14834",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -1545,12 +1545,23 @@ function ChartDealList()
1545
1545
  else this.UpdateCacheData();
1546
1546
 
1547
1547
  this.DrawBorder();
1548
+ this.ClipClient();
1548
1549
  this.DrawHeader();
1549
1550
  this.DrawBody();
1551
+ this.Canvas.restore();
1550
1552
 
1551
1553
  this.SizeChange=false;
1552
1554
  }
1553
1555
 
1556
+ this.ClipClient=function()
1557
+ {
1558
+ this.Canvas.save();
1559
+ this.Canvas.beginPath();
1560
+ this.Canvas.rect(this.RectClient.Left,this.RectClient.Top,(this.RectClient.Right-this.RectClient.Left),(this.RectClient.Bottom-this.RectClient.Top));
1561
+ //this.Canvas.stroke(); //调试用
1562
+ this.Canvas.clip();
1563
+ }
1564
+
1554
1565
  //更新缓存变量
1555
1566
  this.UpdateCacheData=function()
1556
1567
  {
@@ -1745,7 +1756,7 @@ function ChartDealList()
1745
1756
  if (dataItem.BGColor)
1746
1757
  {
1747
1758
  this.Canvas.fillStyle=dataItem.BGColor;
1748
- this.Canvas.fillRect(rtRow.Left,rtRow.Top, rtRow.Width, rtRow.Height);
1759
+ this.Canvas.fillRect(rtRow.Left+1,rtRow.Top+1, rtRow.Width-2, rtRow.Height-2);
1749
1760
  }
1750
1761
 
1751
1762
  if (this.DrawSelectedRow(dataItem, index, rtRow))
@@ -3331,13 +3331,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3331
3331
 
3332
3332
  if (bRegisterKeydown)
3333
3333
  {
3334
- this.AddEventListener(this.UIElement,"keydown", this.OnKeyDown, true);
3335
- this.AddEventListener(this.UIElement,"keyup", this.OnKeyUp, true);
3334
+ this.AddEventListener(this.UIElement,"keydown", (e)=>{ this.OnKeyDown(e); }, true);
3335
+ this.AddEventListener(this.UIElement,"keyup", (e)=>{ this.OnKeyUp(e); }, true);
3336
3336
  }
3337
3337
 
3338
3338
  if (bRegisterWheel)
3339
3339
  {
3340
- this.AddEventListener(this.UIElement,"wheel", this.OnWheel, true);
3340
+ this.AddEventListener(this.UIElement,"wheel", (e)=>{ this.OnWheel(e); }, true);
3341
3341
  }
3342
3342
 
3343
3343
  JSConsole.Chart.Log(`[JSChartContainer::AddDefaultEventListener] [keydown,keyup]=${bRegisterKeydown}, [wheel]=${bRegisterWheel}`);
@@ -90847,6 +90847,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
90847
90847
  this.ChangeSymbol=function(symbol,option)
90848
90848
  {
90849
90849
  this.StopDisplayLatest();
90850
+ this.ClearGlobalOption();
90850
90851
  this.CancelAutoUpdate();
90851
90852
  this.AutoUpdateEvent(false, "MinuteChartContainer::ChangeSymbol");
90852
90853
  this.Symbol=symbol;
@@ -90989,6 +90990,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
90989
90990
  if (count<0) return;
90990
90991
 
90991
90992
  this.StopDisplayLatest();
90993
+ this.ClearGlobalOption();
90992
90994
  this.CancelAutoUpdate();
90993
90995
  this.AutoUpdateEvent(false, "MinuteChartContainer::ChangeDayCount");
90994
90996
  this.DayCount=count;
@@ -7427,13 +7427,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7427
7427
 
7428
7428
  if (bRegisterKeydown)
7429
7429
  {
7430
- this.AddEventListener(this.UIElement,"keydown", this.OnKeyDown, true);
7431
- this.AddEventListener(this.UIElement,"keyup", this.OnKeyUp, true);
7430
+ this.AddEventListener(this.UIElement,"keydown", (e)=>{ this.OnKeyDown(e); }, true);
7431
+ this.AddEventListener(this.UIElement,"keyup", (e)=>{ this.OnKeyUp(e); }, true);
7432
7432
  }
7433
7433
 
7434
7434
  if (bRegisterWheel)
7435
7435
  {
7436
- this.AddEventListener(this.UIElement,"wheel", this.OnWheel, true);
7436
+ this.AddEventListener(this.UIElement,"wheel", (e)=>{ this.OnWheel(e); }, true);
7437
7437
  }
7438
7438
 
7439
7439
  JSConsole.Chart.Log(`[JSChartContainer::AddDefaultEventListener] [keydown,keyup]=${bRegisterKeydown}, [wheel]=${bRegisterWheel}`);
@@ -94943,6 +94943,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
94943
94943
  this.ChangeSymbol=function(symbol,option)
94944
94944
  {
94945
94945
  this.StopDisplayLatest();
94946
+ this.ClearGlobalOption();
94946
94947
  this.CancelAutoUpdate();
94947
94948
  this.AutoUpdateEvent(false, "MinuteChartContainer::ChangeSymbol");
94948
94949
  this.Symbol=symbol;
@@ -95085,6 +95086,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
95085
95086
  if (count<0) return;
95086
95087
 
95087
95088
  this.StopDisplayLatest();
95089
+ this.ClearGlobalOption();
95088
95090
  this.CancelAutoUpdate();
95089
95091
  this.AutoUpdateEvent(false, "MinuteChartContainer::ChangeDayCount");
95090
95092
  this.DayCount=count;
@@ -135798,12 +135800,23 @@ function ChartDealList()
135798
135800
  else this.UpdateCacheData();
135799
135801
 
135800
135802
  this.DrawBorder();
135803
+ this.ClipClient();
135801
135804
  this.DrawHeader();
135802
135805
  this.DrawBody();
135806
+ this.Canvas.restore();
135803
135807
 
135804
135808
  this.SizeChange=false;
135805
135809
  }
135806
135810
 
135811
+ this.ClipClient=function()
135812
+ {
135813
+ this.Canvas.save();
135814
+ this.Canvas.beginPath();
135815
+ this.Canvas.rect(this.RectClient.Left,this.RectClient.Top,(this.RectClient.Right-this.RectClient.Left),(this.RectClient.Bottom-this.RectClient.Top));
135816
+ //this.Canvas.stroke(); //调试用
135817
+ this.Canvas.clip();
135818
+ }
135819
+
135807
135820
  //更新缓存变量
135808
135821
  this.UpdateCacheData=function()
135809
135822
  {
@@ -135998,7 +136011,7 @@ function ChartDealList()
135998
136011
  if (dataItem.BGColor)
135999
136012
  {
136000
136013
  this.Canvas.fillStyle=dataItem.BGColor;
136001
- this.Canvas.fillRect(rtRow.Left,rtRow.Top, rtRow.Width, rtRow.Height);
136014
+ this.Canvas.fillRect(rtRow.Left+1,rtRow.Top+1, rtRow.Width-2, rtRow.Height-2);
136002
136015
  }
136003
136016
 
136004
136017
  if (this.DrawSelectedRow(dataItem, index, rtRow))
@@ -149772,7 +149785,7 @@ function ScrollBarBGChart()
149772
149785
 
149773
149786
 
149774
149787
 
149775
- var HQCHART_VERSION="1.1.14828";
149788
+ var HQCHART_VERSION="1.1.14832";
149776
149789
 
149777
149790
  function PrintHQChartVersion()
149778
149791
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14828";
8
+ var HQCHART_VERSION="1.1.14832";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -7471,13 +7471,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7471
7471
 
7472
7472
  if (bRegisterKeydown)
7473
7473
  {
7474
- this.AddEventListener(this.UIElement,"keydown", this.OnKeyDown, true);
7475
- this.AddEventListener(this.UIElement,"keyup", this.OnKeyUp, true);
7474
+ this.AddEventListener(this.UIElement,"keydown", (e)=>{ this.OnKeyDown(e); }, true);
7475
+ this.AddEventListener(this.UIElement,"keyup", (e)=>{ this.OnKeyUp(e); }, true);
7476
7476
  }
7477
7477
 
7478
7478
  if (bRegisterWheel)
7479
7479
  {
7480
- this.AddEventListener(this.UIElement,"wheel", this.OnWheel, true);
7480
+ this.AddEventListener(this.UIElement,"wheel", (e)=>{ this.OnWheel(e); }, true);
7481
7481
  }
7482
7482
 
7483
7483
  JSConsole.Chart.Log(`[JSChartContainer::AddDefaultEventListener] [keydown,keyup]=${bRegisterKeydown}, [wheel]=${bRegisterWheel}`);
@@ -94987,6 +94987,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
94987
94987
  this.ChangeSymbol=function(symbol,option)
94988
94988
  {
94989
94989
  this.StopDisplayLatest();
94990
+ this.ClearGlobalOption();
94990
94991
  this.CancelAutoUpdate();
94991
94992
  this.AutoUpdateEvent(false, "MinuteChartContainer::ChangeSymbol");
94992
94993
  this.Symbol=symbol;
@@ -95129,6 +95130,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
95129
95130
  if (count<0) return;
95130
95131
 
95131
95132
  this.StopDisplayLatest();
95133
+ this.ClearGlobalOption();
95132
95134
  this.CancelAutoUpdate();
95133
95135
  this.AutoUpdateEvent(false, "MinuteChartContainer::ChangeDayCount");
95134
95136
  this.DayCount=count;
@@ -135842,12 +135844,23 @@ function ChartDealList()
135842
135844
  else this.UpdateCacheData();
135843
135845
 
135844
135846
  this.DrawBorder();
135847
+ this.ClipClient();
135845
135848
  this.DrawHeader();
135846
135849
  this.DrawBody();
135850
+ this.Canvas.restore();
135847
135851
 
135848
135852
  this.SizeChange=false;
135849
135853
  }
135850
135854
 
135855
+ this.ClipClient=function()
135856
+ {
135857
+ this.Canvas.save();
135858
+ this.Canvas.beginPath();
135859
+ this.Canvas.rect(this.RectClient.Left,this.RectClient.Top,(this.RectClient.Right-this.RectClient.Left),(this.RectClient.Bottom-this.RectClient.Top));
135860
+ //this.Canvas.stroke(); //调试用
135861
+ this.Canvas.clip();
135862
+ }
135863
+
135851
135864
  //更新缓存变量
135852
135865
  this.UpdateCacheData=function()
135853
135866
  {
@@ -136042,7 +136055,7 @@ function ChartDealList()
136042
136055
  if (dataItem.BGColor)
136043
136056
  {
136044
136057
  this.Canvas.fillStyle=dataItem.BGColor;
136045
- this.Canvas.fillRect(rtRow.Left,rtRow.Top, rtRow.Width, rtRow.Height);
136058
+ this.Canvas.fillRect(rtRow.Left+1,rtRow.Top+1, rtRow.Width-2, rtRow.Height-2);
136046
136059
  }
136047
136060
 
136048
136061
  if (this.DrawSelectedRow(dataItem, index, rtRow))
@@ -160795,7 +160808,7 @@ function HQChartScriptWorker()
160795
160808
 
160796
160809
 
160797
160810
 
160798
- var HQCHART_VERSION="1.1.14828";
160811
+ var HQCHART_VERSION="1.1.14832";
160799
160812
 
160800
160813
  function PrintHQChartVersion()
160801
160814
  {