hqchart 1.1.15037 → 1.1.15039

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.15037",
3
+ "version": "1.1.15039",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -3316,7 +3316,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
3316
3316
  this.EnableVerticalDrag=false;
3317
3317
 
3318
3318
  //十字光标长留(手势才有)
3319
- this.ClickModel={ IsShowCorssCursor:false, PreventHide:false, IsClickButton:false }; //PreventHide 阻止隐藏十字光标
3319
+ this.ClickModel=
3320
+ {
3321
+ IsShowCorssCursor:false, PreventHide:false, IsClickButton:false,
3322
+ AutoClose:{ Enable:false, Timer:null, DelayTime:3000 },
3323
+ }; //PreventHide 阻止隐藏十字光标 AutoClose=延迟关闭
3320
3324
  this.EnableClickModel=false;
3321
3325
 
3322
3326
  //标题栏显示最新数据
@@ -5703,6 +5707,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
5703
5707
 
5704
5708
 
5705
5709
  this.StopDragTimer();
5710
+ this.StopAutoCloseCorssCursor();
5706
5711
 
5707
5712
  var isSingleTouch=this.IsSingleTouch(e);
5708
5713
  if (this.EnableScrollUpDown==false || !isSingleTouch || //多点触屏
@@ -6220,6 +6225,29 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
6220
6225
  return true;
6221
6226
  }
6222
6227
 
6228
+ this.StopAutoCloseCorssCursor=function()
6229
+ {
6230
+ if (!this.ClickModel.AutoClose.Timer) return;
6231
+
6232
+ clearTimeout(this.ClickModel.AutoClose.Timer);
6233
+ this.ClickModel.AutoClose.Timer=null;
6234
+ }
6235
+
6236
+ //自动关闭十字光标
6237
+ this.DelayAutoCloseCorssCursor=function()
6238
+ {
6239
+ if (!this.ClickModel.AutoClose.Enable) return false;
6240
+
6241
+ this.StopAutoCloseCorssCursor();
6242
+
6243
+ this.ClickModel.AutoClose.Timer=setTimeout(()=>
6244
+ {
6245
+ this.ClickModel.IsShowCorssCursor=false;
6246
+ this.DrawDynamicInfo();
6247
+
6248
+ }, this.ClickModel.AutoClose.DelayTime)
6249
+ }
6250
+
6223
6251
  this.MoveCorssCursor=function(point,e)
