hqchart 1.1.13492 → 1.1.13502

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.
@@ -6678,6 +6678,9 @@ var JSCHART_MENU_ID=
6678
6678
  CMD_CHANGE_LANGUAGE_ID:37, //语言切换
6679
6679
 
6680
6680
  CMD_CHANGE_DRAG_RECT_SHOW_MODE_ID:38,
6681
+
6682
+
6683
+ CMD_REPORT_CHANGE_BLOCK_ID:60, //报价列表 切换板块ID
6681
6684
  }
6682
6685
 
6683
6686
 
@@ -13787,7 +13790,7 @@ function IsRecvOverlap(rect1, rect2)
13787
13790
  return Math.max(rect1.Left,rect2.Left) < Math.min(rect1.Right,rect2.Right) && Math.max(rect1.Top,rect2.Top) < Math.min(rect1.Bottom,rect2.Bottom);
13788
13791
  }
13789
13792
 
13790
- function CopyMerginConfig(dest,src)
13793
+ function CopyMarginConfig(dest,src)
13791
13794
  {
13792
13795
  if (!src || !dest) return;
13793
13796
 
@@ -13797,6 +13800,9 @@ function CopyMerginConfig(dest,src)
13797
13800
  if (IFrameSplitOperator.IsNumber(src.Bottom)) dest.Bottom=src.Bottom;
13798
13801
  }
13799
13802
 
13803
+ //兼容老版本
13804
+ function CopyMerginConfig(dest,src) { CopyMarginConfig(dest,src); }
13805
+
13800
13806
 
13801
13807
  function Point()
13802
13808
  {
@@ -53034,6 +53040,9 @@ function ChartCorssCursor()
53034
53040
  Icon:g_JSChartResource.CorssCursor.RightButton.Icon
53035
53041
  };
53036
53042
 
53043
+ this.RightMargin={ Left:2, Right:2, Top:4, Bottom:3 };
53044
+ CopyMarginConfig(this.RightMargin, g_JSChartResource.CorssCursor.RightMargin);
53045
+
53037
53046
  //内部使用
53038
53047
  this.Close=null; //收盘价格
53039
53048
  this.Status=0; //当前状态 0=隐藏 1=显示
@@ -53401,6 +53410,7 @@ function ChartCorssCursor()
53401
53410
  var text=this.StringFormatY.Text;
53402
53411
  this.Canvas.font=this.Font;
53403
53412
  var textWidth=this.Canvas.measureText(text).width+4; //前后各空2个像素
53413
+ var textSize={ Width:textWidth, Height:this.TextHeight, Text:[] };
53404
53414
  var buttonData={Y:y, YValue:yValue, FrameID:yValueExtend.FrameID };
53405
53415
  if (this.Frame.ChartBorder.Left>=30 && this.ShowTextMode.Left==1)
53406
53416
  {
@@ -53430,38 +53440,37 @@ function ChartCorssCursor()
53430
53440
  this.Canvas.fillText(text,left+2,y,textWidth);
53431
53441
  }
53432
53442
 
53443
+ var complexText=
53444
+ {
53445
+ ShowType:0, //0=单行(默认) 1=多行
53446
+ Font:this.Font, Color:this.TextColor,
53447
+ Text:[ { Text:text, Margin:this.RightMargin } ],
53448
+ };
53449
+
53450
+ var yTop=y-this.TextHeight/2;
53451
+
53433
53452
  if (this.StringFormatY.PercentageText)
53434
53453
  {
53435
53454
  if (this.TextFormat.Right==0)
53436
53455
  {
53437
53456
  text=this.StringFormatY.PercentageText+'%';
53438
- textWidth=this.Canvas.measureText(text).width+4; //前后各空2个像素
53457
+ complexText.Text[0].Text=text;
53439
53458
  }
53440
53459
  }
53441
53460
 
53442
53461
  if (this.StringFormatY.RText)
53443
53462
  {
53444
53463
  text=this.StringFormatY.RText;
53445
- var textWidth=this.Canvas.measureText(text).width+4; //前后各空2个像素
53464
+ complexText.Text[0].Text=text;
53446
53465
  }
53447
53466
 
53448
- var complexText=null;
53449
53467
  if (this.StringFormatY.RComplexText && IFrameSplitOperator.IsNonEmptyArray(this.StringFormatY.RComplexText.Text))
