hqchart 1.1.13455 → 1.1.13466
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/lib/umychart.vue.js +15 -12
- package/package.json +1 -1
- package/src/jscommon/umychart.js +18 -1
- package/src/jscommon/umychart.report.js +1 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +20 -3
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +20 -3
package/lib/umychart.vue.js
CHANGED
|
@@ -1570,7 +1570,8 @@ this.PhonePinch=null;//手机双指操作信息
|
|
|
1570
1570
|
this.IsOnTouch=false;//是否再操作数据
|
|
1571
1571
|
this.TouchDrawCount=0;//手势绘制次数
|
|
1572
1572
|
this.DisableMouse=false;//禁止鼠标事件
|
|
1573
|
-
this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;this.PressTime=500;this.
|
|
1573
|
+
this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;this.PressTime=500;this.IsPress=false;//是否长按
|
|
1574
|
+
this.NetworkFilter;//网络请求回调 function(data, callback);
|
|
1574
1575
|
this.LastMouseStatus={MouseOnToolbar:null};// MouseOnToolbar={ Rect:{}, Title: }
|
|
1575
1576
|
this.ClickDownPoint;//鼠标点击坐标 {X, Y}, 鼠标放开以后清空为null
|
|
1576
1577
|
this.IsDestroy=false;//是否已经销毁了
|
|
@@ -1688,9 +1689,9 @@ this.IsPhoneDragging=function(e){// JSConsole.Chart.Log(e);
|
|
|
1688
1689
|
var changed=e.changedTouches.length;var touching=e.touches.length;return changed==1&&touching==1;};//是否是2个手指操所
|
|
1689
1690
|
this.IsPhonePinching=function(e){var changed=e.changedTouches.length;var touching=e.touches.length;return(changed==1||changed==2)&&touching==2;};this.PreventTouchEvent=function(e){if(e.cancelable)e.preventDefault();e.stopPropagation();};this.GetToucheData=function(e,isForceLandscape){var touches=new Array();var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
|
|
1690
1691
|
for(var i=0;i<e.touches.length;++i){var item=e.touches[i];if(isForceLandscape){touches.push({clientX:item.clientY*pixelTatio,clientY:item.clientX*pixelTatio,pageX:item.pageY*pixelTatio,pageY:item.pageX*pixelTatio});}else{touches.push({clientX:item.clientX*pixelTatio,clientY:item.clientY*pixelTatio,pageX:item.pageX*pixelTatio,pageY:item.pageY*pixelTatio});}}return touches;};this.IsSingleTouch=function(e)//是否是单点触屏
|
|
1691
|
-
{var touchCount=e.touches.length;return touchCount==1;};this.StopDragTimer=function(){if(IFrameSplitOperator.IsNumber(this.DragTimer)){clearTimeout(this.DragTimer);this.DragTimer=null;}};this.GetMoveAngle=function(pt,pt2)//计算角度
|
|
1692
|
+
{var touchCount=e.touches.length;return touchCount==1;};this.StopDragTimer=function(){if(IFrameSplitOperator.IsNumber(this.DragTimer)){clearTimeout(this.DragTimer);this.DragTimer=null;this.IsPress=false;}};this.GetMoveAngle=function(pt,pt2)//计算角度
|
|
1692
1693
|
{var xMove=Math.abs(pt.X-pt2.X);var yMove=Math.abs(pt.Y-pt2.Y);var angle=Math.atan(xMove/yMove)*180/Math.PI;return angle;};//手机拖拽
|
|
1693
|
-
uielement.ontouchstart=function(e){_this5.OnTouchStart(e);};uielement.ontouchmove=function(e){_this5.OnTouchMove(e);};uielement.ontouchend=function(e){_this5.OnTouchEnd(e);};this.AddPhoneDBClickInfo=function(x,y,time){var item={X:x,Y:y,Time:time};this.PhoneDBClickInfo.Start.push(item);};this.ClearPhoneDBClickInfo=function(){this.PhoneDBClickInfo.Start=[];};this.IsShortPhoneClick=function(x,y,time){};this.OnTouchStart=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.IsOnTouch=true;this.TouchDrawCount=0;this.PhonePinch=null;this.StopDragTimer();var isSingleTouch=this.IsSingleTouch(e);if(this.EnableScrollUpDown==false||!isSingleTouch||//多点触屏
|
|
1694
|
+
uielement.ontouchstart=function(e){_this5.OnTouchStart(e);};uielement.ontouchmove=function(e){_this5.OnTouchMove(e);};uielement.ontouchend=function(e){_this5.OnTouchEnd(e);};this.AddPhoneDBClickInfo=function(x,y,time){var item={X:x,Y:y,Time:time};this.PhoneDBClickInfo.Start.push(item);};this.ClearPhoneDBClickInfo=function(){this.PhoneDBClickInfo.Start=[];};this.IsShortPhoneClick=function(x,y,time){};this.OnTouchStart=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.IsPress=false;this.IsOnTouch=true;this.TouchDrawCount=0;this.PhonePinch=null;this.StopDragTimer();var isSingleTouch=this.IsSingleTouch(e);if(this.EnableScrollUpDown==false||!isSingleTouch||//多点触屏
|
|
1694
1695
|
this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID&&this.TouchStatus.CorssCursorShow==true)//十字光标显示,不能滚动页面
|
|
1695
1696
|
{if(e.cancelable)e.preventDefault();}if(this.IsPhoneDragging(e)){var touches=this.GetToucheData(e,this.IsForceLandscape);var pt=this.PointAbsoluteToRelative(touches[0].clientX,touches[0].clientY,true);if(this.TryClickLock||this.TryClickIndexTitle)//指标枷锁区域 , 指标标题点击
|
|
1696
1697
|
{var x=pt.X;var y=pt.Y;if(this.TryClickLock&&this.TryClickLock(x,y))return;if(this.TryClickIndexTitle&&this.TryClickIndexTitle(x,y))return;}if(this.ClickFrameButton){var button=this.Frame.PtInButtons(pt.X,pt.Y);if(button){this.ClickFrameButton(button,e);return;}}if(this.EnableVerticalDrag){this.VerticalDrag={IsDrag:false};if(this.Frame.PtInFrameVertical(pt.X,pt.Y))this.VerticalDrag.IsDrag=true;}var bStartTimer=true;if(this.ChartDrawOption.IsLockScreen){bStartTimer=false;}else if(this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID){if(this.TouchStatus.CorssCursorShow==true)bStartTimer=false;}else if(this.DragMode==JSCHART_DRAG_ID.DISABLE_DRAG_ID){bStartTimer=false;}else{if(!isSingleTouch)bStartTimer=false;}if(this.VerticalDrag)bStartTimer=false;if(this.EnableClickModel&&this.ClickModel.IsShowCorssCursor==true)bStartTimer=false;var drag={"Click":{},"LastMove":{}//最后移动的位置
|
|
@@ -1702,7 +1703,7 @@ this.PhoneTouchInfo={Start:{X:touches[0].clientX,Y:touches[0].clientY},End:{X:to
|
|
|
1702
1703
|
if(this.FinishChartDrawPicturePoint()){if(drawPicture.IsDrawMain)this.Draw();else this.DrawDynamicInfo({Corss:false,Tooltip:false});}}if(e.cancelable)e.preventDefault();return;}else{var pt=this.PointAbsoluteToRelative(touches[0].clientX,touches[0].clientY,true);var drawPictrueData={X:pt.X,Y:pt.Y};var pixelTatio=GetDevicePixelRatio();//鼠标移动坐标是原始坐标 需要乘以放大倍速
|
|
1703
1704
|
if(this.GetChartDrawPictureByPoint(drawPictrueData)){drawPictrueData.ChartDrawPicture.Status=20;drawPictrueData.ChartDrawPicture.ValueToPoint();drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;drawPictrueData.ChartDrawPicture.IsSelected=true;this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE);//选中画图工具事件
|
|
1704
1705
|
if(event&&event.Callback){var sendData={DrawPicture:drawPictrueData.ChartDrawPicture};event.Callback(event,sendData,this);}var drawType=0;if(drawPictrueData.ChartDrawPicture.IsDrawMain)drawType=1;else if(drawPictureActive.Select.Guid&&drawPictureActive.Select.Chart&&drawPictureActive.Select.Chart.IsDrawMain)drawType=1;if(drawType==1)this.Draw();if(e.cancelable)e.preventDefault();return;}}if(bStartTimer){//长按2秒,十字光标
|
|
1705
|
-
var self=this;this.DragTimer=setTimeout(function(){if(drag.Click.X==drag.LastMove.X&&drag.Click.Y==drag.LastMove.Y)//手指没有移动,出现十字光标
|
|
1706
|
+
var self=this;this.DragTimer=setTimeout(function(){self.IsPress=true;if(drag.Click.X==drag.LastMove.X&&drag.Click.Y==drag.LastMove.Y)//手指没有移动,出现十字光标
|
|
1706
1707
|
{var mouseDrag=self.MouseDrag;self.MouseDrag=null;if(self.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID)self.TouchStatus.CorssCursorShow=true;//十字显示
|
|
1707
1708
|
if(self.EnableClickModel===true)self.ClickModel.IsShowCorssCursor=true;self.MoveCorssCursor(drag.Click,e);//移动十字光标
|
|
1708
1709
|
}},self.PressTime);}if(this.EnableZoomIndexWindow){this.PhoneDBClick.AddTouchStart(touches[0].clientX,touches[0].clientY,Date.now());JSConsole.Chart.Log("[JSChartContainer::OnTouchStart] PhoneDBClick ",this.PhoneDBClick);}if(this.ChartDrawOption.IsLockScreen){this.MouseDrag=null;}else if(this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID){}else if(this.DragMode==JSCHART_DRAG_ID.DISABLE_DRAG_ID){this.MouseDrag=null;this.MoveCorssCursor(drag.Click,e);}else if(this.EnableClickModel){//if (this.ClickModel.IsShowCorssCursor===true) this.MoveCorssCursor(drag.Click,e)
|
|
@@ -5703,7 +5704,8 @@ this.Canvas.fillStyle=this.BGColor;var drawRect={Left:left,Top:bottom-bgHeight/2
|
|
|
5703
5704
|
if(left+textWidth>right)break;this.Canvas.fillText(text,left,bottom,textWidth);left+=textWidth;}}if(this.Explain)//说明信息
|
|
5704
5705
|
{this.Canvas.fillStyle=this.TitleColor;var text="说明:"+this.Explain;var textWidth=this.Canvas.measureText(text).width+2;if(left+textWidth<right){this.Canvas.fillText(text,left,bottom,textWidth);left+=textWidth;}}if(this.OverlayIndexType.Position==1){if(!this.Frame.ChartBorder.IsShowTitleOnly)this.DrawOverlayIndexSingleLine();}else{this.DrawOverlayIndex(left+5*GetDevicePixelRatio());//间距都空点 和主指标区分开
|
|
5705
5706
|
}};this.OnDrawEventCallback=function(drawData){if(!this.OnDrawEvent||!this.OnDrawEvent.Callback)return;var data={Draw:drawData,Name:'DynamicChartTitlePainting'};this.OnDrawEvent.Callback(this.OnDrawEvent,data,this);};this.GetFontHeight=function(font){return GetFontHeight(this.Canvas,font,"擎");};//指标名字按钮
|
|
5706
|
-
this.DrawNameButton=function(rtButton,moveonPoint,mouseStatus){var pixelRatio=GetDevicePixelRatio();var title=this.Title;if(this.IsShowNameArrow)title+='▼';var textWidth=this.Canvas.measureText(title).width;var bgHeight=this.Canvas.measureText("擎").width+4*pixelRatio;var roundRadius=this.BorderRoundRadius*pixelRatio;var bgWidth=textWidth+4*pixelRatio+roundRadius*2;rtButton.Top=rtButton.YCenter-bgHeight/2-1,rtButton.Width=bgWidth;rtButton.Height=bgHeight;rtButton.Right=rtButton.Left+rtButton.Width;rtButton.Bottom=rtButton.Top+rtButton.Height;var borderColor=this.BGBorderColor;if(moveonPoint&&moveonPoint.X>=rtButton.Left&&moveonPoint.X<rtButton.Right&&moveonPoint.Y>=rtButton.Top&&moveonPoint.Y<=rtButton.Bottom){if(this.BGBorderMoveOnColor)borderColor=this.BGBorderMoveOnColor;if(mouseStatus){var btnItem={ID:JSCHART_BUTTON_ID.INDEX_NAME_BUTTON};mouseStatus.MouseOnToolbar={ID:"IndexNameButton",Rect:rtButton,Item:btnItem,Frame:this.Frame,Point:{X:moveonPoint.X,Y:moveonPoint.Y}};}}if(this.
|
|
5707
|
+
this.DrawNameButton=function(rtButton,moveonPoint,mouseStatus){var pixelRatio=GetDevicePixelRatio();var title=this.Title;if(this.IsShowNameArrow)title+='▼';var textWidth=this.Canvas.measureText(title).width;var bgHeight=this.Canvas.measureText("擎").width+4*pixelRatio;var roundRadius=this.BorderRoundRadius*pixelRatio;var bgWidth=textWidth+4*pixelRatio+roundRadius*2;rtButton.Top=rtButton.YCenter-bgHeight/2-1,rtButton.Width=bgWidth;rtButton.Height=bgHeight;rtButton.Right=rtButton.Left+rtButton.Width;rtButton.Bottom=rtButton.Top+rtButton.Height;var borderColor=this.BGBorderColor;if(moveonPoint&&moveonPoint.X>=rtButton.Left&&moveonPoint.X<rtButton.Right&&moveonPoint.Y>=rtButton.Top&&moveonPoint.Y<=rtButton.Bottom){if(this.BGBorderMoveOnColor)borderColor=this.BGBorderMoveOnColor;if(mouseStatus){var btnItem={ID:JSCHART_BUTTON_ID.INDEX_NAME_BUTTON};mouseStatus.MouseOnToolbar={ID:"IndexNameButton",Rect:rtButton,Item:btnItem,Frame:this.Frame,Point:{X:moveonPoint.X,Y:moveonPoint.Y}};}}if(this.Canvas.roundRect&&this.NameButtonStyle==1)//判断下是否支持roundRect
|
|
5708
|
+
{this.Canvas.beginPath();this.Canvas.roundRect(ToFixedPoint(rtButton.Left),ToFixedPoint(rtButton.Top),ToFixedRect(rtButton.Width),ToFixedRect(rtButton.Height),[roundRadius]);this.Canvas.closePath();this.Canvas.fillStyle=this.BGColor;this.Canvas.fill();if(borderColor){this.Canvas.strokeStyle=borderColor;this.Canvas.stroke();}}else{this.Canvas.fillStyle=this.BGColor;this.Canvas.fillRect(rtButton.Left,rtButton.Top,rtButton.Width,rtButton.Height);if(borderColor){this.Canvas.strokeStyle=borderColor;this.Canvas.strokeRect(ToFixedPoint(rtButton.Left),ToFixedPoint(rtButton.Top),ToFixedRect(rtButton.Width),ToFixedRect(rtButton.Height),[roundRadius]);}}this.Canvas.fillStyle=this.TitleColor;this.Canvas.fillText(title,rtButton.Left+roundRadius+2*pixelRatio,rtButton.YCenter,textWidth);};//绘制按钮
|
|
5707
5709
|
this.DrawButton=function(item,rtButton,moveonPoint,mouseStatus){var size=item.Style.Size;if(IFrameSplitOperator.IsNumber(item.Style.YMoveOffset))rtButton.YCenter+=item.Style.YMoveOffset;var font=size+'px '+item.Style.Family;rtButton.Top=rtButton.YCenter-size/2;rtButton.Width=size+item.Style.MerginLeft;rtButton.Height=size;rtButton.Bottom=rtButton.Top+rtButton.Height;rtButton.Right=rtButton.Left+rtButton.Width;var color=item.Style.Color;if(moveonPoint&&moveonPoint.X>=rtButton.Left&&moveonPoint.X<rtButton.Right&&moveonPoint.Y>=rtButton.Top&&moveonPoint.Y<=rtButton.Bottom){color=item.Style.MoveOnColor;if(mouseStatus)mouseStatus.MouseOnToolbar={ID:"TitleButton",Rect:rtButton,Item:item,Frame:this.Frame,Point:{X:moveonPoint.X,Y:moveonPoint.Y}};}this.Canvas.fillStyle=color;this.Canvas.font=font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";this.Canvas.fillText(item.Style.Text,rtButton.Left,rtButton.YCenter);return true;};this.DrawToolbar=function(toolbarInfo,moveonPoint,mouseStatus){toolbarInfo.Width=0;if(!this.Frame||!this.Frame.GetLeftToolbar)return;var aryButton=this.Frame.GetLeftToolbar();if(!IFrameSplitOperator.IsNonEmptyArray(aryButton))return;if(this.Frame.IsHScreen===true){}else{var border=this.Frame.GetBorder();var right=border.Right-3;var left=border.Left+3;var yCenter=toolbarInfo.YCenter;for(var i=0;i<aryButton.length;++i){var item=aryButton[i];var rtButton={Left:left,YCenter:yCenter};this.DrawButton(item,rtButton,moveonPoint,mouseStatus);this.Buttons.push({ID:item.ID,Rect:rtButton,FrameID:this.Frame.Identify,Type:0,Data:item.Data});//Type 0=主图按钮 1=附图按钮 2=主图指标名字按钮
|
|
5708
5710
|
left=rtButton.Right;toolbarInfo.Width+=rtButton.Width;}if(toolbarInfo.Width>0)toolbarInfo.Width+=3;}};this.DrawOverlayToolbar=function(overlayItem,toolbarInfo,moveonPoint,mouseStatus){toolbarInfo.Width=0;if(!overlayItem||!overlayItem.Frame||!overlayItem.Frame.GetLeftToolbar)return;var frame=overlayItem.Frame;var aryButton=frame.GetLeftToolbar({Overlay:overlayItem,OverlayID:toolbarInfo.ID});if(!IFrameSplitOperator.IsNonEmptyArray(aryButton))return;if(this.Frame.IsHScreen===true){}else{var border=frame.GetBorder();var right=border.Right-3;var left=border.Left+3;var yCenter=toolbarInfo.YCenter;for(var i=0;i<aryButton.length;++i){var item=aryButton[i];var rtButton={Left:left,YCenter:yCenter};this.DrawButton(item,rtButton,moveonPoint,mouseStatus);this.Buttons.push({ID:item.ID,Rect:rtButton,FrameID:this.Frame.Identify,Type:1,OverlayID:toolbarInfo.ID,Title:overlayItem.Title,Data:item.Data});left=rtButton.Right;toolbarInfo.Width+=rtButton.Width;}if(toolbarInfo.Width>0)toolbarInfo.Width+=3;}};this.PtInButtons=function(x,y){for(var i=0;i<this.Buttons.length;++i){var item=this.Buttons[i];if(!item.Rect)continue;var rect=item.Rect;if(x>rect.Left&&x<rect.Right&&y>rect.Top&&y<rect.Bottom){var result={ID:item.ID,Rect:rect,FrameID:item.FrameID,Type:item.Type,Data:item.Data};if(item.Type==1){result.Title=item.Title;result.OverlayID=item.OverlayID;}return result;}}return null;};}//画图工具
|
|
5709
5711
|
function IChartDrawPicture(){this.Frame;this.Canvas;this.Point=new Array();//画图的点
|
|
@@ -7763,7 +7765,7 @@ this.PtInClient_V2=function(x,y){this.Canvas.beginPath();if(this.Frame.IsHScreen
|
|
|
7763
7765
|
{for(var i=0;i<border.DayBorder.length;++i){var client=border.DayBorder[i];this.Canvas.beginPath();this.Canvas.rect(client.LeftEx,border.TopEx,client.RightEx-client.LeftEx,border.BottomEx-border.TopEx);if(this.Canvas.isPointInPath(x,y))return 100+i;//盘前
|
|
7764
7766
|
this.Canvas.beginPath();this.Canvas.rect(client.Left,border.TopEx,client.LeftEx-client.Left,border.BottomEx-border.TopEx);if(this.Canvas.isPointInPath(x,y))return 200+i;//盘后
|
|
7765
7767
|
this.Canvas.beginPath();this.Canvas.rect(client.RightEx,border.TopEx,client.Right-client.RightEx,border.BottomEx-border.TopEx);if(this.Canvas.isPointInPath(x,y))return 300+i;}return-2;}this.Canvas.rect(border.LeftEx,border.Top,border.RightEx-border.LeftEx,border.Bottom-border.Top);}if(this.Canvas.isPointInPath(x,y))return 1;if(this.Frame.ChartBorder.LeftExtendWidth>10){this.Canvas.beginPath();if(this.Frame.IsHScreen===true){this.Canvas.rect(border.Left,border.Top,border.Right-border.Left,border.TopEx-border.Top);}else{this.Canvas.rect(border.Left,border.Top,border.LeftEx-border.Left,border.Bottom-border.Top);}if(this.Canvas.isPointInPath(x,y))return 2;}if(this.Frame.ChartBorder.RightExtendWidth>10){this.Canvas.beginPath();if(this.Frame.IsHScreen===true){this.Canvas.rect(border.Left,border.BottomEx,border.Right-border.Left,border.Bottom-border.BottomEx);}else{this.Canvas.rect(border.RightEx,border.Top,border.Right-border.RightEx,border.Bottom-border.Top);}if(this.Canvas.isPointInPath(x,y))return 3;}return-1;};//手势
|
|
7766
|
-
this.OnTouchStart=function(e){if(this.DragMode==0)return;if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.IsOnTouch=true;this.TouchDrawCount=0;this.PhonePinch=null;this.StopDragTimer();if(this.EnableScrollUpDown==false)e.preventDefault();//上下拖动图形不能阻止事件
|
|
7768
|
+
this.OnTouchStart=function(e){if(this.DragMode==0)return;if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.IsPress=false;this.IsOnTouch=true;this.TouchDrawCount=0;this.PhonePinch=null;this.StopDragTimer();if(this.EnableScrollUpDown==false)e.preventDefault();//上下拖动图形不能阻止事件
|
|
7767
7769
|
if(this.IsPhoneDragging(e)){var drag={Click:{},LastMove:{}};//LastMove=最后移动的位置
|
|
7768
7770
|
var touches=this.GetToucheData(e,this.IsForceLandscape);var pt=this.PointAbsoluteToRelative(touches[0].clientX,touches[0].clientY,true);if(this.TryClickLock||this.TryClickIndexTitle)//指标枷锁区域 , 指标标题点击
|
|
7769
7771
|
{var x=pt.X;var y=pt.Y;if(this.TryClickLock&&this.TryClickLock(x,y))return;if(this.TryClickIndexTitle&&this.TryClickIndexTitle(x,y))return;}if(this.ClickFrameButton){var button=this.Frame.PtInButtons(pt.X,pt.Y);if(button){this.ClickFrameButton(button,e);return;}}drag.Click.X=touches[0].clientX;drag.Click.Y=touches[0].clientY;drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;var self=this;var T_ShowCorssCursor=function T_ShowCorssCursor()//临时函数(Temp_) T_开头
|
|
@@ -7772,7 +7774,7 @@ var touches=this.GetToucheData(e,this.IsForceLandscape);var pt=this.PointAbsolut
|
|
|
7772
7774
|
{var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==2)this.SetChartDrawPictureThirdPoint(drag.Click.X,drag.Click.Y,true);else{this.SetChartDrawPictureFirstPoint(drag.Click.X,drag.Click.Y,true);//只有1个点 直接完成
|
|
7773
7775
|
if(this.FinishChartDrawPicturePoint())this.DrawDynamicInfo({Corss:false,Tooltip:false});}if(e.cancelable)e.preventDefault();return;}else{var drawPictrueData={};var pixelTatio=GetDevicePixelRatio();//鼠标移动坐标是原始坐标 需要乘以放大倍速
|
|
7774
7776
|
drawPictrueData.X=touches[0].clientX-uielement.getBoundingClientRect().left;drawPictrueData.Y=touches[0].clientY-uielement.getBoundingClientRect().top;if(this.GetChartDrawPictureByPoint(drawPictrueData)){drawPictrueData.ChartDrawPicture.Status=20;drawPictrueData.ChartDrawPicture.ValueToPoint();drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;drawPictrueData.ChartDrawPicture.IsSelected=true;this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE);//选中画图工具事件
|
|
7775
|
-
if(event&&event.Callback){var sendData={DrawPicture:drawPictrueData.ChartDrawPicture};event.Callback(event,sendData,this);}if(e.cancelable)e.preventDefault();return;}}}else{if(this.EnableScrollUpDown==true){this.DragTimer=setTimeout(function(){if(drag.Click.X==drag.LastMove.X&&drag.Click.Y==drag.LastMove.Y){var mouseDrag=self.MouseDrag;self.MouseDrag=null;T_ShowCorssCursor();self.PreventTouchEvent(e);}},800);}this.MouseDrag=drag;this.PhoneTouchInfo={Start:{X:touches[0].clientX,Y:touches[0].clientY},End:{X:touches[0].clientX,Y:touches[0].clientY}};this.SelectChartDrawPicture=null;if(this.EnableScrollUpDown==false)T_ShowCorssCursor();//移动十字光标
|
|
7777
|
+
if(event&&event.Callback){var sendData={DrawPicture:drawPictrueData.ChartDrawPicture};event.Callback(event,sendData,this);}if(e.cancelable)e.preventDefault();return;}}}else{if(this.EnableScrollUpDown==true){this.DragTimer=setTimeout(function(){self.IsPress=true;if(drag.Click.X==drag.LastMove.X&&drag.Click.Y==drag.LastMove.Y){var mouseDrag=self.MouseDrag;self.MouseDrag=null;T_ShowCorssCursor();self.PreventTouchEvent(e);}},800);}this.MouseDrag=drag;this.PhoneTouchInfo={Start:{X:touches[0].clientX,Y:touches[0].clientY},End:{X:touches[0].clientX,Y:touches[0].clientY}};this.SelectChartDrawPicture=null;if(this.EnableScrollUpDown==false)T_ShowCorssCursor();//移动十字光标
|
|
7776
7778
|
else if(this.IsClickShowCorssCursor)T_ShowCorssCursor();}if(this.EnableZoomIndexWindow){this.PhoneDBClick.AddTouchStart(touches[0].clientX,touches[0].clientY,Date.now());JSConsole.Chart.Log("[MinuteChartContainer::OnTouchStart] PhoneDBClick ",this.PhoneDBClick);}this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchStart"},e);}else if(this.IsPhonePinching(e)){var phonePinch={"Start":{},"Last":{}};var touches=this.GetToucheData(e,this.IsForceLandscape);phonePinch.Start={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};phonePinch.Last={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};this.PhonePinch=phonePinch;this.SelectChartDrawPicture=null;}};this.OnTouchMove=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var touches=this.GetToucheData(e,this.IsForceLandscape);if(this.IsPhoneDragging(e)){var drag=this.MouseDrag;if(drag==null){var pixelTatio=GetDevicePixelRatio();var x=touches[0].clientX-uielement.getBoundingClientRect().left*pixelTatio;var y=touches[0].clientY-uielement.getBoundingClientRect().top*pixelTatio;this.OnMouseMove(x,y,e);}else{var moveAngle=this.GetMoveAngle(drag.LastMove,{X:touches[0].clientX,Y:touches[0].clientY});var moveSetp=Math.abs(drag.LastMove.X-touches[0].clientX);var moveUpDown=Math.abs(drag.LastMove.Y-touches[0].clientY);moveSetp=parseInt(moveSetp);if(this.CurrentChartDrawPicture){var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==1||drawPicture.Status==2){if(moveSetp<5&&moveUpDown<5)return;if(this.SetChartDrawPictureSecondPoint(touches[0].clientX,touches[0].clientY,true)){this.DrawDynamicInfo();}}else if(drawPicture.Status==3){if(this.SetChartDrawPictureThirdPoint(touches[0].clientX,touches[0].clientY,true)){this.DrawDynamicInfo();}}else if(drawPicture.Status==20)//画图工具移动
|
|
7777
7779
|
{if(moveSetp<5&&moveUpDown<5)return;if(this.MoveChartDrawPicture(touches[0].clientX-drag.LastMove.X,touches[0].clientY-drag.LastMove.Y,true)){this.DrawDynamicInfo();}}drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;}else{//上下滚动
|
|
7778
7780
|
if((moveUpDown>0&&moveSetp<=3||moveAngle<=this.TouchMoveMinAngle)&&this.EnableScrollUpDown==true){this.StopDragTimer();return;}this.PreventTouchEvent(e);this.MouseDrag=null;var pixelTatio=GetDevicePixelRatio();var x=touches[0].clientX-uielement.getBoundingClientRect().left*pixelTatio;var y=touches[0].clientY-uielement.getBoundingClientRect().top*pixelTatio;this.OnMouseMove(x,y,e);}}if(this.PhoneTouchInfo){this.PhoneTouchInfo.End.X=touches[0].clientX;this.PhoneTouchInfo.End.Y=touches[0].clientY;}}else if(this.IsPhonePinching(e)){this.PreventTouchEvent(e);var phonePinch=this.PhonePinch;if(!phonePinch)return;var yHeight=Math.abs(touches[0].pageY-touches[1].pageY);var yLastHeight=Math.abs(phonePinch.Last.Y-phonePinch.Last.Y2);var yStep=yHeight-yLastHeight;var xHeight=Math.abs(touches[0].pageX-touches[1].pageX);var xLastHeight=Math.abs(phonePinch.Last.X-phonePinch.Last.X2);var xStep=xHeight-xLastHeight;var minStep=this.ZoomStepPixel;if(Math.abs(xStep)>minStep){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_MINUTE_TOUCH_ZOOM);if(event&&event.Callback){var data={XStep:xStep,YStep:yStep,PreventDefault:false};event.Callback(event,data,this);if(data.PreventDefault){this.PhonePinch=null;this.StopDragTimer();return;}}}phonePinch.Last={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};}if(this.EnableScrollUpDown==false){e.preventDefault();}else{if(drag==null){this.PreventTouchEvent(e);//十字光标出来了,阻止消息
|
|
@@ -7974,7 +7976,8 @@ if(this.IsBeforeData)this.BeforeOpenData=beforeOpenData;if(this.IsAfterData)this
|
|
|
7974
7976
|
this.DataStatus.LatestDate=data.stock[0].date;//保存下最后一天的日期
|
|
7975
7977
|
this.DataStatus.LatestDay=true;if(this.DayCount>1)//多日走势图
|
|
7976
7978
|
{this.UpdateCallCationData(beforeOpenData,afterCloseData);this.UpdateLineColorData(aryColorData,data.stock[0].date);this.UpdateLatestMinuteData(aryMinuteData,data.stock[0].date,data.stock[0]);this.UpdateHistoryMinuteUI(updateTime);this.RecvMinuteDataEvent({FunctionName:"RecvMinuteData"});this.RequestOverlayMinuteData();//请求叠加数据 (主数据下载完再下载)
|
|
7977
|
-
this.BindAllOverlayIndexData(this.SourceData);this.AutoUpdateEvent(true,"MinuteChartContainer::RecvMinuteData");this.AutoUpdate();return;}
|
|
7979
|
+
this.BindAllOverlayIndexData(this.SourceData);this.AutoUpdateEvent(true,"MinuteChartContainer::RecvMinuteData");this.AutoUpdate();return;}if(this.IsOnTouch==true)//正在操作中不更新数据
|
|
7980
|
+
{if(this.SourceData&&IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data)){this.AutoUpdate();return;}}//原始数据
|
|
7978
7981
|
var sourceData=new ChartData();sourceData.Data=aryMinuteData;sourceData.UpdateTime=updateTime;this.ColorLineData=aryColorData;this.TradeDate=data.stock[0].date;this.Frame.SetDayCount(1);//单日数据
|
|
7979
7982
|
this.SourceData=sourceData;this.Symbol=data.stock[0].symbol;this.Name=data.stock[0].name;this.SetCallCationDataBorder({Left:this.IsBeforeData,Right:this.IsAfterData,MultiDay:{Left:false,Right:false}});if(this.ShareAfterVol==2)//盘前, 盘后成交量公用坐标
|
|
7980
7983
|
{if(this.BeforeOpenData&&this.AfterCloseData){var max=Math.max(this.BeforeOpenData.VolMax,this.AfterCloseData.VolMax);var min=Math.min(this.BeforeOpenData.VolMin,this.AfterCloseData.VolMin);this.BeforeOpenData.VolMax=this.AfterCloseData.VolMax=max;this.BeforeOpenData.VolMin=this.AfterCloseData.VolMin=min;}}var yClose=data.stock[0].yclose;var upperSymbol=this.Symbol.toUpperCase();var isFutures=MARKET_SUFFIX_NAME.IsFutures(upperSymbol);if(data.stock[0].yclearing>0&&isFutures)yClose=data.stock[0].yclearing;//期货使用前结算价
|
|
@@ -8347,7 +8350,7 @@ if(this.JSChartContainer.ChartSplashPaint&&this.JSChartContainer.ChartSplashPain
|
|
|
8347
8350
|
if(this.JSChartContainer.DataMove(moveSetp,isLeft)){this.JSChartContainer.UpdataDataoffset();this.JSChartContainer.UpdatePointByCursorIndex();this.JSChartContainer.UpdateFrameMaxMin();this.JSChartContainer.ResetFrameXYSplit();this.JSChartContainer.Draw();}drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}};document.onmouseup=function(e){//清空事件
|
|
8348
8351
|
document.onmousemove=null;document.onmouseup=null;//清空数据
|
|
8349
8352
|
this.JSChartContainer.MouseDrag=null;this.JSChartContainer.CurrentChartDrawPicture=null;this.JSChartContainer=null;};};//手机拖拽
|
|
8350
|
-
this.OnTouchStart=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.PhonePinch=null;this.IsOnTouch=true;this.TouchDrawCount=0;this.StopDragTimer();var isSingleTouch=this.IsSingleTouch(e);if(e.cancelable)e.preventDefault();if(this.IsPhoneDragging(e)){var touches=this.GetToucheData(e,false);var pt=this.PointAbsoluteToRelative(touches[0].clientX,touches[0].clientY,true);if(this.TryClickLock||this.TryClickIndexTitle)//指标枷锁区域, 指标标题点击
|
|
8353
|
+
this.OnTouchStart=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.IsPress=false;this.PhonePinch=null;this.IsOnTouch=true;this.TouchDrawCount=0;this.StopDragTimer();var isSingleTouch=this.IsSingleTouch(e);if(e.cancelable)e.preventDefault();if(this.IsPhoneDragging(e)){var touches=this.GetToucheData(e,false);var pt=this.PointAbsoluteToRelative(touches[0].clientX,touches[0].clientY,true);if(this.TryClickLock||this.TryClickIndexTitle)//指标枷锁区域, 指标标题点击
|
|
8351
8354
|
{var x=pt.X;var y=pt.Y;if(this.TryClickLock&&this.TryClickLock(x,y))return;if(this.TryClickIndexTitle&&this.TryClickIndexTitle(x,y))return;}if(this.ClickFrameButton){var button=this.Frame.PtInButtons(pt.X,pt.Y);if(button){this.ClickFrameButton(button,e);return;}}if(this.EnableVerticalDrag){this.VerticalDrag={IsDrag:false};if(this.Frame.PtInFrameVertical(pt.X,pt.Y))this.VerticalDrag.IsDrag=true;}var bStartTimer=true;if(this.ChartDrawOption.IsLockScreen){bStartTimer=false;}else if(this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID){if(this.TouchStatus.CorssCursorShow==true)bStartTimer=false;}else if(this.DragMode==JSCHART_DRAG_ID.DISABLE_DRAG_ID){bStartTimer=false;}else{if(!isSingleTouch)bStartTimer=false;}if(this.VerticalDrag)bStartTimer=false;var drag={Click:{},LastMove:{}};//LastMove=最后移动的位置
|
|
8352
8355
|
//var touches=this.GetToucheData(e,false);
|
|
8353
8356
|
drag.Click.X=touches[0].clientX;drag.Click.Y=touches[0].clientY;drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;this.MouseDrag=drag;this.PhoneTouchInfo={Start:{X:touches[0].clientX,Y:touches[0].clientY},End:{X:touches[0].clientX,Y:touches[0].clientY}};if(this.SelectChartDrawPicture)this.SelectChartDrawPicture.IsSelected=false;this.SelectChartDrawPicture=null;if(this.CurrentChartDrawPicture)//画图工具模式
|
|
@@ -8355,7 +8358,7 @@ drag.Click.X=touches[0].clientX;drag.Click.Y=touches[0].clientY;drag.LastMove.X=
|
|
|
8355
8358
|
if(this.FinishChartDrawPicturePoint())this.DrawDynamicInfo({Corss:false,Tooltip:false});}if(e.cancelable)e.preventDefault();return;}else{var drawPictrueData={};var pixelTatio=GetDevicePixelRatio();//鼠标移动坐标是原始坐标 需要乘以放大倍速
|
|
8356
8359
|
drawPictrueData.X=touches[0].clientX-uielement.getBoundingClientRect().left;drawPictrueData.Y=touches[0].clientY-uielement.getBoundingClientRect().top;if(this.GetChartDrawPictureByPoint(drawPictrueData)){drawPictrueData.ChartDrawPicture.Status=20;drawPictrueData.ChartDrawPicture.ValueToPoint();drawPictrueData.ChartDrawPicture.MovePointIndex=drawPictrueData.PointIndex;drawPictrueData.ChartDrawPicture.IsSelected=true;this.CurrentChartDrawPicture=drawPictrueData.ChartDrawPicture;this.SelectChartDrawPicture=drawPictrueData.ChartDrawPicture;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE);//选中画图工具事件
|
|
8357
8360
|
if(event&&event.Callback){var sendData={DrawPicture:drawPictrueData.ChartDrawPicture};event.Callback(event,sendData,this);}if(e.cancelable)e.preventDefault();return;}}if(bStartTimer)//长按2秒,十字光标
|
|
8358
|
-
{var self=this;this.DragTimer=setTimeout(function(){if(drag.Click.X==drag.LastMove.X&&drag.Click.Y==drag.LastMove.Y)//手指没有移动,出现十字光标
|
|
8361
|
+
{var self=this;this.DragTimer=setTimeout(function(){self.IsPress=false;if(drag.Click.X==drag.LastMove.X&&drag.Click.Y==drag.LastMove.Y)//手指没有移动,出现十字光标
|
|
8359
8362
|
{var mouseDrag=self.MouseDrag;self.MouseDrag=null;self.MoveCorssCursor(drag.Click,e);//移动十字光标
|
|
8360
8363
|
}},self.PressTime);}if(this.ChartDrawOption.IsLockScreen){this.MouseDrag=null;}else if(this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID){}else if(this.DragMode==JSCHART_DRAG_ID.DISABLE_DRAG_ID){this.MouseDrag=null;this.MoveCorssCursor(drag.Click,e);}else if(this.VerticalDrag){if(!this.VerticalDrag.IsDrag)this.MoveCorssCursor(drag.Click,e);//没有点击X轴, 就显示十字光标
|
|
8361
8364
|
}else if(this.IsClickShowCorssCursor){this.MoveCorssCursor(drag.Click,e);}}else if(this.IsPhonePinching(e)){var phonePinch={"Start":{},"Last":{}};var touches=this.GetToucheData(e,false);phonePinch.Start={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};phonePinch.Last={"X":touches[0].pageX,"Y":touches[0].pageY,"X2":touches[1].pageX,"Y2":touches[1].pageY};this.PhonePinch=phonePinch;this.SelectChartDrawPicture=null;//if (this.ChartDrawOption.IsLockScreen) this.PhonePinch=null; //锁屏禁止缩放
|
|
@@ -12495,7 +12498,7 @@ drawInfo.Text=(index+1).toString();}else if(column.Type==REPORT_COLUMN_ID.SYMBOL
|
|
|
12495
12498
|
if(stock&&stock.NameEx){var nameEx=stock.NameEx;drawInfo.Text=this.TextEllipsis(nameEx.Text,textWidth,column.MaxText);drawInfo.TextColor=this.GetNameColor(column,data.Symbol,rowType);if(nameEx.Symbol)drawInfo.Symbol=nameEx.Symbol;}}else if(column.Type==REPORT_COLUMN_ID.PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.Price,stock,data,drawInfo,{LimitBG:true});this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.OPEN_ID){//如果行情开盘价为涨停价或跌停价,则对内容加灰框
|
|
12496
12499
|
if(stock){this.DrawLimitPriceBorder(stock.Open,stock,left,top,column.Width);this.GetPriceDrawInfo(stock.Open,stock,data,drawInfo,{LimitBG:true});}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.HIGH_ID){//如果行情最高价为涨停价,则对内容加灰框
|
|
12497
12500
|
if(stock){this.DrawLimitPriceBorder(stock.High,stock,left,top,column.Width);this.GetPriceDrawInfo(stock.High,stock,data,drawInfo,{LimitBG:true});}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.LOW_ID){//如果行情最低价为跌停价,则对内容加灰框
|
|
12498
|
-
if(stock){this.DrawLimitPriceBorder(stock.Low,stock,left,top,column.Width);this.GetPriceDrawInfo(stock.Low,stock,data,drawInfo,{LimitBG:true});}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.YCLOSE_ID){if(stock)this.GetPriceDrawInfo(stock.YClose,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.BUY_PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.BuyPrice,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.SELL_PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.SellPrice,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.AVERAGE_PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.AvPrice,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.EXCHANGE_RATE_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.Exchange))drawInfo.Text=stock.Exchange.toFixed(2);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.BUY_VOL_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.BuyVol))drawInfo.Text=this.FormatVolString(stock.BuyVol);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.SELL_VOL_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.SellVol))drawInfo.Text=this.FormatVolString(stock.SellVol);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.VOL_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.Vol))drawInfo.Text=this.FormatVolString(stock.Vol);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.VOL_IN_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.VolIn))drawInfo.Text=this.FormatVolString(stock.VolIn);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.VOL_OUT_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.VolOut))drawInfo.Text=this.FormatVolString(stock.VolOut);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.TOTAL_SHARES_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.TotalShares))drawInfo.Text=this.FormatVolString(stock.TotalShares);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.OUTSTANDING_SHARES_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.OutShares))drawInfo.Text=this.FormatVolString(stock.OutShares);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CIRC_MARKET_VALUE_ID||column.Type==REPORT_COLUMN_ID.MARKET_VALUE_ID||column.Type==REPORT_COLUMN_ID.AMOUNT_ID){var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName]))drawInfo.Text=this.FormatVolString(stock[fieldName]);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.INCREASE_ID||column.Type==REPORT_COLUMN_ID.AMPLITUDE_ID||column.Type==REPORT_COLUMN_ID.UPDOWN_ID){var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];drawInfo.Text=value.toFixed(2);drawInfo.TextColor=this.GetUpDownColor(value,0);}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID){this.GetCustomStringDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID){this.GetCustomNumberDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_DATETIME_TEXT_ID){this.GetCustomDateTimeDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){this.GetCustomIconDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;this.DrawLine(stock.CloseLine,column,rtItem);}else if(column.Type==REPORT_COLUMN_ID.KLINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;this.DrawKLine(stock.KLine,column,rtItem,data);}else if(column.Type==REPORT_COLUMN_ID.TIME_ID){this.FormaTimeDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.DATE_ID){this.FormaDateDrawInfo(column,stock,drawInfo,data);}//拖拽行颜色
|
|
12501
|
+
if(stock){this.DrawLimitPriceBorder(stock.Low,stock,left,top,column.Width);this.GetPriceDrawInfo(stock.Low,stock,data,drawInfo,{LimitBG:true});}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.YCLOSE_ID){if(stock)this.GetPriceDrawInfo(stock.YClose,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.BUY_PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.BuyPrice,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.SELL_PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.SellPrice,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.AVERAGE_PRICE_ID){if(stock)this.GetPriceDrawInfo(stock.AvPrice,stock,data,drawInfo);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.EXCHANGE_RATE_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.Exchange))drawInfo.Text=stock.Exchange.toFixed(2);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.BUY_VOL_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.BuyVol))drawInfo.Text=this.FormatVolString(stock.BuyVol);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.SELL_VOL_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.SellVol))drawInfo.Text=this.FormatVolString(stock.SellVol);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.VOL_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.Vol))drawInfo.Text=this.FormatVolString(stock.Vol);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.VOL_IN_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.VolIn))drawInfo.Text=this.FormatVolString(stock.VolIn);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.VOL_OUT_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.VolOut))drawInfo.Text=this.FormatVolString(stock.VolOut);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.TOTAL_SHARES_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.TotalShares))drawInfo.Text=this.FormatVolString(stock.TotalShares);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.OUTSTANDING_SHARES_ID){if(stock&&IFrameSplitOperator.IsNumber(stock.OutShares))drawInfo.Text=this.FormatVolString(stock.OutShares);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CIRC_MARKET_VALUE_ID||column.Type==REPORT_COLUMN_ID.MARKET_VALUE_ID||column.Type==REPORT_COLUMN_ID.AMOUNT_ID){var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName]))drawInfo.Text=this.FormatVolString(stock[fieldName]);this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.INCREASE_ID||column.Type==REPORT_COLUMN_ID.AMPLITUDE_ID||column.Type==REPORT_COLUMN_ID.UPDOWN_ID){var fieldName=MAP_COLUMN_FIELD.get(column.Type);if(stock&&IFrameSplitOperator.IsNumber(stock[fieldName])){var value=stock[fieldName];drawInfo.Text=value.toFixed(2);drawInfo.TextColor=this.GetUpDownColor(value,0);}this.FormatDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_STRING_TEXT_ID){this.GetCustomStringDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_NUMBER_TEXT_ID){this.GetCustomNumberDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_DATETIME_TEXT_ID){this.GetCustomDateTimeDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){this.GetCustomIconDrawInfo(data,column,drawInfo);}else if(column.Type==REPORT_COLUMN_ID.CLOSE_LINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;if(stock)this.DrawLine(stock.CloseLine,column,rtItem);}else if(column.Type==REPORT_COLUMN_ID.KLINE_ID){var rtItem={Left:left,Top:top,Width:column.Width,Height:this.RowHeight};rtItem.Right=rtItem.Left+rtItem.Width;rtItem.Bottom=rtItem.Top+rtItem.Height;this.DrawKLine(stock.KLine,column,rtItem,data);}else if(column.Type==REPORT_COLUMN_ID.TIME_ID){this.FormaTimeDrawInfo(column,stock,drawInfo,data);}else if(column.Type==REPORT_COLUMN_ID.DATE_ID){this.FormaDateDrawInfo(column,stock,drawInfo,data);}//拖拽行颜色
|
|
12499
12502
|
if(rowType==3)drawInfo.TextColor=this.DragRowTextColor;if(drawInfo.Symbol){this.DrawItemTextEx(drawInfo,x,top,textWidth);}else if(column.Type==REPORT_COLUMN_ID.CUSTOM_ICON_ID){this.DrawIconItem(drawInfo,x,top,textWidth);}else{if(data.FlashBG&&data.FlashBG.Data&&column.ID!=undefined){if(data.FlashBG.Data.has(column.ID)){var flashItem=data.FlashBG.Data.get(column.ID);var drawBG={Rect:drawInfo.Rect,BGColor:flashItem.Color};--flashItem.Count;this.DrawItemBG(drawBG);if(this.GlobalOption)++this.GlobalOption.FlashBGCount;}}this.DrawItemBG(drawInfo);this.DrawItemText(drawInfo.Text,drawInfo.TextColor,drawInfo.TextAlign,x,top,textWidth,drawInfo.BGColor);}};this.DrawSymbolName=function(data,column,left,top,rowType){var stock=data.Stock;var symbol=data.Symbol;var name;if(stock){symbol=stock.Symbol;name=stock.Name;}if(!symbol&&!name)return;var y=top+this.ItemMergin.Top+this.ItemNameHeight;var textLeft=left+this.ItemMergin.Left;var x=textLeft;var width=column.Width-this.ItemMergin.Left-this.ItemMergin.Right;var textAlign=column.TextAlign;if(textAlign=='center'){x=textLeft+width/2;this.Canvas.textAlign="center";}else if(textAlign=='right'){x=textLeft+width-2;this.Canvas.textAlign="right";}else{x+=2;this.Canvas.textAlign="left";}var textColor=this.GetNameColor(column,symbol,rowType);var text=name;if(text){this.Canvas.textBaseline="ideographic";this.Canvas.fillStyle=textColor;this.Canvas.font=this.ItemNameFont;text=this.TextEllipsis(text,width,column.MaxText);if(text)this.Canvas.fillText(text,x,y);}text=symbol;if(text){this.Canvas.textBaseline="top";this.Canvas.font=this.ItemSymbolFont;this.Canvas.fillStyle=textColor;this.Canvas.fillText(text,x,y);}this.Canvas.font=this.ItemFont;//还原字体
|
|
12500
12503
|
};this.DrawLimitPriceBorder=function(value,stock,left,top,itemWidth){if(!IFrameSplitOperator.IsNumber(value)||!stock)return;var bDraw=false;if(IFrameSplitOperator.IsNumber(stock.LimitHigh)){if(value>=stock.LimitHigh)bDraw=true;}if(IFrameSplitOperator.IsNumber(stock.LimitLow)){if(value<=stock.LimitLow)bDraw=true;}if(!bDraw)return;var x=left+this.ItemMergin.Left+this.LimitMergin.Left;var width=itemWidth-this.ItemMergin.Left-this.ItemMergin.Right-this.LimitMergin.Left-this.LimitMergin.Right;var y=top+this.ItemMergin.Top+this.LimitMergin.Top;var height=this.RowHeight-this.ItemMergin.Top-this.ItemMergin.Bottom-this.LimitMergin.Top-this.LimitMergin.Bottom;this.Canvas.strokeStyle=this.LimitBorderColor;this.Canvas.strokeRect(ToFixedPoint(x),ToFixedPoint(y),ToFixedRect(width),ToFixedRect(height));};this.GetExtendData=function(data,column){if(IFrameSplitOperator.IsNumber(column.DataIndex)){if(!data.Stock||!data.Stock.ExtendData)return null;if(column.DataIndex<0)return;return data.Stock.ExtendData[column.DataIndex];}if(IFrameSplitOperator.IsNumber(column.BlockIndex)){if(!data.Block)return;if(column.BlockIndex<0)return;return data.Block[column.BlockIndex];}return null;};this.GetCustomStringDrawInfo=function(data,column,drawInfo){var value=this.GetExtendData(data,column);if(column.IsDrawCallback)//外部处理输出格式
|
|
12501
12504
|
{this.GetCustomTextDrawInfo(column,data.Symbol,value,drawInfo,data);return;}if(!IFrameSplitOperator.IsString(value))return;drawInfo.Text=value;};this.GetCustomNumberDrawInfo=function(data,column,drawInfo){var value=this.GetExtendData(data,column);if(column.IsDrawCallback)//外部处理输出格式
|
|
@@ -13200,7 +13203,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
13200
13203
|
this.ExecuteScript(item,data);}this.Status=0;}};this.OnExecuteFinish=function(data,indexInfo,jsExectute,jobInfo){var message={Data:data,IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT,JobInfo:jobInfo};postMessage(message);};this.OnExecuteError=function(error,indexInfo,jobData){var message={IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.ERROR_EXECUTE_SCRIPT,Error:error};postMessage(message);};}/********************************************************************************
|
|
13201
13204
|
* 版本信息输出
|
|
13202
13205
|
*
|
|
13203
|
-
*/var HQCHART_VERSION="1.1.
|
|
13206
|
+
*/var HQCHART_VERSION="1.1.13465";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
|
|
13204
13207
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
13205
13208
|
// BaseIndex:BaseIndex,
|
|
13206
13209
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -2918,6 +2918,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
2918
2918
|
this.DisableMouse=false; //禁止鼠标事件
|
|
2919
2919
|
this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;
|
|
2920
2920
|
this.PressTime=500;
|
|
2921
|
+
this.IsPress=false; //是否长按
|
|
2921
2922
|
|
|
2922
2923
|
this.NetworkFilter; //网络请求回调 function(data, callback);
|
|
2923
2924
|
this.LastMouseStatus={ MouseOnToolbar:null }; // MouseOnToolbar={ Rect:{}, Title: }
|
|
@@ -4471,6 +4472,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4471
4472
|
{
|
|
4472
4473
|
clearTimeout(this.DragTimer);
|
|
4473
4474
|
this.DragTimer=null;
|
|
4475
|
+
this.IsPress=false;
|
|
4474
4476
|
}
|
|
4475
4477
|
}
|
|
4476
4478
|
|
|
@@ -4508,6 +4510,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4508
4510
|
{
|
|
4509
4511
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
4510
4512
|
|
|
4513
|
+
this.IsPress=false;
|
|
4511
4514
|
this.IsOnTouch=true;
|
|
4512
4515
|
this.TouchDrawCount=0;
|
|
4513
4516
|
this.PhonePinch=null;
|
|
@@ -4648,6 +4651,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4648
4651
|
var self=this;
|
|
4649
4652
|
this.DragTimer=setTimeout(function()
|
|
4650
4653
|
{
|
|
4654
|
+
self.IsPress=true;
|
|
4651
4655
|
if (drag.Click.X==drag.LastMove.X && drag.Click.Y==drag.LastMove.Y) //手指没有移动,出现十字光标
|
|
4652
4656
|
{
|
|
4653
4657
|
var mouseDrag=self.MouseDrag;
|
|
@@ -54527,7 +54531,7 @@ function DynamicChartTitlePainting()
|
|
|
54527
54531
|
}
|
|
54528
54532
|
}
|
|
54529
54533
|
|
|
54530
|
-
if (this.NameButtonStyle==1)
|
|
54534
|
+
if (this.Canvas.roundRect && this.NameButtonStyle==1) //判断下是否支持roundRect
|
|
54531
54535
|
{
|
|
54532
54536
|
this.Canvas.beginPath();
|
|
54533
54537
|
this.Canvas.roundRect(ToFixedPoint(rtButton.Left), ToFixedPoint(rtButton.Top), ToFixedRect(rtButton.Width), ToFixedRect(rtButton.Height), [roundRadius]);
|
|
@@ -77817,6 +77821,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
77817
77821
|
if(this.DragMode==0) return;
|
|
77818
77822
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
77819
77823
|
|
|
77824
|
+
this.IsPress=false;
|
|
77820
77825
|
this.IsOnTouch=true;
|
|
77821
77826
|
this.TouchDrawCount=0;
|
|
77822
77827
|
this.PhonePinch=null;
|
|
@@ -77918,6 +77923,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
77918
77923
|
{
|
|
77919
77924
|
this.DragTimer=setTimeout(function()
|
|
77920
77925
|
{
|
|
77926
|
+
self.IsPress=true;
|
|
77921
77927
|
if (drag.Click.X==drag.LastMove.X && drag.Click.Y==drag.LastMove.Y)
|
|
77922
77928
|
{
|
|
77923
77929
|
var mouseDrag=self.MouseDrag;
|
|
@@ -80579,6 +80585,15 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80579
80585
|
return;
|
|
80580
80586
|
}
|
|
80581
80587
|
|
|
80588
|
+
if (this.IsOnTouch==true) //正在操作中不更新数据
|
|
80589
|
+
{
|
|
80590
|
+
if (this.SourceData && IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data))
|
|
80591
|
+
{
|
|
80592
|
+
this.AutoUpdate();
|
|
80593
|
+
return;
|
|
80594
|
+
}
|
|
80595
|
+
}
|
|
80596
|
+
|
|
80582
80597
|
//原始数据
|
|
80583
80598
|
var sourceData=new ChartData();
|
|
80584
80599
|
sourceData.Data=aryMinuteData;
|
|
@@ -83842,6 +83857,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
83842
83857
|
{
|
|
83843
83858
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
83844
83859
|
|
|
83860
|
+
this.IsPress=false;
|
|
83845
83861
|
this.PhonePinch=null;
|
|
83846
83862
|
this.IsOnTouch=true;
|
|
83847
83863
|
this.TouchDrawCount=0;
|
|
@@ -83961,6 +83977,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
83961
83977
|
var self=this;
|
|
83962
83978
|
this.DragTimer=setTimeout(function()
|
|
83963
83979
|
{
|
|
83980
|
+
self.IsPress=false;
|
|
83964
83981
|
if (drag.Click.X==drag.LastMove.X && drag.Click.Y==drag.LastMove.Y) //手指没有移动,出现十字光标
|
|
83965
83982
|
{
|
|
83966
83983
|
var mouseDrag=self.MouseDrag;
|
|
@@ -4332,7 +4332,7 @@ function ChartReport()
|
|
|
4332
4332
|
var rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
4333
4333
|
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
4334
4334
|
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
4335
|
-
this.DrawLine(stock.CloseLine, column, rtItem);
|
|
4335
|
+
if (stock) this.DrawLine(stock.CloseLine, column, rtItem);
|
|
4336
4336
|
}
|
|
4337
4337
|
else if (column.Type==REPORT_COLUMN_ID.KLINE_ID)
|
|
4338
4338
|
{
|
|
@@ -6843,6 +6843,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6843
6843
|
this.DisableMouse=false; //禁止鼠标事件
|
|
6844
6844
|
this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;
|
|
6845
6845
|
this.PressTime=500;
|
|
6846
|
+
this.IsPress=false; //是否长按
|
|
6846
6847
|
|
|
6847
6848
|
this.NetworkFilter; //网络请求回调 function(data, callback);
|
|
6848
6849
|
this.LastMouseStatus={ MouseOnToolbar:null }; // MouseOnToolbar={ Rect:{}, Title: }
|
|
@@ -8396,6 +8397,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8396
8397
|
{
|
|
8397
8398
|
clearTimeout(this.DragTimer);
|
|
8398
8399
|
this.DragTimer=null;
|
|
8400
|
+
this.IsPress=false;
|
|
8399
8401
|
}
|
|
8400
8402
|
}
|
|
8401
8403
|
|
|
@@ -8433,6 +8435,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8433
8435
|
{
|
|
8434
8436
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
8435
8437
|
|
|
8438
|
+
this.IsPress=false;
|
|
8436
8439
|
this.IsOnTouch=true;
|
|
8437
8440
|
this.TouchDrawCount=0;
|
|
8438
8441
|
this.PhonePinch=null;
|
|
@@ -8573,6 +8576,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8573
8576
|
var self=this;
|
|
8574
8577
|
this.DragTimer=setTimeout(function()
|
|
8575
8578
|
{
|
|
8579
|
+
self.IsPress=true;
|
|
8576
8580
|
if (drag.Click.X==drag.LastMove.X && drag.Click.Y==drag.LastMove.Y) //手指没有移动,出现十字光标
|
|
8577
8581
|
{
|
|
8578
8582
|
var mouseDrag=self.MouseDrag;
|
|
@@ -58452,7 +58456,7 @@ function DynamicChartTitlePainting()
|
|
|
58452
58456
|
}
|
|
58453
58457
|
}
|
|
58454
58458
|
|
|
58455
|
-
if (this.NameButtonStyle==1)
|
|
58459
|
+
if (this.Canvas.roundRect && this.NameButtonStyle==1) //判断下是否支持roundRect
|
|
58456
58460
|
{
|
|
58457
58461
|
this.Canvas.beginPath();
|
|
58458
58462
|
this.Canvas.roundRect(ToFixedPoint(rtButton.Left), ToFixedPoint(rtButton.Top), ToFixedRect(rtButton.Width), ToFixedRect(rtButton.Height), [roundRadius]);
|
|
@@ -81742,6 +81746,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81742
81746
|
if(this.DragMode==0) return;
|
|
81743
81747
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
81744
81748
|
|
|
81749
|
+
this.IsPress=false;
|
|
81745
81750
|
this.IsOnTouch=true;
|
|
81746
81751
|
this.TouchDrawCount=0;
|
|
81747
81752
|
this.PhonePinch=null;
|
|
@@ -81843,6 +81848,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81843
81848
|
{
|
|
81844
81849
|
this.DragTimer=setTimeout(function()
|
|
81845
81850
|
{
|
|
81851
|
+
self.IsPress=true;
|
|
81846
81852
|
if (drag.Click.X==drag.LastMove.X && drag.Click.Y==drag.LastMove.Y)
|
|
81847
81853
|
{
|
|
81848
81854
|
var mouseDrag=self.MouseDrag;
|
|
@@ -84504,6 +84510,15 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84504
84510
|
return;
|
|
84505
84511
|
}
|
|
84506
84512
|
|
|
84513
|
+
if (this.IsOnTouch==true) //正在操作中不更新数据
|
|
84514
|
+
{
|
|
84515
|
+
if (this.SourceData && IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data))
|
|
84516
|
+
{
|
|
84517
|
+
this.AutoUpdate();
|
|
84518
|
+
return;
|
|
84519
|
+
}
|
|
84520
|
+
}
|
|
84521
|
+
|
|
84507
84522
|
//原始数据
|
|
84508
84523
|
var sourceData=new ChartData();
|
|
84509
84524
|
sourceData.Data=aryMinuteData;
|
|
@@ -87767,6 +87782,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
87767
87782
|
{
|
|
87768
87783
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
87769
87784
|
|
|
87785
|
+
this.IsPress=false;
|
|
87770
87786
|
this.PhonePinch=null;
|
|
87771
87787
|
this.IsOnTouch=true;
|
|
87772
87788
|
this.TouchDrawCount=0;
|
|
@@ -87886,6 +87902,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
87886
87902
|
var self=this;
|
|
87887
87903
|
this.DragTimer=setTimeout(function()
|
|
87888
87904
|
{
|
|
87905
|
+
self.IsPress=false;
|
|
87889
87906
|
if (drag.Click.X==drag.LastMove.X && drag.Click.Y==drag.LastMove.Y) //手指没有移动,出现十字光标
|
|
87890
87907
|
{
|
|
87891
87908
|
var mouseDrag=self.MouseDrag;
|
|
@@ -129301,7 +129318,7 @@ function ChartReport()
|
|
|
129301
129318
|
var rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
129302
129319
|
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
129303
129320
|
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
129304
|
-
this.DrawLine(stock.CloseLine, column, rtItem);
|
|
129321
|
+
if (stock) this.DrawLine(stock.CloseLine, column, rtItem);
|
|
129305
129322
|
}
|
|
129306
129323
|
else if (column.Type==REPORT_COLUMN_ID.KLINE_ID)
|
|
129307
129324
|
{
|
|
@@ -134295,7 +134312,7 @@ function ScrollBarBGChart()
|
|
|
134295
134312
|
|
|
134296
134313
|
|
|
134297
134314
|
|
|
134298
|
-
var HQCHART_VERSION="1.1.
|
|
134315
|
+
var HQCHART_VERSION="1.1.13465";
|
|
134299
134316
|
|
|
134300
134317
|
function PrintHQChartVersion()
|
|
134301
134318
|
{
|
|
@@ -6887,6 +6887,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6887
6887
|
this.DisableMouse=false; //禁止鼠标事件
|
|
6888
6888
|
this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;
|
|
6889
6889
|
this.PressTime=500;
|
|
6890
|
+
this.IsPress=false; //是否长按
|
|
6890
6891
|
|
|
6891
6892
|
this.NetworkFilter; //网络请求回调 function(data, callback);
|
|
6892
6893
|
this.LastMouseStatus={ MouseOnToolbar:null }; // MouseOnToolbar={ Rect:{}, Title: }
|
|
@@ -8440,6 +8441,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8440
8441
|
{
|
|
8441
8442
|
clearTimeout(this.DragTimer);
|
|
8442
8443
|
this.DragTimer=null;
|
|
8444
|
+
this.IsPress=false;
|
|
8443
8445
|
}
|
|
8444
8446
|
}
|
|
8445
8447
|
|
|
@@ -8477,6 +8479,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8477
8479
|
{
|
|
8478
8480
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
8479
8481
|
|
|
8482
|
+
this.IsPress=false;
|
|
8480
8483
|
this.IsOnTouch=true;
|
|
8481
8484
|
this.TouchDrawCount=0;
|
|
8482
8485
|
this.PhonePinch=null;
|
|
@@ -8617,6 +8620,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8617
8620
|
var self=this;
|
|
8618
8621
|
this.DragTimer=setTimeout(function()
|
|
8619
8622
|
{
|
|
8623
|
+
self.IsPress=true;
|
|
8620
8624
|
if (drag.Click.X==drag.LastMove.X && drag.Click.Y==drag.LastMove.Y) //手指没有移动,出现十字光标
|
|
8621
8625
|
{
|
|
8622
8626
|
var mouseDrag=self.MouseDrag;
|
|
@@ -58496,7 +58500,7 @@ function DynamicChartTitlePainting()
|
|
|
58496
58500
|
}
|
|
58497
58501
|
}
|
|
58498
58502
|
|
|
58499
|
-
if (this.NameButtonStyle==1)
|
|
58503
|
+
if (this.Canvas.roundRect && this.NameButtonStyle==1) //判断下是否支持roundRect
|
|
58500
58504
|
{
|
|
58501
58505
|
this.Canvas.beginPath();
|
|
58502
58506
|
this.Canvas.roundRect(ToFixedPoint(rtButton.Left), ToFixedPoint(rtButton.Top), ToFixedRect(rtButton.Width), ToFixedRect(rtButton.Height), [roundRadius]);
|
|
@@ -81786,6 +81790,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81786
81790
|
if(this.DragMode==0) return;
|
|
81787
81791
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
81788
81792
|
|
|
81793
|
+
this.IsPress=false;
|
|
81789
81794
|
this.IsOnTouch=true;
|
|
81790
81795
|
this.TouchDrawCount=0;
|
|
81791
81796
|
this.PhonePinch=null;
|
|
@@ -81887,6 +81892,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81887
81892
|
{
|
|
81888
81893
|
this.DragTimer=setTimeout(function()
|
|
81889
81894
|
{
|
|
81895
|
+
self.IsPress=true;
|
|
81890
81896
|
if (drag.Click.X==drag.LastMove.X && drag.Click.Y==drag.LastMove.Y)
|
|
81891
81897
|
{
|
|
81892
81898
|
var mouseDrag=self.MouseDrag;
|
|
@@ -84548,6 +84554,15 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84548
84554
|
return;
|
|
84549
84555
|
}
|
|
84550
84556
|
|
|
84557
|
+
if (this.IsOnTouch==true) //正在操作中不更新数据
|
|
84558
|
+
{
|
|
84559
|
+
if (this.SourceData && IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data))
|
|
84560
|
+
{
|
|
84561
|
+
this.AutoUpdate();
|
|
84562
|
+
return;
|
|
84563
|
+
}
|
|
84564
|
+
}
|
|
84565
|
+
|
|
84551
84566
|
//原始数据
|
|
84552
84567
|
var sourceData=new ChartData();
|
|
84553
84568
|
sourceData.Data=aryMinuteData;
|
|
@@ -87811,6 +87826,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
87811
87826
|
{
|
|
87812
87827
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
87813
87828
|
|
|
87829
|
+
this.IsPress=false;
|
|
87814
87830
|
this.PhonePinch=null;
|
|
87815
87831
|
this.IsOnTouch=true;
|
|
87816
87832
|
this.TouchDrawCount=0;
|
|
@@ -87930,6 +87946,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
87930
87946
|
var self=this;
|
|
87931
87947
|
this.DragTimer=setTimeout(function()
|
|
87932
87948
|
{
|
|
87949
|
+
self.IsPress=false;
|
|
87933
87950
|
if (drag.Click.X==drag.LastMove.X && drag.Click.Y==drag.LastMove.Y) //手指没有移动,出现十字光标
|
|
87934
87951
|
{
|
|
87935
87952
|
var mouseDrag=self.MouseDrag;
|
|
@@ -129345,7 +129362,7 @@ function ChartReport()
|
|
|
129345
129362
|
var rtItem={ Left:left, Top:top, Width:column.Width, Height:this.RowHeight };
|
|
129346
129363
|
rtItem.Right=rtItem.Left+rtItem.Width;
|
|
129347
129364
|
rtItem.Bottom=rtItem.Top+rtItem.Height;
|
|
129348
|
-
this.DrawLine(stock.CloseLine, column, rtItem);
|
|
129365
|
+
if (stock) this.DrawLine(stock.CloseLine, column, rtItem);
|
|
129349
129366
|
}
|
|
129350
129367
|
else if (column.Type==REPORT_COLUMN_ID.KLINE_ID)
|
|
129351
129368
|
{
|
|
@@ -138236,7 +138253,7 @@ function HQChartScriptWorker()
|
|
|
138236
138253
|
|
|
138237
138254
|
|
|
138238
138255
|
|
|
138239
|
-
var HQCHART_VERSION="1.1.
|
|
138256
|
+
var HQCHART_VERSION="1.1.13465";
|
|
138240
138257
|
|
|
138241
138258
|
function PrintHQChartVersion()
|
|
138242
138259
|
{
|