hqchart 1.1.14523 → 1.1.14533

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.
@@ -4162,7 +4162,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
4162
4162
 
4163
4163
  var yMove=e.clientY-drag.LastMove.Y;
4164
4164
 
4165
- this.OnMoveFromeBorder(this.BorderDrag.Index, yMove);
4165
+ if (!this.OnMoveFromeBorder(this.BorderDrag.Index, yMove)) return;
4166
4166
 
4167
4167
  drag.LastMove.X=e.clientX;
4168
4168
  drag.LastMove.Y=e.clientY;
@@ -7063,7 +7063,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7063
7063
  this.SelectChartDrawPicture=null;
7064
7064
  if (this.ChartPictureMenu) this.ChartPictureMenu.Hide();
7065
7065
  this.ClearChartDrawPicture(drawPicture); //删除选中的画图工具
7066
- this.CloseModifyDrawDialog();
7067
7066
  }
7068
7067
  else if (this.SelectedChart && this.SelectedChart.Selected.Identify)
7069
7068
  {
@@ -7287,14 +7286,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7287
7286
 
7288
7287
  this.OnMoveFromeBorder=function(index, yMove)
7289
7288
  {
7290
- if (!this.Frame) return;
7289
+ if (!this.Frame) return false;
7291
7290
 
7292
- if (!this.Frame.OnMoveFromeBorder(index,yMove)) return ;
7291
+ if (!this.Frame.OnMoveFromeBorder(index,yMove)) return false;
7293
7292
 
7294
7293
  //this.Frame.SetSizeChage(true);
7295
7294
  this.Frame.SetFrameBorderSizeChange();
7296
7295
  this.Frame.ReDrawToolbar();
7297
7296
  this.Draw();
7297
+
7298
+ return true;
7298
7299
  }
7299
7300
 
7300
7301
  this.OnZoomUpDownFrameY=function(obj, yMove)
@@ -8881,20 +8882,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8881
8882
 
8882
8883
  if (!this.DialogModifyDraw) return;
8883
8884
 
8884
- if (chart.ClassName=="ChartDrawPictureText" || chart.ClassName=='ChartDrawVolProfile')
8885
- {
8886
- this.CloseModifyDrawDialog();
8887
-
8888
- if (!this.ChartPictureMenu) this.ChartPictureMenu=g_DialogFactory.Create('ChartPictureSettingMenu', this.UIElement.parentNode);
8889
- if (!this.ChartPictureMenu) return;
8890
-
8891
- var event={ data: { ChartPicture:chart, HQChart:this}};
8892
- this.ChartPictureMenu.DoModal(event);
8893
- }
8894
- else
8895
- {
8896
- this.ShowModifyDrawDialog(chart);
8897
- }
8885
+ this.ShowModifyDrawDialog(chart);
8898
8886
  }
8899
8887
 
8900
8888
  this.FinishMoveChartDrawPicture=function()
@@ -8946,6 +8934,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8946
8934
 
8947
8935
  if (option && option.Draw==false) bDraw=false;
8948
8936
  if (bDraw) this.Draw();
8937
+ if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(null);
8949
8938
  }
8950
8939
  else
8951
8940
  {
@@ -8965,6 +8954,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8965
8954
 
8966
8955
  if (option && option.Draw==false) bDraw=false;
8967
8956
  if (bDraw) this.Draw();
8957
+ if (this.DialogModifyDraw) this.DialogModifyDraw.OnClearChartDrawPicture(drawPicture);
8958
+ break;
8968
8959
  }
8969
8960
  }
8970
8961
  }