53450
53468
  {
53451
- var textWidth=0;
53452
53469
  complexText=this.StringFormatY.RComplexText;
53453
- for(var i=0; i<complexText.Text.length; ++i)
53454
- {
53455
- var item=complexText.Text[i];
53456
- var itemWidth=this.Canvas.measureText(item.Text).width+4; //前后各空2个像素
53457
-
53458
- if (i>0 && IFrameSplitOperator.IsNumber(complexText.Space))
53459
- textWidth+=complexText.Space;
53460
-
53461
- textWidth+=itemWidth;
53462
- }
53463
53470
  }
53464
53471
 
53472
+ this.CalculateComplexTextSize(complexText, textSize);
53473
+
53465
53474
  if (this.Frame.ChartBorder.Right>=30 && this.ShowTextMode.Right==1)
53466
53475
  {
53467
53476
  var isOverlayIndex=false; //是否有叠加子坐标
@@ -53470,66 +53479,52 @@ function ChartCorssCursor()
53470
53479
  {
53471
53480
  var frame=this.Frame.SubFrame[yValueExtend.FrameID];
53472
53481
  isOverlayIndex=frame.OverlayIndex.length>0;
53473
- overlayIndexInterval=frame.Interval;
53482
+ overlayIndexInterval=null
53483
+ if (isOverlayIndex)
53484
+ {
53485
+ for(var i=0;i<=frame.OverlayIndex.length;++i)
53486
+ {
53487
+ var item=frame.OverlayIndex[i];
53488
+ if (item.Frame.IsShow===false) continue;
53489
+ if (!item.Frame.GetXHorizontal) continue;
53490
+
53491
+ var overlayLeft=item.Frame.GetXHorizontal();
53492
+ overlayIndexInterval=overlayLeft-right;
53493
+ break;
53494
+ }
53495
+ }
53474
53496
  }
53475
53497
 
53476
- if (isOverlayIndex && textWidth>overlayIndexInterval) //大于子坐标宽度
53498
+ //叠加坐标
53499
+ if (isOverlayIndex && textSize.Width>overlayIndexInterval && overlayIndexInterval>0) //大于子坐标宽度
53477
53500
  {
53478
53501
  var drawRight=right+overlayIndexInterval;
53479
53502
  if (drawRight>chartRight) drawRight=chartRight;
53480
53503
 
53481
- var itemLeft=drawRight-2-textWidth;
53482
- this.DrawTextBGRect(itemLeft,y-this.TextHeight/2,textWidth,this.TextHeight);
53483
- if (complexText)
53484
- {
53485
- this.DrawComplexText(itemLeft,y,complexText);
53486
- }
53487
- else
53488
- {
53489
- this.Canvas.textAlign="right";
53490
- this.Canvas.textBaseline="middle";
53491
- this.Canvas.fillStyle=this.TextColor;
53492
- this.Canvas.fillText(text,drawRight-4,y,textWidth);
53493
- }
53504
+ var itemLeft=drawRight-2-textSize.Width;
53505
+ this.DrawTextBGRect(itemLeft,yTop,textSize.Width,textSize.Height);
53506
+ this.DrawComplexTextV2(itemLeft, yTop, complexText, textSize);
53507
+
53508
+ if (this.RightButton.Enable) this.DrawRightButton(yTop, itemLeft,this.TextHeight,this.TextHeight,buttonData);
53494
53509
  }
53495
- else if (rightWidth<textWidth) //右边空白显示不下,
53510
+ else if (rightWidth<textSize.Width) //右边空白显示不下,
53496
53511
  {
53497
- var itemLeft=chartRight-2-textWidth;
53498
- this.DrawTextBGRect(itemLeft,y-this.TextHeight/2,textWidth,this.TextHeight);
53499
- if (complexText)
53500
- {
53501
- this.DrawComplexText(itemLeft,y,complexText);
53502
- }
53503
- else
53504
- {
53505
- this.Canvas.textAlign="right";
53506
- this.Canvas.textBaseline="middle";
53507
- this.Canvas.fillStyle=this.TextColor;
53508
- this.Canvas.fillText(text,chartRight-4,y,textWidth);
53509
- }
53510
-
53511
- if (this.RightButton.Enable) this.DrawRightButton(y-this.TextHeight/2, chartRight-2-textWidth,this.TextHeight,this.TextHeight,buttonData);
53512
+ var itemLeft=chartRight-2-textSize.Width;
53513
+ this.DrawTextBGRect(itemLeft,yTop,textSize.Width,textSize.Height);
53514
+ this.DrawComplexTextV2(itemLeft, yTop ,complexText, textSize);
53515
+
53516
+ if (this.RightButton.Enable) this.DrawRightButton(yTop, chartRight-2-textSize.Width,this.TextHeight,this.TextHeight,buttonData);
53512
53517
  }
53513
53518
  else
53514
53519
  {
53515
53520
  var itemLeft=right+2;
53516
- this.DrawTextBGRect(itemLeft,y-this.TextHeight/2,textWidth,this.TextHeight);
53517
-
53518
- if (complexText)
53519
- {
53520
- this.DrawComplexText(itemLeft,y,complexText);
53521
- }
53522
- else
53523
- {
53524
- this.Canvas.textAlign="left";
53525
- this.Canvas.textBaseline="middle";
53526
- this.Canvas.fillStyle=this.TextColor;
53527
- this.Canvas.fillText(text,right+4,y,textWidth);
53528
- }
53521
+ this.DrawTextBGRect(itemLeft,yTop,textSize.Width,textSize.Height);
53522
+ this.DrawComplexTextV2(itemLeft,yTop,complexText,textSize);
53529
53523
 
53530
- if (this.RightButton.Enable) this.DrawRightButton(y-this.TextHeight/2, right+2,this.TextHeight,this.TextHeight,buttonData);
53524
+ if (this.RightButton.Enable) this.DrawRightButton(yTop, right+2,this.TextHeight,this.TextHeight,buttonData);
53531
53525
  }
53532
53526
 
53527
+ /*
53533
53528
  if (this.StringFormatY.RExtendText && this.StringFormatY.RExtendText.length>0)
53534
53529
  {
53535
53530
  var yOffset=0;
@@ -53561,26 +53556,16 @@ function ChartCorssCursor()
53561
53556
  yOffset+=this.TextHeight;
53562
53557
  }
53563
53558
  }
53559
+ */
53564
53560
  }