6224
6252
  {
6225
6253
  var pixelTatio = GetDevicePixelRatio();
@@ -86196,8 +86224,15 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
86196
86224
 
86197
86225
  if (this.EnableClickModel===true)
86198
86226
  {
86199
- if (this.ClickModel.IsShowCorssCursor==true && this.ClickModel.PreventHide) return; //阻止隐藏
86200
- if (this.ClickModel.IsShowCorssCursor==true && this.TouchDrawCount>0 ) return;
86227
+ var bShowCorssCursor=false;
86228
+ if (this.ClickModel.IsShowCorssCursor==true && this.ClickModel.PreventHide) bShowCorssCursor=true; //阻止隐藏
86229
+ if (this.ClickModel.IsShowCorssCursor==true && this.TouchDrawCount>0 ) bShowCorssCursor=true;
86230
+
86231
+ if (bShowCorssCursor)
86232
+ {
86233
+ this.DelayAutoCloseCorssCursor(); //自动延迟关闭十字光标
86234
+ return;
86235
+ }
86201
86236
 
86202
86237
  this.ClickModel.IsShowCorssCursor=false;
86203
86238
  this.DrawDynamicInfo();
@@ -86210,7 +86245,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
86210
86245
  return;
86211
86246
  }
86212
86247
 
86213
- for(var i in this.ExtendChartPaint)
86248
+ for(var i=0; i<this.ExtendChartPaint.length; ++i)
86214
86249
  {
86215
86250
  var item=this.ExtendChartPaint[i];
86216
86251
  if (item.ClassName==='KLineTooltipPaint')
@@ -7412,7 +7412,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7412
7412
  this.EnableVerticalDrag=false;
7413
7413
 
7414
7414
  //十字光标长留(手势才有)
7415
- this.ClickModel={ IsShowCorssCursor:false, PreventHide:false, IsClickButton:false }; //PreventHide 阻止隐藏十字光标
7415
+ this.ClickModel=
7416
+ {
7417
+ IsShowCorssCursor:false, PreventHide:false, IsClickButton:false,
7418
+ AutoClose:{ Enable:false, Timer:null, DelayTime:3000 },
7419
+ }; //PreventHide 阻止隐藏十字光标 AutoClose=延迟关闭
7416
7420
  this.EnableClickModel=false;
7417
7421
 
7418
7422
  //标题栏显示最新数据
@@ -9799,6 +9803,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
9799
9803
 
9800
9804
 
9801
9805
  this.StopDragTimer();
9806
+ this.StopAutoCloseCorssCursor();
9802
9807
 
9803
9808
  var isSingleTouch=this.IsSingleTouch(e);
9804
9809
  if (this.EnableScrollUpDown==false || !isSingleTouch || //多点触屏
@@ -10316,6 +10321,29 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10316
10321
  return true;
10317
10322
  }
10318
10323
 
10324
+ this.StopAutoCloseCorssCursor=function()
10325
+ {
10326
+ if (!this.ClickModel.AutoClose.Timer) return;
10327
+
10328
+ clearTimeout(this.ClickModel.AutoClose.Timer);
10329
+ this.ClickModel.AutoClose.Timer=null;
10330
+ }
10331
+
10332
+ //自动关闭十字光标
10333
+ this.DelayAutoCloseCorssCursor=function()
10334
+ {
10335
+ if (!this.ClickModel.AutoClose.Enable) return false;
10336
+
10337
+ this.StopAutoCloseCorssCursor();
10338
+
10339
+ this.ClickModel.AutoClose.Timer=setTimeout(()=>
10340
+ {
10341
+ this.ClickModel.IsShowCorssCursor=false;
10342
+ this.DrawDynamicInfo();
10343
+
10344
+ }, this.ClickModel.AutoClose.DelayTime)
10345
+ }
10346
+
10319
10347
  this.MoveCorssCursor=function(point,e)
10320
10348
  {
10321
10349
  var pixelTatio = GetDevicePixelRatio();
@@ -90292,8 +90320,15 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
90292
90320
 
90293
90321
  if (this.EnableClickModel===true)
90294
90322
  {
90295
- if (this.ClickModel.IsShowCorssCursor==true && this.ClickModel.PreventHide) return; //阻止隐藏
90296
- if (this.ClickModel.IsShowCorssCursor==true && this.TouchDrawCount>0 ) return;
90323
+ var bShowCorssCursor=false;
90324
+ if (this.ClickModel.IsShowCorssCursor==true && this.ClickModel.PreventHide) bShowCorssCursor=true; //阻止隐藏
90325
+ if (this.ClickModel.IsShowCorssCursor==true && this.TouchDrawCount>0 ) bShowCorssCursor=true;
90326
+
90327
+ if (bShowCorssCursor)
90328
+ {
90329
+ this.DelayAutoCloseCorssCursor(); //自动延迟关闭十字光标
90330
+ return;
90331
+ }
90297
90332
 
90298
90333
  this.ClickModel.IsShowCorssCursor=false;
90299
90334
  this.DrawDynamicInfo();
@@ -90306,7 +90341,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
90306
90341
  return;
90307
90342
  }
90308
90343
 
90309
- for(var i in this.ExtendChartPaint)
90344
+ for(var i=0; i<this.ExtendChartPaint.length; ++i)
90310
90345
  {
90311
90346
  var item=this.ExtendChartPaint[i];
90312
90347
  if (item.ClassName==='KLineTooltipPaint')
@@ -153136,7 +153171,7 @@ function ScrollBarBGChart()
153136
153171
 
153137
153172
 
153138
153173
 
153139
- var HQCHART_VERSION="1.1.15036";
153174
+ var HQCHART_VERSION="1.1.15038";
153140
153175
 
153141
153176
  function PrintHQChartVersion()
153142
153177
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.15036";
8
+ var HQCHART_VERSION="1.1.15038";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -7456,7 +7456,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7456
7456
  this.EnableVerticalDrag=false;
7457
7457
 
7458
7458
  //十字光标长留(手势才有)
7459
- this.ClickModel={ IsShowCorssCursor:false, PreventHide:false, IsClickButton:false }; //PreventHide 阻止隐藏十字光标
7459
+ this.ClickModel=
7460
+ {
7461
+ IsShowCorssCursor:false, PreventHide:false, IsClickButton:false,
7462
+ AutoClose:{ Enable:false, Timer:null, DelayTime:3000 },
7463
+ }; //PreventHide 阻止隐藏十字光标 AutoClose=延迟关闭
7460
7464
  this.EnableClickModel=false;
7461
7465
 
7462
7466
  //标题栏显示最新数据
@@ -9843,6 +9847,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
9843
9847
 
9844
9848
 
9845
9849
  this.StopDragTimer();
9850
+ this.StopAutoCloseCorssCursor();
9846
9851
 
9847
9852
  var isSingleTouch=this.IsSingleTouch(e);
9848
9853
  if (this.EnableScrollUpDown==false || !isSingleTouch || //多点触屏
@@ -10360,6 +10365,29 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10360
10365
  return true;
10361
10366
  }
10362
10367
 
10368
+ this.StopAutoCloseCorssCursor=function()
10369
+ {
10370
+ if (!this.ClickModel.AutoClose.Timer) return;
10371
+
10372
+ clearTimeout(this.ClickModel.AutoClose.Timer);
10373
+ this.ClickModel.AutoClose.Timer=null;
10374
+ }
10375
+
10376
+ //自动关闭十字光标
10377
+ this.DelayAutoCloseCorssCursor=function()
10378
+ {
10379
+ if (!this.ClickModel.AutoClose.Enable) return false;
10380
+
10381
+ this.StopAutoCloseCorssCursor();
10382
+
10383
+ this.ClickModel.AutoClose.Timer=setTimeout(()=>
10384
+ {
10385
+ this.ClickModel.IsShowCorssCursor=false;
10386
+ this.DrawDynamicInfo();
10387
+
10388
+ }, this.ClickModel.AutoClose.DelayTime)
10389
+ }
10390
+
10363
10391
  this.MoveCorssCursor=function(point,e)
10364
10392
  {
10365
10393
  var pixelTatio = GetDevicePixelRatio();
@@ -90336,8 +90364,15 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
90336
90364
 
90337
90365
  if (this.EnableClickModel===true)
90338
90366
  {
90339
- if (this.ClickModel.IsShowCorssCursor==true && this.ClickModel.PreventHide) return; //阻止隐藏
90340
- if (this.ClickModel.IsShowCorssCursor==true && this.TouchDrawCount>0 ) return;
90367
+ var bShowCorssCursor=false;
90368
+ if (this.ClickModel.IsShowCorssCursor==true && this.ClickModel.PreventHide) bShowCorssCursor=true; //阻止隐藏
90369
+ if (this.ClickModel.IsShowCorssCursor==true && this.TouchDrawCount>0 ) bShowCorssCursor=true;
90370
+
90371
+ if (bShowCorssCursor)
90372
+ {
90373
+ this.DelayAutoCloseCorssCursor(); //自动延迟关闭十字光标
90374
+ return;
90375
+ }
90341
90376
 
90342
90377
  this.ClickModel.IsShowCorssCursor=false;
90343
90378
  this.DrawDynamicInfo();
@@ -90350,7 +90385,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
90350
90385
  return;
90351
90386
  }
90352
90387
 
90353
- for(var i in this.ExtendChartPaint)
90388
+ for(var i=0; i<this.ExtendChartPaint.length; ++i)
90354
90389
  {
90355
90390
  var item=this.ExtendChartPaint[i];
90356
90391
  if (item.ClassName==='KLineTooltipPaint')
@@ -164982,7 +165017,7 @@ function HQChartScriptWorker()
164982
165017
 
164983
165018
 
164984
165019
 
164985
- var HQCHART_VERSION="1.1.15036";
165020
+ var HQCHART_VERSION="1.1.15038";
164986
165021
 
164987
165022
  function PrintHQChartVersion()
164988
165023
  {