@@ -19905,11 +19896,37 @@ function HQTradeFrame()
19905
19896
  {
19906
19897
  if (this.SubFrame.length<=0) return false;
19907
19898
 
19908
- var topFrame=this.SubFrame[index];
19899
+ var topFrame=null;
19900
+ var aryTopTitleFrame=[];
19901
+ for(var i=index;i>=0;--i)
19902
+ {
19903
+ var item=this.SubFrame[i];
19904
+
19905
+ if (item.Frame && item.Frame.ChartBorder && item.Frame.ChartBorder.IsShowTitleOnly) //标题模式
19906
+ {
19907
+ aryTopTitleFrame.push(item);
19908
+ continue;
19909
+ }
19910
+
19911
+ if (item.Height>0)
19912
+ {
19913
+ topFrame=item;
19914
+ break;
19915
+ }
19916
+ }
19917
+
19909
19918
  var bottomFrame=null;
19919
+ var aryBottomTitleFrame=[];
19910
19920
  for(var i=index+1;i<this.SubFrame.length;++i)
19911
19921
  {
19912
19922
  var item=this.SubFrame[i];
19923
+
19924
+ if (item.Frame && item.Frame.ChartBorder && item.Frame.ChartBorder.IsShowTitleOnly) //标题模式
19925
+ {
19926
+ aryBottomTitleFrame.push(item);
19927
+ continue;
19928
+ }
19929
+
19913
19930
  if (item.Height>0)
19914
19931
  {
19915
19932
  bottomFrame=item;
@@ -19927,6 +19944,20 @@ function HQTradeFrame()
19927
19944
 
19928
19945
  var height=topFrame.Frame.ChartBorder.GetHeightEx();
19929
19946
  var height2=bottomFrame.Frame.ChartBorder.GetHeightEx();
19947
+
19948
+ for(var i=0;i<aryBottomTitleFrame.length;++i)
19949
+ {
19950
+ var item=aryBottomTitleFrame[i];
19951
+ item.Frame.ChartBorder.Bottom+=yMove;
19952
+ item.Frame.ChartBorder.Top+=yMove;
19953
+ }
19954
+
19955
+ for(var i=0;i<aryTopTitleFrame.length;++i)
19956
+ {
19957
+ var item=aryTopTitleFrame[i];
19958
+ item.Frame.ChartBorder.Bottom+=yMove;
19959
+ item.Frame.ChartBorder.Top+=yMove;
19960
+ }
19930
19961
 
19931
19962
  //缩小的时候 小于最小高度 不处理
19932
19963
  if ((height<this.MinSubFrameHeight && yMove<0) || (height2<this.MinSubFrameHeight && yMove>0))
@@ -20220,11 +20251,25 @@ function HQTradeFrame()
20220
20251
  this.SaveSubFrameHeightRate=function()
20221
20252
  {
20222
20253
  var height=this.ChartBorder.GetHeight();
20254
+ var totalTitleHeight=0;
20255
+ for(var i=0;i<this.SubFrame.length;++i)
20256
+ {
20257
+ var item=this.SubFrame[i];
20258
+ var frame=item.Frame;
20259
+ if (frame && frame.ChartBorder && frame.ChartBorder.IsShowTitleOnly && item.Height>0)
20260
+ totalTitleHeight+=frame.ChartBorder.TitleHeight;
20261
+ }
20262
+ height-=totalTitleHeight;
20223
20263
 
20224
20264
  for(var i=0; i<this.SubFrame.length; ++i)
20225
20265
  {
20226
20266
  var item=this.SubFrame[i];
20267
+ var frame=item.Frame;
20268
+ if (item.Height<=0) continue;
20269
+ if (frame && frame.ChartBorder && frame.ChartBorder.IsShowTitleOnly && item.Height>0) continue;
20270
+
20227
20271
  var subHeight=item.Frame.ChartBorder.GetHeight();
20272
+
20228
20273
  var rate=(subHeight/height)*100;
20229
20274
  item.Height=rate;
20230
20275
  }
@@ -21356,9 +21401,13 @@ function HQTradeFrame()
21356
21401
  var left=item.Frame.ChartBorder.GetLeft();
21357
21402
  var right=item.Frame.ChartBorder.GetRight();
21358
21403
 
21359
- item.Frame.Canvas.beginPath();
21360
- item.Frame.Canvas.rect(left,bottom-height/2,(right-left),height);
21361
- if (item.Frame.Canvas.isPointInPath(x,y))
21404
+ var rtBorder={ Left:left, Right:right, Top:bottom-height/2, Height:height };
21405
+ rtBorder.Bottom=rtBorder.Top+rtBorder.Height;
21406
+ rtBorder.Width=rtBorder.Right-rtBorder.Left;
21407
+ if (x>=rtBorder.Left && x<=rtBorder.Right && y>=rtBorder.Top && y<rtBorder.Bottom)
21408
+ //item.Frame.Canvas.beginPath();
21409
+ //item.Frame.Canvas.rect(left,bottom-height/2,(right-left),height);
21410
+ //if (item.Frame.Canvas.isPointInPath(x,y))
21362
21411
  {
21363
21412
  return { Index:i, Bottom:true };
21364
21413
  }
@@ -64796,15 +64845,13 @@ function ChartDrawPictureText()
64796
64845
  delete this.newMethod;
64797
64846
 
64798
64847
  this.ClassName='ChartDrawPictureText';
64799
- this.Text='文本';
64848
+ this.Text='输入文字';
64800
64849
  this.PointCount=1;
64801
64850
  this.FontOption={ Family:'微软雅黑', Size:20, Weight:null, Style:null }; //Weight(bold 粗体), Style(italic)
64802
64851
  //矢量图片
64803
64852
  //this.Text="\ue606";
64804
64853
  //this.FontOption={ Family:'iconfont', Size:20, Weight:null, Style:null }; //Weight(bold 粗体), Style(italic)
64805
64854
  this.TextRect=null; //文字区域
64806
- this.IsInitialized=false; //是否初始化了
64807
- this.SettingMenu;
64808
64855
  this.HQChart;
64809
64856
 
64810
64857
  this.SetOption=function(option)
@@ -64842,12 +64889,6 @@ function ChartDrawPictureText()
64842
64889
  this.TextRect.Height=textHeight
64843
64890
  //this.Canvas.strokeRect(this.TextRect.Left,this.TextRect.Top,this.TextRect.Width,this.TextRect.Height);
64844
64891
  this.Canvas.restore();
64845
-
64846
- if (this.IsInitialized===false)
64847
- {
64848
- this.SetTextOption();
64849
- this.IsInitialized=true;
64850
- }
64851
64892
  }
64852
64893
 
64853
64894
  //根据设置动态生成字体
@@ -64866,18 +64907,6 @@ function ChartDrawPictureText()
64866
64907
  return font;
64867
64908
  }
64868
64909
 
64869
- this.SetTextOption=function()
64870
- {
64871
- JSConsole.Chart.Log('[ChartDrawPictureText::SetTextOption]');
64872
- //创建div设置窗口
64873
- if (!this.SettingMenu) this.SettingMenu=new ChartPictureTextSettingMenu(this.Frame.ChartBorder.UIElement.parentNode);
64874
-
64875
- this.SettingMenu.ChartPicture=this;
64876
- this.SettingMenu.HQChart=this.HQChart;
64877
- this.SettingMenu.Position={Left:this.TextRect.Left+this.TextRect.Width,Top:this.TextRect.Top};
64878
- this.SettingMenu.DoModal();
64879
- }
64880
-
64881
64910
  this.IsPointIn=function(x,y)
64882
64911
  {
64883
64912
  if (!this.Frame || this.Status!=10) return -1;
@@ -69760,6 +69789,7 @@ function ChartDrawPriceNote()
69760
69789
 
69761
69790
  var price=this.Frame.GetYData(ptStart.Y, false);
69762
69791
  var text=price.toFixed(floatPrecision);
69792
+ this.Canvas.font=font;
69763
69793
  var textHeight=this.Canvas.measureText("擎").width;
69764
69794
  var textWidth=this.Canvas.measureText(text).width;
69765
69795
  var angle=this.CalculateAngle(ptStart.X, ptStart.Y, ptEnd.X, ptEnd.Y);
@@ -71845,6 +71875,15 @@ function JSChartResource()
71845
71875
  TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
71846
71876
  }
71847
71877
 
71878
+ this.PopKLineChart=
71879
+ {
71880
+ BGColor:"rgba(250,250,250,0.95)",
71881
+ BorderColor:"rgb(0,0,0)",
71882
+
71883
+ TitleColor:'rgb(250,250,250)', //标题颜色
71884
+ TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
71885
+ }
71886
+
71848
71887
  this.SelectRectBGColor="rgba(1,130,212,0.06)"; //背景色
71849
71888
  // this.SelectRectAlpha=0.06; //透明度
71850
71889
 
@@ -73417,10 +73456,21 @@ function JSChartResource()
73417
73456
  if (style.PopMinuteChart)
73418
73457
  {
73419
73458
  var item=style.PopMinuteChart;
73420
- if (item.BGColor) this.PopMinuteChart.BGColor=item.BGColor;
73421
- if (item.BorderColor) this.PopMinuteChart.BorderColor=item.BorderColor;
73422
- if (item.TitleColor) this.DialogSearchIndex.TitleColor=item.TitleColor;
73423
- if (item.TitleBGColor) this.DialogSearchIndex.TitleBGColor=item.TitleBGColor;
73459
+ var dest=this.PopMinuteChart;
73460
+ if (item.BGColor) dest.BGColor=item.BGColor;
73461
+ if (item.BorderColor) dest.BorderColor=item.BorderColor;
73462
+ if (item.TitleColor) dest.TitleColor=item.TitleColor;
73463
+ if (item.TitleBGColor) dest.TitleBGColor=item.TitleBGColor;
73464
+ }
73465
+
73466
+ if (style.PopKLineChart)
73467
+ {
73468
+ var item=style.PopKLineChart;
73469
+ var dest=this.PopKLineChart;
73470
+ if (item.BGColor) dest.BGColor=item.BGColor;
73471
+ if (item.BorderColor) dest.BorderColor=item.BorderColor;
73472
+ if (item.TitleColor) dest.TitleColor=item.TitleColor;
73473
+ if (item.TitleBGColor) dest.TitleBGColor=item.TitleBGColor;
73424
73474
  }
73425
73475
 
73426
73476
  if (style.DefaultTextColor) this.DefaultTextColor = style.DefaultTextColor;
@@ -80686,7 +80736,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
80686
80736
  bindData.Period=this.Period;
80687
80737
  bindData.Right=this.Right;
80688
80738
 
80689
- if (bindData.Right>0 && MARKET_SUFFIX_NAME.IsSHSZStockA(item.Symbol)) //复权数据
80739
+ if (bindData.Right>0 && MARKET_SUFFIX_NAME.IsEnableRight(item.Symbol)) //复权数据
80690
80740
  {
80691
80741
  var rightData=bindData.GetRightData(bindData.Right,{ AlgorithmType: this.RightFormula });
80692
80742
  bindData.Data=rightData;
@@ -82026,8 +82076,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
82026
82076
  var self=this;
82027
82077
  drawPicture.GetActiveDrawPicture=function() { return self.GetActiveDrawPicture(); }
82028
82078
 
82029
- if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
82030
-
82031
82079
  this.ChartDrawPicture.push(drawPicture);
82032
82080
  }
82033
82081
 
@@ -89344,7 +89392,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
89344
89392
  if (item)
89345
89393
  {
89346
89394
  drawPicture=item.Create();
89347
- if (drawPicture.ClassName=='ChartDrawPictureText') drawPicture.HQChart=this;
89348
89395
  }
89349
89396
 
89350
89397
  if (!drawPicture) //iconfont图标
@@ -89407,7 +89454,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
89407
89454
 
89408
89455
  drawPicture.GetActiveDrawPicture=function() { return self.GetActiveDrawPicture(); }
89409
89456
 
89410
- if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
89411
89457
  this.ChartDrawPicture.push(drawPicture);
89412
89458
 
89413
89459
  if (obj.Draw==true) this.DrawDynamicInfo();
@@ -89451,8 +89497,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
89451
89497
  drawPicture.ValueToPoint();
89452
89498
  drawPicture.GetActiveDrawPicture=()=>{ return this.GetActiveDrawPicture(); }
89453
89499
 
89454
- if (drawPicture.ClassName==='ChartDrawPictureText') drawPicture.IsInitialized=true;
89455
-
89456
89500
  this.ChartDrawPicture.push(drawPicture);
89457
89501
  }
89458
89502
 
@@ -94330,7 +94374,6 @@ function DialogFactory()
94330
94374
  this.DataMap=new Map(
94331
94375
  [
94332
94376
  ["ChartPictureSettingMenu", { Create:function(divElement) { return new ChartPictureSettingMenu(divElement); } }],
94333
- ["ChartPictureTextSettingMenu", { Create:function(divElement) { return new ChartPictureTextSettingMenu(divElement); } }]
94334
94377
  ]);
94335
94378
 
94336
94379
  this.Create=function(name, option)
@@ -94556,239 +94599,6 @@ function ChartPictureSettingMenu(divElement)
94556
94599
  }