53565
53561
  else if (this.ShowTextMode.Right==2)
53566
53562
  {
53567
53563
  this.Canvas.fillStyle=this.TextBGColor;
53568
- var showLeft=right-textWidth;
53569
- this.DrawTextBGRect(showLeft,y-this.TextHeight/2,textWidth,this.TextHeight);
53570
-
53571
- if (complexText)
53572
- {
53573
- this.DrawComplexText(showLeft,y,complexText);
53574
- }
53575
- else
53576
- {
53577
- this.Canvas.textAlign="left";
53578
- this.Canvas.textBaseline="middle";
53579
- this.Canvas.fillStyle=this.TextColor;
53580
- this.Canvas.fillText(text,showLeft+2,y,textWidth);
53581
- }
53564
+ var showLeft=right-textSize.Width;
53565
+ this.DrawTextBGRect(showLeft,yTop,textSize.Width,textSize.Height);
53566
+ this.DrawComplexTextV2(showLeft,yTop,complexText,textSize);
53582
53567
 
53583
- if (this.RightButton.Enable) this.DrawRightButton(y-this.TextHeight/2, showLeft,this.TextHeight,this.TextHeight,buttonData);
53568
+ if (this.RightButton.Enable) this.DrawRightButton(yTop, showLeft,this.TextHeight,this.TextHeight,buttonData);
53584
53569
  }
53585
53570
  }
53586
53571
 
@@ -53700,6 +53685,137 @@ function ChartCorssCursor()
53700
53685
  }
53701
53686
  }
53702
53687
 
53688
+ this.DrawComplexTextV2=function(left, yTop, complexText, size)
53689
+ {
53690
+ this.Canvas.textAlign="left";
53691
+ this.Canvas.textBaseline="bottom";
53692
+ var showType=0;
53693
+ if (complexText.ShowType==1) showType=complexText.ShowType;
53694
+ if (showType==1) //多行
53695
+ {
53696
+ var xLeft=left;
53697
+ var yText=yTop; //顶
53698
+ for(var i=0; i<complexText.Text.length; ++i)
53699
+ {
53700
+ var item=complexText.Text[i];
53701
+ var itemSize=size.Text[i];
53702
+
53703
+ if (item.Font) this.Canvas.font=item.Font;
53704
+ else this.Canvas.font=complexText.Font;
53705
+
53706
+ if (item.Color) this.Canvas.fillStyle=item.Color;
53707
+ else this.Canvas.fillStyle=complexText.Color;
53708
+
53709
+ var y=yText+itemSize.Height;
53710
+ var x=xLeft;
53711
+ if (item.Margin)
53712
+ {
53713
+ var margin=item.Margin;
53714
+ if (IFrameSplitOperator.IsNumber(margin.Bottom)) y-=margin.Bottom;
53715
+ if (IFrameSplitOperator.IsNumber(margin.Left)) x+=margin.Left;
53716
+ }
53717
+
53718
+ this.Canvas.fillText(item.Text,x,y,itemSize.Width);
53719
+
53720
+ yText+=itemSize.Height;
53721
+ }
53722
+ }
53723
+ else //水平 单行
53724
+ {
53725
+ var xText=left;
53726
+ var yBottom=yTop+size.Height;
53727
+ for(var i=0; i<complexText.Text.length; ++i)
53728
+ {
53729
+ var item=complexText.Text[i];
53730
+ var itemSize=size.Text[i];
53731
+
53732
+ if (item.Font) this.Canvas.font=item.Font;
53733
+ else this.Canvas.font=complexText.Font;
53734
+
53735
+ if (item.Color) this.Canvas.fillStyle=item.Color;
53736
+ else this.Canvas.fillStyle=complexText.Color;
53737
+
53738
+ var y=yBottom;
53739
+ var x=xText;
53740
+ if (item.Margin)
53741
+ {
53742
+ var margin=item.Margin;
53743
+ if (IFrameSplitOperator.IsNumber(margin.Bottom)) y-=margin.Bottom;
53744
+ if (IFrameSplitOperator.IsNumber(margin.Left)) x+=margin.Left;
53745
+ }
53746
+
53747
+ this.Canvas.fillText(item.Text,x,y,itemSize.Width);
53748
+
53749
+ xText+=itemSize.Width;
53750
+ }
53751
+ }
53752
+ }
53753
+
53754
+ this.CalculateComplexTextSize=function(complexText, size)
53755
+ {
53756
+ if (!complexText || !IFrameSplitOperator.IsNonEmptyArray(complexText.Text)) return;
53757
+
53758
+ var showType=0;
53759
+ if (complexText.ShowType==1) showType=complexText.ShowType;
53760
+ if (showType==1) //多行
53761
+ {
53762
+ var textWidth=0, textHeight=0;
53763
+ for(var i=0; i<complexText.Text.length; ++i)
53764
+ {
53765
+ var item=complexText.Text[i];
53766
+ if (item.Font) this.Canvas.font=item.Font;
53767
+ else this.Canvas.font=complexText.Font;
53768
+ var itemWidth=this.Canvas.measureText(item.Text).width; //前后各空2个像素
53769
+ var itemHeight=this.Canvas.measureText("擎").width;
53770
+ if (item.Margin)
53771
+ {
53772
+ var margin=item.Margin;
53773
+ if (IFrameSplitOperator.IsNumber(margin.Left)) itemWidth+=margin.Left;
53774
+ if (IFrameSplitOperator.IsNumber(margin.Right)) itemWidth+=margin.Right;
53775
+ if (IFrameSplitOperator.IsNumber(margin.Top)) itemHeight+=margin.Top;
53776
+ if (IFrameSplitOperator.IsNumber(margin.Bottom)) itemHeight+=margin.Bottom;
53777
+ }
53778
+
53779
+ size.Text[i]={ Width:itemWidth, Height:itemHeight }; //保存所有文字的大小信息
53780
+
53781
+ if (textWidth<itemWidth) textWidth=itemWidth;
53782
+ textHeight+=itemHeight;
53783
+ }
53784
+
53785
+ size.Width=textWidth;
53786
+ size.Height=textHeight;
53787
+ }
53788
+ else //水平 单行
53789
+ {
53790
+ var textWidth=0, textHeight=0;
53791
+ for(var i=0; i<complexText.Text.length; ++i)
53792
+ {
53793
+ var item=complexText.Text[i];
53794
+ if (item.Font) this.Canvas.font=item.Font;
53795
+ else this.Canvas.font=complexText.Font;
53796
+
53797
+ var itemWidth=this.Canvas.measureText(item.Text).width; //前后各空2个像素
53798
+ var itemHeight=this.Canvas.measureText("擎").width;
53799
+ if (item.Margin)
53800
+ {
53801
+ var margin=item.Margin;
53802
+ if (IFrameSplitOperator.IsNumber(margin.Left)) itemWidth+=margin.Left;
53803
+ if (IFrameSplitOperator.IsNumber(margin.Right)) itemWidth+=margin.Right;
53804
+ if (IFrameSplitOperator.IsNumber(margin.Top)) itemHeight+=margin.Top;
53805
+ if (IFrameSplitOperator.IsNumber(margin.Bottom)) itemHeight+=margin.Bottom;
53806
+ }
53807
+
53808
+ size.Text[i]={ Width:itemWidth, Height:itemHeight }; //保存所有文字的大小信息
53809
+
53810
+ textWidth+=itemWidth;
53811
+ if (textHeight<itemHeight) textHeight=itemHeight;
53812
+ }
53813
+
53814
+ size.Width=textWidth;
53815
+ size.Height=textHeight;
53816
+ }
53817
+ }
53818
+
53703
53819
  this.DrawRightButton=function(drawTop, drawRight, drawWidth, drawHeight, data)