94557
94600
  }
94558
94601
 
94559
- //画图工具 文本设置窗口
94560
- function ChartPictureTextSettingMenu(divElement)
94561
- {
94562
- this.newMethod=IDivDialog; //派生
94563
- this.newMethod(divElement);
94564
- delete this.newMethod;
94565
-
94566
- this.ChartPicture;
94567
- this.SettingDiv;
94568
- this.Position;
94569
-
94570
- this.BackupData; //画图工具备份数据
94571
-
94572
- this.Close=function()
94573
- {
94574
- if (this.SettingDiv) this.DivElement.removeChild(this.SettingDiv); //直接删除
94575
- }
94576
-
94577
- this.DoModal=function()
94578
- {
94579
- var text=this.ChartPicture.Text; //显示的文本
94580
- var fontOption=this.ChartPicture.FontOption; //字体设置
94581
- var lineColor=this.ChartPicture.LineColor;
94582
- //数据备份, 点取消的时候把备份数据设置回去
94583
- this.BackupData=
94584
- {
94585
- Text:text,
94586
- LineColor:lineColor,
94587
- FontOption:{Family: fontOption.Family, Size: fontOption.Size, Weight: fontOption.Weight, Style: fontOption.Style }
94588
- };
94589
- JSConsole.Chart.Log('[ChartPictureTextSettingMenu::DoModal] picture info',this.BackupData);
94590
-
94591
- var self=this;
94592
- var div=this.DivElement.getElementsByClassName('chartpicture-text-setting')[0];
94593
- if (!div)
94594
- {
94595
- div=document.createElement("div");
94596
- div.className='chartpicture-text-setting';
94597
- this.DivElement.appendChild(div);
94598
- this.SettingDiv=div;
94599
- }
94600
- else
94601
- {
94602
- this.SettingDiv=div;
94603
- }
94604
-
94605
- var titleContainerStr = '<div class="titleWrap">'+
94606
- '<span class="titleName">样式设置</span>'+
94607
- '<i class="closeBtn iconfont icon-close"></i>'+
94608
- '</div>';
94609
-
94610
- var fontSizeArray = [10,11,12,14,16,20,24,28,32,40];
94611
- var fontArray = ['微软雅黑','宋体','Arial','仿宋'];
94612
- var sizeListStr = "";
94613
- var fontListStr = "";
94614
- fontArray.forEach(function(item,index){
94615
- fontListStr += index !== 0 ? '<p>'+item+'</P>' : '<p class="active">'+item+'</P>';
94616
- });
94617
- fontSizeArray.forEach(function(item,index){
94618
- sizeListStr += index !== 5 ? '<p>'+item+'</P>' : '<p class="active">'+item+'</P>';
94619
- });
94620
- var contentContainerStr = '<div class="contentWrap">'+
94621
- '<div class="styleOptions">'+
94622
- '<span class="colorPicker"><input type="color" id="fontColor" value="#1e90ff"></span>'+
94623
- '<div class="likeSelect fontSelect"><span class="choicedText">微软雅黑</span><div class="selectList">'+fontListStr+'</div><i class="iconfont icon-xia"></i></div>'+
94624
- '<div class="likeSelect fontSizeSelect"><span class="choicedText">20</span><div class="selectList">'+sizeListStr+'</div><i class="iconfont icon-xia"></i></div>'+
94625
- '<span class="strongFont likeBtn"><i class="iconfont icon-jiacu"></i></span>'+
94626
- '<span class="italicsFont likeBtn"><i class="iconfont icon-qingxieL"></i></span>'+
94627
- '</div>'+
94628
- '<textarea class="tArea" id="tArea" placeholder="Text"></textarea>'+
94629
- '</div>';
94630
- var btnContainer = '<div class="btnsContainer">'+
94631
- '<span class="okBtn btn">确认</span>'+
94632
- '<span class="cancelBtn btn">取消</span>'+
94633
- '</div>';
94634
-
94635
- var pixelTatio = GetDevicePixelRatio();
94636
- var DoModalStr = titleContainerStr+contentContainerStr+btnContainer;
94637
- this.SettingDiv.style.left = this.Position.Left/pixelTatio + "px";
94638
- this.SettingDiv.style.top = this.Position.Top/pixelTatio + "px";
94639
- this.SettingDiv.innerHTML=DoModalStr;
94640
- this.SettingDiv.style.position = "absolute";
94641
- this.SettingDiv.style.display = "block";
94642
- $(".chartpicture-text-setting .colorPicker").css({ //初始设置
94643
- "borderColor":self.ChartPicture.LineColor,
94644
- "background-color":self.ChartPicture.LineColor
94645
- });
94646
-
94647
- var family = this.ChartPicture.FontOption.Family;
94648
- $('.chartpicture-text-setting .fontSelect .choicedText').html(family);
94649
- fontArray.forEach(function(item,index){
94650
- if(item == family){
94651
- $('.chartpicture-text-setting .fontSelect p').removeClass('active');
94652
- $('.chartpicture-text-setting .fontSelect p').eq(index).addClass('active');
94653
- }
94654
- });
94655
-
94656
- var size = this.ChartPicture.FontOption.Size;
94657
- $('.chartpicture-text-setting .fontSizeSelect .choicedText').html(size);
94658
- fontSizeArray.forEach(function(item,index){
94659
- if(item == size){
94660
- $('.chartpicture-text-setting .fontSizeSelect p').removeClass('active');
94661
- $('.chartpicture-text-setting .fontSizeSelect p').eq(index).addClass('active');
94662
- }
94663
- });
94664
-
94665
- var weight = this.ChartPicture.FontOption.Weight;
94666
- if( weight != null && weight == 'bold'){
94667
- $('.chartpicture-text-setting .strongFont').addClass('hot');
94668
- }
94669
-
94670
- var style = this.ChartPicture.FontOption.Style;
94671
- if( style != null && style == 'italic'){
94672
- $('.chartpicture-text-setting .italicsFont').addClass('hot');
94673
- }
94674
-
94675
- var text = this.ChartPicture.Text;
94676
- $('.chartpicture-text-setting .tArea').val(text); //结束初始设置
94677
-
94678
- var defaultTextOption = { Family:'微软雅黑', Size:20, Weight:null, Style:null };
94679
- $(".chartpicture-text-setting #fontColor").change(
94680
- {
94681
- Picture:this.ChartPicture
94682
- },
94683
- function(event)
94684
- { //颜色选择
94685
- var value = $(this).val();
94686
- $(this).parent().css({
94687
- "borderColor":value,
94688
- "background-color":value
94689
- });
94690
- var chart=event.data.Picture;
94691
- chart.LineColor = value;
94692
- if (chart.Update) chart.Update(); //更新界面
94693
- }
94694
- );
94695
- $(".chartpicture-text-setting .fontSelect,.chartpicture-text-setting .fontSizeSelect").click(function(){
94696
- $(this).find('.selectList').toggle();
94697
- $(this).toggleClass('hot');
94698
- });
94699
- $(".chartpicture-text-setting .fontSelect p").click(
94700
- {
94701
- Picture:this.ChartPicture
94702
- },
94703
- function(event){ //字体选择
94704
- var choicedText = $(this).closest(".fontSelect").find('.choicedText').html();
94705
- var currentSelect = event.currentTarget.innerHTML;
94706
- if(choicedText !== currentSelect){
94707
- $(this).closest(".fontSelect").find('.choicedText').html(currentSelect);
94708
- $(this).siblings().removeClass('active');
94709
- $(this).addClass('active');
94710
- var chart = event.data.Picture;
94711
- chart.FontOption.Family = currentSelect;
94712
- if (chart.Update) chart.Update(); //更新界面
94713
- }
94714
- });
94715
- $(".chartpicture-text-setting .fontSizeSelect p").click(
94716
- {
94717
- Picture:this.ChartPicture
94718
- },
94719
- function(event){ //字号选择
94720
- var choicedText = $(this).closest(".fontSizeSelect").find('.choicedText').html();
94721
- var currentSelect = event.currentTarget.innerHTML;
94722
- if(choicedText !== currentSelect){
94723
- $(this).closest(".fontSizeSelect").find('.choicedText').html(currentSelect);
94724
- $(this).siblings().removeClass('active');
94725
- $(this).addClass('active');
94726
- var chart = event.data.Picture;
94727
- chart.FontOption.Size = Number(currentSelect);
94728
- if (chart.Update) chart.Update(); //更新界面
94729
- }
94730
- });
94731
- $(".chartpicture-text-setting .strongFont").click(
94732
- {
94733
- Picture:this.ChartPicture
94734
- },
94735
- function(event){
94736
- $(this).toggleClass('hot');
94737
- var classnames = $(this).attr('class');
94738
- if(classnames.indexOf('hot') > 0){
94739
- var chart = event.data.Picture;
94740
- chart.FontOption.Weight = 'bold';
94741
- if (chart.Update) chart.Update(); //更新界面
94742
- }
94743
- });
94744
- $(".chartpicture-text-setting .italicsFont").click(
94745
- {
94746
- Picture:this.ChartPicture
94747
- },
94748
- function(event){
94749
- $(this).toggleClass('hot')
94750
- var classnames = $(this).attr('class');
94751
- if(classnames.indexOf('hot') > 0){
94752
- var chart = event.data.Picture;
94753
- chart.FontOption.Style = 'italic';
94754
- if (chart.Update) chart.Update(); //更新界面
94755
- }
94756
- });
94757
- $(".chartpicture-text-setting .titleWrap .closeBtn,.chartpicture-text-setting .btnsContainer .cancelBtn").click( //取消
94758
- {
94759
- Picture:this.ChartPicture
94760
- },
94761
- function(event){
94762
- var picture = event.data.Picture;
94763
- picture.Text = self.BackupData.Text;
94764
- picture.LineColor = self.BackupData.LineColor;
94765
- picture.FontOption = self.BackupData.FontOption;
94766
- if (picture.Update) picture.Update();
94767
- self.Close();
94768
- });
94769
- $(".chartpicture-text-setting .tArea").keyup( //文本内容
94770
- {
94771
- Picture:this.ChartPicture
94772
- },
94773
- function(event){
94774
- JSConsole.Chart.Log('[ChartPictureTextSettingMenu::DoModal] $(".chartpicture-text-setting .tArea").keyup()');
94775
- var content = $(this).val();
94776
- var chart = event.data.Picture;
94777
- chart.Text = content;
94778
- if (chart.Update) chart.Update(); //更新界面
94779
- });
94780
-
94781
- //确定按钮
94782
- $(".chartpicture-text-setting .btnsContainer .okBtn").click(
94783
- function()
94784
- {
94785
- self.Close();
94786
- if (self.HQChart && self.HQChart.ChartDrawStorage) self.HQChart.ChartDrawStorage.SaveDrawData(self.ChartPicture); //保存下
94787
- }
94788
- );
94789
- }
94790
- }
94791
-
94792
94602
 
94793
94603
  function ChartPictureVolProfileSettingMenu(divElement)
94794
94604
  {