53704
53820
  {
53705
53821
  this.Canvas.fillStyle=this.RightButton.BGColor;
@@ -65503,7 +65619,7 @@ function ChartDrawMonitorLine()
65503
65619
  if (item.LineDash) dest.LineDash=item.LineDash;
65504
65620
  if (IFrameSplitOperator.IsNumber(item.LineSpace)) dest.LineSpace=item.LineSpace;
65505
65621
  if (IFrameSplitOperator.IsNumber(item.TextAlign)) dest.TextAlign=item.TextAlign;
65506
- if (item.Mergin) CopyMerginConfig(dest.Mergin, item.Mergin);
65622
+ if (item.Mergin) CopyMarginConfig(dest.Mergin, item.Mergin);
65507
65623
  }
65508
65624
 
65509
65625
  if (option.FormatLabelTextCallback) this.FormatLabelTextCallback=option.FormatLabelTextCallback;
@@ -69504,7 +69620,7 @@ function ChartInfoLine()
69504
69620
  if (item.BGColor) dest.BGColor=item.BGColor;
69505
69621
  if (IFrameSplitOperator.IsNumber(item.LineSpace)) dest.LineSpace=item.LineSpace;
69506
69622
  if (IFrameSplitOperator.IsNumber(item.TextAlign)) dest.TextAlign=item.TextAlign;
69507
- if (item.Mergin) CopyMerginConfig(dest.Mergin, item.Mergin);
69623
+ if (item.Mergin) CopyMarginConfig(dest.Mergin, item.Mergin);
69508
69624
  }
69509
69625
 
69510
69626
  if (option.FormatLabelTextCallback) this.FormatLabelTextCallback=option.FormatLabelTextCallback;
@@ -70164,7 +70280,9 @@ function JSChartResource()
70164
70280
  BGColor:'rgb(43,54,69)',
70165
70281
  PenColor:'rgb(255,255,255)',
70166
70282
  Icon: { Text:'\ue6a3', Color:'rgb(255,255,255)', Family:"iconfont", Size:18 }
70167
- }
70283
+ },
70284
+
70285
+ RightMargin: { Left:2, Right:2, Top:5, Bottom:3 }
70168
70286
  };
70169
70287
 
70170
70288
  this.LockBGColor = "rgb(220, 220, 220)"; //指标锁区域颜色
@@ -125088,6 +125206,8 @@ function JSReportChart(divElement)
125088
125206
  this.JSChartContainer=chart;
125089
125207
  this.DivElement.JSChart=this; //div中保存一份
125090
125208
 
125209
+ if (option.EnablePopMenuV2===true) chart.InitalPopMenu();
125210
+
125091
125211
  if (option.Symbol) chart.Symbol=option.Symbol;
125092
125212
  if (option.Name) chart.Name=option.Name;
125093
125213
 
@@ -125370,6 +125490,9 @@ function JSReportChartContainer(uielement)
125370
125490
 
125371
125491
  this.IsDestroy=false; //是否已经销毁了
125372
125492
 
125493
+ this.JSPopMenu; //内置菜单
125494
+ this.IsShowRightMenu=true;
125495
+
125373
125496
  this.ChartDestory=function() //销毁
125374
125497
  {
125375
125498
  this.IsDestroy=true;
@@ -125387,6 +125510,14 @@ function JSReportChartContainer(uielement)
125387
125510
  }
125388
125511
  }
125389
125512
 
125513
+ this.InitalPopMenu=function() //初始化弹出窗口
125514
+ {
125515
+ if (this.JSPopMenu) return;
125516
+
125517
+ this.JSPopMenu=new JSPopMenu(); //内置菜单
125518
+ this.JSPopMenu.Inital();
125519
+ }
125520
+
125390
125521
  this.AutoScrollPage=function(step)
125391
125522
  {
125392
125523
  this.AutoDragScrollTimer=setTimeout(() =>
@@ -126584,6 +126715,18 @@ function JSReportChartContainer(uielement)
126584
126715
 
126585
126716
  //去掉右键菜单
126586
126717
  this.UIOnContextMenu=function(e)
126718
+ {
126719
+ if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
126720
+
126721
+ if (!this.IsShowRightMenu) return;
126722
+
126723
+ var x = e.clientX-this.UIElement.getBoundingClientRect().left;
126724
+ var y = e.clientY-this.UIElement.getBoundingClientRect().top;
126725
+
126726
+ if(typeof(this.OnRightMenu)=='function') this.OnRightMenu(x,y,e); //右键菜单事件
126727
+ }
126728
+
126729
+ this.OnRightMenu=function(x,y,e)
126587
126730
  {
126588
126731
  e.preventDefault();
126589
126732
  }
@@ -127709,6 +127852,52 @@ function JSReportChartContainer(uielement)
127709
127852
  }
127710
127853
  }
127711
127854
 
127855
+ this.GetTabPopMenu=function(tabItem)
127856
+ {
127857
+ var aryMenu=[ ];
127858
+
127859
+ if (IFrameSplitOperator.IsNonEmptyArray(tabItem.ArySubMenu))
127860
+ {
127861
+ for(var i=0;i<tabItem.ArySubMenu.length;++i)
127862
+ {
127863
+ var item=tabItem.ArySubMenu[i];
127864
+ var menuItem={ Name:item.Title, Data:{ ID:item.CommandID, Args:[item.ID]} };
127865
+
127866
+ aryMenu.push(menuItem);
127867
+ }
127868
+ }
127869
+
127870
+
127871
+ return aryMenu;
127872
+ }
127873
+
127874
+ this.PopupTabMenu=function(menuData, tab, e)
127875
+ {
127876
+ if (!this.JSPopMenu) return;
127877
+
127878
+ var rtTab=tab.Rect;
127879
+ var pixelRatio=GetDevicePixelRatio();
127880
+ var rtCell={ Left:rtTab.Left/pixelRatio, Right:rtTab.Right/pixelRatio, Bottom:rtTab.Bottom/pixelRatio, Top:rtTab.Top/pixelRatio };
127881
+ rtCell.Width=rtCell.Right-rtCell.Left;
127882
+ rtCell.Height=rtCell.Bottom-rtCell.Top;
127883
+
127884
+ var rtClient=this.UIElement.getBoundingClientRect();
127885
+ var rtScroll=GetScrollPosition();
127886
+
127887
+ var offsetLeft=rtClient.left+rtScroll.Left;
127888
+ var offsetTop=rtClient.top+rtScroll.Top;
127889
+ rtCell.Left+=offsetLeft;
127890
+ rtCell.Right+=offsetLeft;
127891
+ rtCell.Top+=offsetTop;
127892
+ rtCell.Bottom+=offsetTop;
127893
+
127894
+ this.JSPopMenu.CreatePopMenu(menuData);
127895
+ this.JSPopMenu.PopupMenuByTab(rtCell);
127896
+
127897
+ if(e.preventDefault) e.preventDefault();
127898
+ if(e.stopPropagation) e.stopPropagation();
127899
+ }
127900
+
127712
127901
  //点击标签
127713
127902
  this.OnClickTab=function(tabData, e)
127714
127903
  {
@@ -127722,36 +127911,80 @@ function JSReportChartContainer(uielement)
127722
127911
 
127723
127912
  if (tabData.Tab.IsMenu)
127724
127913
  {
127914
+ var menuData={ Menu:this.GetTabPopMenu(tabData.Tab), Position:JSPopMenu.POSITION_ID.TAB_MENU_ID };
127915
+ menuData.ClickCallback=(data)=>{ this.OnClickTabPopMenu(tabData, data); }
127916
+
127725
127917
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_REPORT_TABMENU);
127726
127918
  if (event && event.Callback)
127727
127919
  {
127728
- redraw=true;
127729
- var rtItem=tabData.Rect;
127730
- var rtDOM={ Left: rtItem.Left/pixelTatio, Right:rtItem.Right/pixelTatio, Top:rtItem.Top/pixelTatio, Bottom:rtItem.Bottom/pixelTatio };
127731
-
127732
- var sendData={ Data:tabData, IsSide:{X:x, Y:x}, UIElement:uiElement, Rect:rtDOM, e:e , Redraw:redraw };
127920
+ var sendData={ MenuData:menuData, Tab:tabData, PreventDefault:false, e:e };
127733
127921
  event.Callback(event, sendData, this);
127734
- if (IFrameSplitOperator.IsBool(sendData.Redraw)) redraw=sendData.Redraw;
127922
+ if (sendData.PreventDefault==true) return;
127735
127923
  }
127736
127924
 
127737
- this.SetSelectedTab(tabData.Index); //选中tab
127925
+ this.PopupTabMenu(menuData, tabData.Tab, e);
127738
127926
  }
127739
127927
  else
127740
127928
  {
127741
127929
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_REPORT_TAB);
127742
127930
  if (event && event.Callback)
127743
127931
  {
127744
- var sendData={ Data:tabData, IsSide:{X:x, Y:x}, UIElement:uiElement, e:e , Redraw:redraw };
127932
+ var sendData={ Data:tabData, IsSide:{X:x, Y:x}, UIElement:uiElement, e:e , Redraw:redraw, PreventDefault:false };
127745
127933
  event.Callback(event, sendData, this);
127746
127934
  if (IFrameSplitOperator.IsBool(sendData.Redraw)) redraw=sendData.Redraw;
127935
+ if (sendData.PreventDefault==true) return;
127747
127936
  }
127748
127937
 
127749
- this.SetSelectedTab(tabData.Index);
127938
+ if (tabData.Tab.CommandID==JSCHART_MENU_ID.CMD_REPORT_CHANGE_BLOCK_ID)
127939
+ {
127940
+ this.ExecuteMenuCommand(tabData.Tab.CommandID, [tabData.Tab.ID]);
127941
+ this.SetSelectedTab(tabData.Index);
127942
+ }
127750
127943
  }
127751
127944
 
127752
127945
  if (redraw) this.Draw();
127753
127946
  }
127754
127947
 
127948
+ this.OnClickTabPopMenu=function(tabData, data)
127949
+ {
127950
+ JSConsole.Chart.Log('[JSReportChartContainer::OnClickTabPopMenu] ',tabData, data);
127951
+
127952
+ var cmdID=data.Data.ID; //命令ID
127953
+ var aryArgs=data.Data.Args; //参数
127954
+
127955
+ var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MENU_COMMAND); //回调通知外部
127956
+ if (event && event.Callback)
127957
+ {
127958
+ var data={ PreventDefault:false, CommandID:cmdID, Args:aryArgs, SrcData:data, TabData:tabData };
127959
+ event.Callback(event,data,this);
127960
+ if (data.PreventDefault) return;
127961
+ }
127962
+
127963
+ this.ExecuteMenuCommand(cmdID,aryArgs);
127964
+
127965
+ this.SetSelectedTab(tabData.Index);
127966
+ this.Draw();
127967
+ }
127968
+
127969
+ this.ExecuteMenuCommand=function(cmdID, aryArgs)
127970
+ {
127971
+ JSConsole.Chart.Log('[JSReportChartContainer::ExecuteMenuCommand] cmdID=, aryArgs=', cmdID,aryArgs);
127972
+
127973
+ var param=null, srcParam=null; //原始值
127974
+ if (IFrameSplitOperator.IsNonEmptyArray(aryArgs))
127975
+ {
127976
+ srcParam=aryArgs[0];
127977
+ if (IFrameSplitOperator.IsNumber(aryArgs[0])) param=aryArgs[0];
127978
+ }
127979
+
127980
+ switch(cmdID)
127981
+ {
127982
+ case JSCHART_MENU_ID.CMD_REPORT_CHANGE_BLOCK_ID:
127983
+ if (srcParam) this.ChangeSymbol(param);
127984
+ break;
127985
+ }
127986
+ }
127987
+
127755
127988
  this.SwapColumn=function(leftIndex, rightIndex, option)
127756
127989
  {
127757
127990
  var reportChart=this.GetReportChart();
@@ -128667,6 +128900,14 @@ function ChartReport()
128667
128900
  return null;
128668
128901
  }
128669
128902
 
128903
+ this.ClipClient=function()
128904
+ {
128905
+ this.Canvas.save();
128906
+ this.Canvas.beginPath();
128907
+ this.Canvas.rect(this.RectClient.Left,this.RectClient.Top,(this.RectClient.Right-this.RectClient.Left),(this.RectClient.Bottom-this.RectClient.Top));
128908
+ //this.Canvas.stroke(); //调试用
128909
+ this.Canvas.clip();
128910
+ }
128670
128911
 
128671
128912
  this.Draw=function()
128672
128913
  {
@@ -128678,12 +128919,7 @@ function ChartReport()
128678
128919
  if (this.SizeChange) this.CalculateSize();
128679
128920
  else this.UpdateCacheData();
128680
128921
 
128681
- this.Canvas.save();
128682
-
128683
- this.Canvas.beginPath();
128684
- this.Canvas.rect(this.RectClient.Left,this.RectClient.Top,(this.RectClient.Right-this.RectClient.Left),(this.RectClient.Bottom-this.RectClient.Top));
128685
- //this.Canvas.stroke(); //调试用
128686
- this.Canvas.clip();
128922
+ this.ClipClient();
128687
128923
 
128688
128924
  this.DrawHeader();
128689
128925
  this.DrawBody();
@@ -128696,7 +128932,9 @@ function ChartReport()
128696
128932
  this.Tab.DrawScrollbar(this.RectClient.Left,bottom-this.BottomToolbarHeight, this.RectClient.Right, bottom);
128697
128933
  }
128698
128934
 
128935
+ this.ClipClient();
128699
128936
  this.DrawBorder();
128937
+ this.Canvas.restore();
128700
128938
 
128701
128939
  this.DrawDragRow();
128702
128940
 
@@ -130827,7 +131065,7 @@ function ChartReportTab()
130827
131065
  this.IsShow=true; //是否显示
130828
131066
 
130829
131067
  //Tab
130830
- this.TabList=[]; //{ Title:标题, ID:, IsMenu: 是否菜单 }
131068
+ this.TabList=[]; //{ Title:标题, ID:, IsMenu: 是否菜单, ArySubMenu:[ { Title:, ID: }] }
130831
131069
  this.SelectedTabIndex=-1;
130832
131070
  this.MoveOnTabIndex=-1;
130833
131071
 
@@ -130896,7 +131134,7 @@ function ChartReportTab()
130896
131134
 
130897
131135
  var tabItem={ Title:item.Title, IsMenu:false, FixedSymbol:[], FixedRowCount:0 };
130898
131136
  if (item.ID) tabItem.ID=item.ID;
130899
- if (item.MenuID) tabItem.MenuID=item.MenuID;
131137
+ if (item.CommandID) tabItem.CommandID=item.CommandID;
130900
131138
  if (IFrameSplitOperator.IsBool(item.IsMenu)) tabItem.IsMenu=item.IsMenu;
130901
131139
  if (IFrameSplitOperator.IsNonEmptyArray(item.FixedSymbol))
130902
131140
  {
@@ -130908,6 +131146,10 @@ function ChartReportTab()
130908
131146
  ++tabItem.FixedRowCount;
130909
131147
  }
130910
131148
  }
131149
+
131150
+ if (IFrameSplitOperator.IsNonEmptyArray(item.ArySubMenu))
131151
+ tabItem.ArySubMenu=item.ArySubMenu.slice();
131152
+
130911
131153
  this.TabList.push(tabItem);
130912
131154
  }
130913
131155
  }
@@ -134417,7 +134659,7 @@ function ScrollBarBGChart()
134417
134659
 
134418
134660
 
134419
134661
 
134420
- var HQCHART_VERSION="1.1.13491";
134662
+ var HQCHART_VERSION="1.1.13501";
134421
134663
 
134422
134664
  function PrintHQChartVersion()
134423
134665
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.13491";
8
+ var HQCHART_VERSION="1.1.13501";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {