hqchart 1.1.14691 → 1.1.14696
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
CHANGED
|
@@ -1541,7 +1541,8 @@ ON_FORMAT_KLINE_FLOAT_TOOLTIP:161,//格式化k线浮动框显示文字
|
|
|
1541
1541
|
ON_FORMAT_KLINE_INFO_FLOAT_TOOLTIP:162,//格式化信息地雷显示文字
|
|
1542
1542
|
SEARCH_DIALOG_ON_CLICK_INDEX:163,//切换指标-指标对话框
|
|
1543
1543
|
ON_CALCULATE_CHIP_DATA:164,//计算筹码数据 (筹码图用)
|
|
1544
|
-
ON_CLICK_DEAL_ROW:165,ON_RCLICK_DEAL_ROW:166,ON_DBCLICK_DEAL_ROW:167,ON_FORMAT_OVERLAY_INDEX_OUT_TEXT:168
|
|
1544
|
+
ON_CLICK_DEAL_ROW:165,ON_RCLICK_DEAL_ROW:166,ON_DBCLICK_DEAL_ROW:167,ON_FORMAT_OVERLAY_INDEX_OUT_TEXT:168,//格式化叠指标标题
|
|
1545
|
+
ON_TOUCH_FAST_SLIDE:169//快速滑动
|
|
1545
1546
|
};var JSCHART_OPERATOR_ID={OP_SCROLL_LEFT:1,//往左移动
|
|
1546
1547
|
OP_SCROLL_RIGHT:2,//往右移动
|
|
1547
1548
|
OP_ZOOM_OUT:3,//缩小
|
|
@@ -1698,6 +1699,7 @@ this.TooltipCache={Type:null,IsShow:false,X:null,Y:null,Data:null,InnerHTML:null
|
|
|
1698
1699
|
this.FrameSplitData=new _map2.default();this.FrameSplitData.set("double",new SplitData());this.FrameSplitData.set("price",new PriceSplitData());//事件回调
|
|
1699
1700
|
this.mapEvent=new _map2.default();//通知外部调用 key:JSCHART_EVENT_ID value:{Callback:回调,}
|
|
1700
1701
|
this.PhonePinch=null;//手机双指操作信息
|
|
1702
|
+
this.TouchDrag=null;//手势拖动操作信息
|
|
1701
1703
|
this.IsOnTouch=false;//是否再操作数据
|
|
1702
1704
|
this.TouchDrawCount=0;//手势绘制次数
|
|
1703
1705
|
this.DisableMouse=false;//禁止鼠标事件
|
|
@@ -1741,6 +1743,7 @@ this.RestoreFocusTimer=null;//恢复焦点定时器
|
|
|
1741
1743
|
this.PreventRightMenu={Timer:null,Enable:false,Delay:2000};//阻止右键菜单
|
|
1742
1744
|
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
1743
1745
|
this.AryHotKey=[];//热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
1746
|
+
this.FastSlideConfig={MinDistance:500,MinSpeed:3,MaxTime:250};//快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
|
|
1744
1747
|
this.RestoreFocus=function(delay){var _this4=this;var value=1000;if(IFrameSplitOperator.IsNumber(delay))value=delay;this.ClearRestoreFocusTimer();this.RestoreFocusTimer=setTimeout(function(){_this4.SetFocus();},value);};this.ClearRestoreFocusTimer=function(){if(this.RestoreFocusTimer){clearTimeout(this.RestoreFocusTimer);this.RestoreFocusTimer=null;}};this.GetVolUnit=function()//成交量单位
|
|
1745
1748
|
{var upperSymbol=this.Symbol?this.Symbol.toUpperCase():null;var unit=MARKET_SUFFIX_NAME.GetVolUnit(upperSymbol);return unit;};this.ClearStockCache=function(){this.StockCache.Data=null;this.BuySellData.AryBuy=null;this.BuySellData.ArySell=null;};this.InitalPopMenu=function()//初始化弹出窗口
|
|
1746
1749
|
{if(this.JSPopMenu)return;this.JSPopMenu=new JSPopMenu();//内置菜单
|
|
@@ -1874,11 +1877,11 @@ for(var i=0;i<e.touches.length;++i){var item=e.touches[i];if(isForceLandscape){t
|
|
|
1874
1877
|
{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)//计算角度
|
|
1875
1878
|
{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;};//手机拖拽
|
|
1876
1879
|
uielement.ontouchstart=function(e){_this6.OnTouchStart(e);};uielement.ontouchmove=function(e){_this6.OnTouchMove(e);};uielement.ontouchend=function(e){_this6.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.TryPhoneClickButton=function(x,y,e){if(this.TryClickLock||this.TryClickIndexTitle)//指标枷锁区域 , 指标标题点击
|
|
1877
|
-
{if(this.TryClickLock&&this.TryClickLock(x,y))return true;if(this.TryClickIndexTitle&&this.TryClickIndexTitle(x,y))return true;}if(this.ClickFrameButton){var button=this.Frame.PtInButtons(x,y);if(button){this.ClickFrameButton(button,e);return true;}}button=this.PtInExtendChartButtons(x,y);if(button&&this.ClickExtendChartButton){this.ClickExtendChartButton(button,e);return true;}return false;};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||//多点触屏
|
|
1880
|
+
{if(this.TryClickLock&&this.TryClickLock(x,y))return true;if(this.TryClickIndexTitle&&this.TryClickIndexTitle(x,y))return true;}if(this.ClickFrameButton){var button=this.Frame.PtInButtons(x,y);if(button){this.ClickFrameButton(button,e);return true;}}button=this.PtInExtendChartButtons(x,y);if(button&&this.ClickExtendChartButton){this.ClickExtendChartButton(button,e);return true;}return false;};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.TouchDrag=null;this.StopDragTimer();var isSingleTouch=this.IsSingleTouch(e);if(this.EnableScrollUpDown==false||!isSingleTouch||//多点触屏
|
|
1878
1881
|
this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID&&this.TouchStatus.CorssCursorShow==true)//十字光标显示,不能滚动页面
|
|
1879
|
-
{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.TryPhoneClickButton(pt.X,pt.Y,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={
|
|
1880
|
-
};//var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
1881
|
-
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;var drawPictureActive=this.GetActiveDrawPicture();//上一次选中的
|
|
1882
|
+
{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.TryPhoneClickButton(pt.X,pt.Y,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:{},StartTime:Date.now()};//LastMove 最后移动的位置
|
|
1883
|
+
var touchDrag={Click:{},LastMove:{},StartTime:Date.now()};//var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
1884
|
+
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;touchDrag.Click.X=touches[0].clientX;touchDrag.Click.Y=touches[0].clientY;touchDrag.LastMove.X=touches[0].clientX;touchDrag.LastMove.Y=touches[0].clientY;this.TouchDrag=touchDrag;var drawPictureActive=this.GetActiveDrawPicture();//上一次选中的
|
|
1882
1885
|
var selectedChart={Chart:this.SelectedChart.Selected.Chart,Identify:this.SelectedChart.Selected.Identify};//上一次选中的图形
|
|
1883
1886
|
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;var isDrawPictrue=false;if(this.CurrentChartDrawPicture)//画图工具模式
|
|
1884
1887
|
{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个点 直接完成
|
|
@@ -1890,7 +1893,7 @@ var self=this;this.DragTimer=setTimeout(function(){self.IsPress=true;if(drag.Cli
|
|
|
1890
1893
|
if(self.EnableClickModel===true)self.ClickModel.IsShowCorssCursor=true;self.MoveCorssCursor(drag.Click,e);//移动十字光标
|
|
1891
1894
|
}},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)
|
|
1892
1895
|
}else if(this.VerticalDrag){if(!this.VerticalDrag.IsDrag)this.MoveCorssCursor(drag.Click,e);//没有点击X轴, 就显示十字光标
|
|
1893
|
-
}else if(this.IsClickShowCorssCursor){this.MoveCorssCursor(drag.Click,e);}this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchStart"},e);var drawType=0;if(drawPictureActive.Select.Guid!=null){if(drawPictureActive.Select.Guid&&drawPictureActive.Select.Chart)drawType=1;}if(drawType==1)this.Draw();}else if(this.IsPhonePinching(e)){var phonePinch={
|
|
1896
|
+
}else if(this.IsClickShowCorssCursor){this.MoveCorssCursor(drag.Click,e);}this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchStart"},e);var drawType=0;if(drawPictureActive.Select.Guid!=null){if(drawPictureActive.Select.Guid&&drawPictureActive.Select.Chart)drawType=1;}if(drawType==1)this.Draw();}else if(this.IsPhonePinching(e)){var phonePinch={Start:{},Last:{},StartTime:Date.now()};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){if(this.IsForceLandscape)y=uielement.getBoundingClientRect().width-touches[0].clientY;//强制横屏Y计算
|
|
1894
1897
|
if(!this.ChartDrawOption.IsLockScreen)this.MoveCorssCursor({X:touches[0].clientX,Y:touches[0].clientY},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);var isMoveCorssCursor=this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID&&this.TouchStatus.CorssCursorShow==true;//是否移动十字光标
|
|
1895
1898
|
if(this.VerticalDrag){if(this.VerticalDrag.IsDrag===true)isMoveCorssCursor=false;else isMoveCorssCursor=true;}if(this.EnableClickModel){if(this.ClickModel.IsShowCorssCursor===true)isMoveCorssCursor=true;else isMoveCorssCursor=false;}//JSConsole.Chart.Log(`[JSChartContainer::OnTouchMove] moveAngle=${moveAngle} , moveUpDown=${moveUpDown}, moveSetp=${moveSetp}`);
|
|
1896
1899
|
if(this.CurrentChartDrawPicture&&this.CurrentChartDrawPicture.EnableMove===true){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)//画图工具移动
|
|
@@ -1898,11 +1901,11 @@ if(this.CurrentChartDrawPicture&&this.CurrentChartDrawPicture.EnableMove===true)
|
|
|
1898
1901
|
{var mouseDrag=this.MouseDrag;this.MouseDrag=null;this.MoveCorssCursor(drag.Click,e);//移动十字光标
|
|
1899
1902
|
}else if(this.DragMode==1||isMoveCorssCursor==false)//数据左右拖拽
|
|
1900
1903
|
{if((moveUpDown>0&&moveSetp<=3||moveAngle<=this.TouchMoveMinAngle)&&this.EnableScrollUpDown==true){this.StopDragTimer();return;}if(moveSetp<5||moveAngle<=this.TouchMoveMinAngle){this.PreventTouchEvent(e);return;}if(this.EnableVerticalDrag){if(!this.VerticalDrag)return;if(!this.VerticalDrag.IsDrag)return;}var isLeft=true;if(drag.LastMove.X<touches[0].clientX)isLeft=false;//右移数据
|
|
1901
|
-
var oneStepWidth=this.GetMoveOneStepWidth();if(moveSetp<oneStepWidth)return;if(this.DataMove(moveSetp,isLeft)){this.UpdataDataoffset();this.UpdatePointByCursorIndex();this.UpdateFrameMaxMin();this.ResetFrameXYSplit();this.Draw();this.OnKLinePageChange("OnTouchMove");}else{if(this.DragDownloadData)this.DragDownloadData();}drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;}}if(this.PhoneTouchInfo){this.PhoneTouchInfo.End.X=touches[0].clientX;this.PhoneTouchInfo.End.Y=touches[0].clientY;}}else if(this.IsPhonePinching(e)){if(this.DragMode==JSCHART_DRAG_ID.DISABLE_DRAG_ID)return;this.PreventTouchEvent(e);var phonePinch=this.PhonePinch;if(!phonePinch)return;phonePinch.Operator=null;if(this.EnableZoomUpDown&&this.EnableZoomUpDown.Touch===false)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(yStep)<minStep&&Math.abs(xStep)<minStep)return;var step=yStep;if(Math.abs(yStep)<minStep)step=xStep;if(step>0)//放大
|
|
1904
|
+
var oneStepWidth=this.GetMoveOneStepWidth();if(moveSetp<oneStepWidth)return;if(this.DataMove(moveSetp,isLeft)){this.UpdataDataoffset();this.UpdatePointByCursorIndex();this.UpdateFrameMaxMin();this.ResetFrameXYSplit();this.Draw();this.OnKLinePageChange("OnTouchMove");}else{if(this.DragDownloadData)this.DragDownloadData();}drag.LastMove.X=touches[0].clientX;drag.LastMove.Y=touches[0].clientY;}}if(this.PhoneTouchInfo){this.PhoneTouchInfo.End.X=touches[0].clientX;this.PhoneTouchInfo.End.Y=touches[0].clientY;}if(this.TouchDrag){var touchDrag=this.TouchDrag;touchDrag.LastMove.X=touches[0].clientX;touchDrag.LastMove.Y=touches[0].clientY;}}else if(this.IsPhonePinching(e)){if(this.DragMode==JSCHART_DRAG_ID.DISABLE_DRAG_ID)return;this.PreventTouchEvent(e);var phonePinch=this.PhonePinch;if(!phonePinch)return;phonePinch.Operator=null;if(this.EnableZoomUpDown&&this.EnableZoomUpDown.Touch===false)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(yStep)<minStep&&Math.abs(xStep)<minStep)return;var step=yStep;if(Math.abs(yStep)<minStep)step=xStep;if(step>0)//放大
|
|
1902
1905
|
{var cursorIndex={IsLockRight:this.IsZoomLockRight};cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));if(!this.Frame.ZoomUp(cursorIndex))return;phonePinch.Operator="ZoomUp";this.CursorIndex=cursorIndex.Index;this.UpdatePointByCursorIndex();this.UpdataDataoffset();this.UpdateFrameMaxMin();//this.ResetFrameXSplit();
|
|
1903
1906
|
this.Draw();this.ShowTooltipByKeyDown();this.StopDragTimer();}else//缩小
|
|
1904
1907
|
{var cursorIndex={IsLockRight:this.IsZoomLockRight};cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));if(!this.Frame.ZoomDown(cursorIndex))return;phonePinch.Operator="ZoomDown";this.CursorIndex=cursorIndex.Index;this.UpdataDataoffset();this.UpdatePointByCursorIndex();this.UpdateFrameMaxMin();//this.ResetFrameXSplit();
|
|
1905
|
-
this.Draw();this.ShowTooltipByKeyDown();this.StopDragTimer();}phonePinch.Last={X:touches[0].pageX,Y:touches[0].pageY,X2:touches[1].pageX,Y2:touches[1].pageY};}this.PreventTouchEvent(e);};this.OnTouchEnd=function(e){JSConsole.Chart.Log('[KLineChartContainer:OnTouchEnd]',e);if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var bClearDrawPicture=true;if(this.CurrentChartDrawPicture){var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==2||drawPicture.Status==1||drawPicture.Status==3){drawPicture.PointStatus=drawPicture.Status;if(this.FinishChartDrawPicturePoint())this.DrawDynamicInfo();else bClearDrawPicture=false;}else if(drawPicture.Status==20){if(this.FinishMoveChartDrawPicture())this.DrawDynamicInfo();}}if(this.EnableZoomIndexWindow){var time=Date.now();this.PhoneDBClick.AddTouchEnd(time);if(this.PhoneDBClick.IsVaildDBClick()){this.OnTouchDBClick(this.PhoneDBClick.Start);this.PhoneDBClick.Clear();}}this.IsOnTouch=false;this.VerticalDrag=null;if(bClearDrawPicture===true)this.CurrentChartDrawPicture=null;this.StopDragTimer();this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchEnd"},e);this.OnTouchFinished();this.TouchDrawCount=0;this.PhonePinch=null;};this.OnTouchDBClick=function(points){var pt=this.PointAbsoluteToRelative(points[0].X,points[0].Y,true);var x=pt.X,y=pt.Y;JSConsole.Chart.Log('[KLineChartContainer:OnTouchDBClick] Phone dbclick absolute ['+x+','+y+'], soruce ['+points[0].X+','+points[0].Y+']');var frameId=this.Frame.PtInFrame(x,y);JSConsole.Chart.Log("[KLineChartContainer::OnTouchDBClick] frameId",frameId);if(frameId>=this.Frame.ZoomStartWindowIndex){if(this.ZoomIndexWindow(frameId,{X:x,Y:y})){this.Frame.SetSizeChage(true);this.Draw();return true;}}};//手势事件
|
|
1908
|
+
this.Draw();this.ShowTooltipByKeyDown();this.StopDragTimer();}phonePinch.Last={X:touches[0].pageX,Y:touches[0].pageY,X2:touches[1].pageX,Y2:touches[1].pageY};}this.PreventTouchEvent(e);};this.OnTouchEnd=function(e){JSConsole.Chart.Log('[KLineChartContainer:OnTouchEnd]',e);if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.FastSlideEvent();var bClearDrawPicture=true;if(this.CurrentChartDrawPicture){var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==2||drawPicture.Status==1||drawPicture.Status==3){drawPicture.PointStatus=drawPicture.Status;if(this.FinishChartDrawPicturePoint())this.DrawDynamicInfo();else bClearDrawPicture=false;}else if(drawPicture.Status==20){if(this.FinishMoveChartDrawPicture())this.DrawDynamicInfo();}}if(this.EnableZoomIndexWindow){var time=Date.now();this.PhoneDBClick.AddTouchEnd(time);if(this.PhoneDBClick.IsVaildDBClick()){this.OnTouchDBClick(this.PhoneDBClick.Start);this.PhoneDBClick.Clear();}}this.IsOnTouch=false;this.VerticalDrag=null;if(bClearDrawPicture===true)this.CurrentChartDrawPicture=null;this.StopDragTimer();this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchEnd"},e);this.OnTouchFinished();this.TouchDrawCount=0;this.PhonePinch=null;this.TouchDrag=null;};this.OnTouchDBClick=function(points){var pt=this.PointAbsoluteToRelative(points[0].X,points[0].Y,true);var x=pt.X,y=pt.Y;JSConsole.Chart.Log('[KLineChartContainer:OnTouchDBClick] Phone dbclick absolute ['+x+','+y+'], soruce ['+points[0].X+','+points[0].Y+']');var frameId=this.Frame.PtInFrame(x,y);JSConsole.Chart.Log("[KLineChartContainer::OnTouchDBClick] frameId",frameId);if(frameId>=this.Frame.ZoomStartWindowIndex){if(this.ZoomIndexWindow(frameId,{X:x,Y:y})){this.Frame.SetSizeChage(true);this.Draw();return true;}}};//手势事件
|
|
1906
1909
|
this.TouchEvent=function(obj,e){var eventID=obj.EventID;var event=this.GetEventCallback(eventID);if(!event||!event.Callback)return false;var drag=this.PhoneTouchInfo;if(!drag||!drag.Start||!drag.End)return false;var pixelTatio=GetDevicePixelRatio();var clientX=drag.End.X/pixelTatio;var clientY=drag.End.Y/pixelTatio;var x=drag.End.X-this.UIElement.getBoundingClientRect().left*pixelTatio;var y=drag.End.Y-this.UIElement.getBoundingClientRect().top*pixelTatio;var data={X:clientX,Y:clientY,FrameID:-1,FunctionName:obj.FunctionName,Drag:{Start:{X:drag.Start.X/pixelTatio,Y:drag.Start.Y/pixelTatio},End:{X:drag.End.X/pixelTatio,Y:drag.End.Y/pixelTatio}}};var isInClient=false;this.Canvas.beginPath();this.Canvas.rect(this.Frame.ChartBorder.GetLeft(),this.Frame.ChartBorder.GetTop(),this.Frame.ChartBorder.GetWidth(),this.Frame.ChartBorder.GetHeight());isInClient=this.Canvas.isPointInPath(x,y);if(isInClient){if(this.Frame&&this.Frame.IsHScreen){var yValueExtend={};var yValue=this.Frame.GetYData(x,yValueExtend);if(IFrameSplitOperator.IsNumber(yValueExtend.FrameID)&&yValueExtend.FrameID>=0){var xValue=this.Frame.GetXData(y);data.FrameID=yValueExtend.FrameID;data.Data={X:xValue,Y:yValue};}}else{var yValueExtend={};var yValue=this.Frame.GetYData(y,yValueExtend);if(IFrameSplitOperator.IsNumber(yValueExtend.FrameID)&&yValueExtend.FrameID>=0){var xValue=this.Frame.GetXData(x);data.FrameID=yValueExtend.FrameID;data.Data={X:xValue,Y:yValue};}}}event.Callback(event,data,this);return true;};this.MoveCorssCursor=function(point,e){var pixelTatio=GetDevicePixelRatio();var x=point.X-this.UIElement.getBoundingClientRect().left*pixelTatio;var y=point.Y-this.UIElement.getBoundingClientRect().top*pixelTatio;if(this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID)this.TouchStatus.CorssCursorShow=true;//十字显示
|
|
1907
1910
|
this.OnMouseMove(x,y,e,true);};this.DrawEmpty=function(){if(this.UIElement.width<=0||this.UIElement.height<=0)return;this.Canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height);if(this.Frame){this.Frame.ScreenImageData=null;this.Frame.Draw();}};this.PtInChart=function(x,y){var result=null;for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];if(!item.PtInChart)continue;if(item.IsHideScriptIndex())continue;result=item.PtInChart(x,y);if(result)return result;}for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];if(!item.PtInChart)continue;result=item.PtInChart(x,y);if(result)return result;}if(this.Frame.PtInOveralyChart){result=this.Frame.PtInOveralyChart(x,y);if(result)return result;}return null;};//绘制选中图形的状态
|
|
1908
1911
|
this.DrawSelectedStatus=function(){if(!this.SelectedChart.MoveOn.Identify&&!this.SelectedChart.Selected.Identify)return;for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];if(!item.Identify)continue;if(item.Identify!=this.SelectedChart.MoveOn.Identify&&item.Identify!=this.SelectedChart.Selected.Identify)continue;if(item.DrawSelectedStatus)item.DrawSelectedStatus();}for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];if(!item.Identify)continue;if(item.Identify!=this.SelectedChart.MoveOn.Identify&&item.Identify!=this.SelectedChart.Selected.Identify)continue;if(item.DrawSelectedStatus)item.DrawSelectedStatus();}for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];if(!item.Identify)continue;if(item.Identify!=this.SelectedChart.MoveOn.Identify&&item.Identify!=this.SelectedChart.Selected.Identify)continue;if(item.DrawSelectedStatus)item.DrawSelectedStatus();}if(this.Frame.DrawOveralySelectedStatus)this.Frame.DrawOveralySelectedStatus(this.SelectedChart);};this.SetCanvas=function(canvas){if(this.Frame){var subFrame=this.Frame.SubFrame;for(var i=0;i<subFrame.length;++i){var item=subFrame[i];item.Frame.Canvas=canvas;//框架
|
|
@@ -2373,7 +2376,8 @@ AryMenu:aryMenu,Command:command,e:e,PreventDefault:false};if(bMinuteChart)sendDa
|
|
|
2373
2376
|
event.Callback(event,sendData,this);aryMenu=sendData.AryMenu;command=sendData.Command;if(sendData.PreventDefault){this.Draw();return;}}if(command){this.ExecuteMenuCommand(command.ID,command.Args);}else if(aryMenu){this.PopupSelectRectMenuV3(aryMenu,data,e);}this.Draw();}};this.MoveCorssCursorUp=function(step){if(!IFrameSplitOperator.IsNumber(this.LastPoint.Y))return;var border=this.Frame.ChartBorder.GetBorder();var top=border.TopEx;if(this.LastPoint.Y-step<=top)return;this.LastPoint.Y-=step;this.DrawDynamicInfo();};this.MoveCorssCursorDown=function(step){if(!IFrameSplitOperator.IsNumber(this.LastPoint.Y))return;var border=this.Frame.ChartBorder.GetBorder();var border=this.Frame.ChartBorder.GetBorder();var bottom=border.BottomEx;if(this.LastPoint.Y+step>=bottom)return;this.LastPoint.Y+=step;this.DrawDynamicInfo();};//整屏区间统计
|
|
2374
2377
|
this.FullScreenSummary=function(){var kData=this.GetKData();if(!kData||!IFrameSplitOperator.IsNonEmptyArray(kData.Data))return false;var paint=this.GetRectSelectPaint();if(!paint)return false;var xPointcount=0;if(this.Frame.XPointCount)xPointcount=this.Frame.XPointCount;else xPointcount=this.Frame.SubFrame[0].Frame.XPointCount;if(!IFrameSplitOperator.IsPlusNumber(xPointcount))return false;var startIndex=kData.DataOffset;var endIndex=startIndex+xPointcount;this.UpdateSelectRect(startIndex,endIndex);var selectData=paint.GetSelectRectData();var border=this.Frame.SubFrame[0].Frame.GetBorder();var data={X:border.ChartWidth/2,Y:border.ChartHeight/2,SelectData:selectData,//区间选择的数据
|
|
2375
2378
|
RectSelectPaint:paint//区间选择背景
|
|
2376
|
-
};var e={data:data};if(this.DialogSelectRect)this.DrawSelectRectDialog(e);return true;}
|
|
2379
|
+
};var e={data:data};if(this.DialogSelectRect)this.DrawSelectRectDialog(e);return true;};//快速滑动
|
|
2380
|
+
this.FastSlideEvent=function(){if(!this.TouchDrag)return false;if(!this.FastSlideConfig)return false;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_TOUCH_FAST_SLIDE);if(!event||!event.Callback)return false;var config=this.FastSlideConfig;var drag=this.TouchDrag;var time=Date.now();var spanTime=time-drag.StartTime;if(spanTime>config.MaxTime)return false;if(!drag.Click||!drag.LastMove)return false;var xStart=drag.Click.X;var xEnd=drag.LastMove.X;if(!IFrameSplitOperator.IsNumber(xStart)||!IFrameSplitOperator.IsNumber(xEnd))return false;var distance=xEnd-xStart;var speed=Math.abs(distance)/spanTime;JSConsole.Chart.Log('[JSChartContainer:FastSlideEvent] speed='+speed+', distance='+distance+', spanTime='+spanTime);if(Math.abs(distance)<config.MinDistance)return false;if(speed<config.MinSpeed)return false;var sendData={Speed:speed,Distance:distance,IsLeft:distance<0?true:false};event.Callback(event,sendData,this);return true;};}function GetDevicePixelRatio(){if(typeof window=='undefined')return 1;return window.devicePixelRatio||1;}function GetFontHeight(context,font,word){if(!context)return null;if(font)context.font=font;var text='擎';if(IFrameSplitOperator.IsString(word))text=word;var fontInfo=context.measureText(text);var textHeight=fontInfo.fontBoundingBoxAscent+fontInfo.fontBoundingBoxDescent;if(!IFrameSplitOperator.IsNumber(textHeight))textHeight=fontInfo.width+2*GetDevicePixelRatio();return textHeight;}function IsPhoneWeb(){var userAgentInfo=navigator.userAgent;var Agents=new Array("Android","iPhone","SymbianOS","Windows Phone","iPad","iPod");for(var v=0;v<Agents.length;v++){if(userAgentInfo.indexOf(Agents[v])>0)return true;}return false;}function OnKeyDown(e)//键盘事件
|
|
2377
2381
|
{if(this.JSChartContainer&&this.JSChartContainer.OnKeyDown)this.JSChartContainer.OnKeyDown(e);}function OnWheel(e)//上下滚动事件
|
|
2378
2382
|
{if(this.JSChartContainer&&this.JSChartContainer.OnWheel)this.JSChartContainer.OnWheel(e);}function ToFixed(number,precision){var b=1;if(isNaN(number))return number;if(number<0)b=-1;var multiplier=Math.pow(10,precision);var value=Math.round(Math.abs(number)*multiplier)/multiplier*b;if(/^(\d+(?:\.\d+)?)(e)([\-]?\d+)$/.test(value))var s=value.toFixed2(precision);else var s=value.toString();var rs=s.indexOf('.');if(rs<0&&precision>0){rs=s.length;s+='.';}while(s.length<=rs+precision){s+='0';}return s;}function IsRectOverlap(rt,rt2){if(Math.max(rt.Left,rt2.Left)<Math.min(rt.Right,rt2.Right)&&Math.max(rt.Top,rt2.Top)<Math.min(rt.Bottom,rt2.Bottom))return true;return false;}//获取文字高度和宽度
|
|
2379
2383
|
function GetTextSize(canvas,text,option){var data=canvas.measureText(text);var height=Math.abs(Math.abs(data.fontBoundingBoxAscent)+Math.abs(data.fontBoundingBoxDescent));var textBaseline=canvas.textBaseline;if(textBaseline=="top")height=data.fontBoundingBoxDescent;else if(textBaseline=="bottom")height=data.fontBoundingBoxAscent;var result={Width:data.width,Height:height};return result;}Number.prototype.toFixed2=Number.prototype.toFixed;//备份下老的
|
|
@@ -8513,26 +8517,26 @@ this.PtInClient_V2=function(x,y){this.Canvas.beginPath();if(this.Frame.IsHScreen
|
|
|
8513
8517
|
{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;//盘前
|
|
8514
8518
|
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;//盘后
|
|
8515
8519
|
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;};//手势
|
|
8516
|
-
this.OnTouchStart=function(e){var _this28=this;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();//上下拖动图形不能阻止事件
|
|
8517
|
-
if(this.IsPhoneDragging(e)){var drag={Click:{},LastMove:{}};//LastMove=最后移动的位置
|
|
8518
|
-
var touches=this.GetToucheData(e,this.IsForceLandscape);var pt=this.PointAbsoluteToRelative(touches[0].clientX,touches[0].clientY,true);if(this.TryClickLock||this.TryClickIndexTitle)//指标枷锁区域 , 指标标题点击
|
|
8519
|
-
{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_开头
|
|
8520
|
+
this.OnTouchStart=function(e){var _this28=this;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.TouchDrag=null;this.StopDragTimer();if(this.EnableScrollUpDown==false)e.preventDefault();//上下拖动图形不能阻止事件
|
|
8521
|
+
if(this.IsPhoneDragging(e)){var drag={Click:{},LastMove:{},StartTime:Date.now()};//LastMove=最后移动的位置 StartTime=开始时间
|
|
8522
|
+
var touchDrag={Click:{},LastMove:{},StartTime:Date.now()};var touches=this.GetToucheData(e,this.IsForceLandscape);var pt=this.PointAbsoluteToRelative(touches[0].clientX,touches[0].clientY,true);if(this.TryClickLock||this.TryClickIndexTitle)//指标枷锁区域 , 指标标题点击
|
|
8523
|
+
{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;touchDrag.Click.X=touches[0].clientX;touchDrag.Click.Y=touches[0].clientY;touchDrag.LastMove.X=touches[0].clientX;touchDrag.LastMove.Y=touches[0].clientY;var self=this;var T_ShowCorssCursor=function T_ShowCorssCursor()//临时函数(Temp_) T_开头
|
|
8520
8524
|
{if(self.ChartCorssCursor.IsShow===true)//移动十字光标
|
|
8521
8525
|
{var pt=self.PointAbsoluteToRelative(drag.Click.X,drag.Click.Y,true);var x=pt.X;var y=pt.Y;self.OnMouseMove(x,y,e);}};if(this.ChartDrawOption.IsLockScreen){this.MouseDrag=drag;if(this.SelectChartDrawPicture)this.SelectChartDrawPicture.IsSelected=false;this.SelectChartDrawPicture=null;if(this.CurrentChartDrawPicture)//画图工具模式
|
|
8522
8526
|
{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个点 直接完成
|
|
8523
8527
|
if(this.FinishChartDrawPicturePoint())this.DrawDynamicInfo({Corss:false,Tooltip:false});}if(e.cancelable)e.preventDefault();return;}else{var drawPictrueData={};var pixelTatio=GetDevicePixelRatio();//鼠标移动坐标是原始坐标 需要乘以放大倍速
|
|
8524
8528
|
drawPictrueData.X=touches[0].clientX-uielement.getBoundingClientRect().left;drawPictrueData.Y=touches[0].clientY-uielement.getBoundingClientRect().top;if(this.GetChartDrawPictureByPoint(drawPictrueData)){if(drawPictrueData.ChartDrawPicture.EnableMove==true)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);//选中画图工具事件
|
|
8525
|
-
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;var bStartTimer=true;//长按计时开始
|
|
8529
|
+
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.TouchDrag=touchDrag;this.PhoneTouchInfo={Start:{X:touches[0].clientX,Y:touches[0].clientY},End:{X:touches[0].clientX,Y:touches[0].clientY}};this.SelectChartDrawPicture=null;var bStartTimer=true;//长按计时开始
|
|
8526
8530
|
if(this.EnableClickModel){if(this.ClickModel.IsShowCorssCursor==true)bStartTimer=false;else bStartTimer=true;}if(bStartTimer){this.StopDragTimer();this.DragTimer=setTimeout(function(){_this28.IsPress=true;if(drag.Click.X==drag.LastMove.X&&drag.Click.Y==drag.LastMove.Y)//手指没有移动,出现十字光标
|
|
8527
8531
|
{_this28.MouseDrag=null;//移动十字光标
|
|
8528
8532
|
var x=drag.Click.X;var y=drag.Click.Y;if(_this28.EnableClickModel===true)_this28.ClickModel.IsShowCorssCursor=true;self.MoveCorssCursor(drag.Click,e);//移动十字光标
|
|
8529
8533
|
}},this.PressTime);}else if(!this.EnableClickModel){if(this.EnableScrollUpDown==false)T_ShowCorssCursor();//移动十字光标
|
|
8530
|
-
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={
|
|
8534
|
+
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:{},StartTime:Date.now()};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&&this.CurrentChartDrawPicture.EnableMove===true){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)//画图工具移动
|
|
8531
8535
|
{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 if(this.EnableClickModel&&this.ClickModel.IsShowCorssCursor===false){//点击模式 十字光标隐藏 不做任何操作
|
|
8532
8536
|
}else{//上下滚动
|
|
8533
|
-
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);//十字光标出来了,阻止消息
|
|
8537
|
+
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;}if(this.TouchDrag){var touchDrag=this.TouchDrag;touchDrag.LastMove.X=touches[0].clientX;touchDrag.LastMove.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);//十字光标出来了,阻止消息
|
|
8534
8538
|
}else{this.StopDragTimer();//上下推动图片,停止定时器,消息传递下去
|
|
8535
|
-
}}};this.OnTouchEnd=function(e){JSConsole.Chart.Log('[MinuteChartContainer::OnTouchEnd]',e);if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var bClearDrawPicture=true;if(this.CurrentChartDrawPicture){var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==2||drawPicture.Status==1||drawPicture.Status==3){drawPicture.PointStatus=drawPicture.Status;if(this.FinishChartDrawPicturePoint())this.DrawDynamicInfo();else bClearDrawPicture=false;}else if(drawPicture.Status==20){if(this.FinishMoveChartDrawPicture())this.DrawDynamicInfo();}}if(this.EnableZoomIndexWindow){var time=Date.now();this.PhoneDBClick.AddTouchEnd(time);if(this.PhoneDBClick.IsVaildDBClick()){this.OnTouchDBClick(this.PhoneDBClick.Start);this.PhoneDBClick.Clear();}}this.IsOnTouch=false;this.StopDragTimer();this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchEnd"},e);this.OnTouchFinished();this.TouchDrawCount=0;};//键盘左右移动十字光标
|
|
8539
|
+
}}};this.OnTouchEnd=function(e){JSConsole.Chart.Log('[MinuteChartContainer::OnTouchEnd]',e);if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.FastSlideEvent();var bClearDrawPicture=true;if(this.CurrentChartDrawPicture){var drawPicture=this.CurrentChartDrawPicture;if(drawPicture.Status==2||drawPicture.Status==1||drawPicture.Status==3){drawPicture.PointStatus=drawPicture.Status;if(this.FinishChartDrawPicturePoint())this.DrawDynamicInfo();else bClearDrawPicture=false;}else if(drawPicture.Status==20){if(this.FinishMoveChartDrawPicture())this.DrawDynamicInfo();}}if(this.EnableZoomIndexWindow){var time=Date.now();this.PhoneDBClick.AddTouchEnd(time);if(this.PhoneDBClick.IsVaildDBClick()){this.OnTouchDBClick(this.PhoneDBClick.Start);this.PhoneDBClick.Clear();}}this.IsOnTouch=false;this.StopDragTimer();this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchEnd"},e);this.OnTouchFinished();this.TouchDrawCount=0;this.TouchDrag=null;};//键盘左右移动十字光标
|
|
8536
8540
|
this.OnKeyDown=function(e){this.StopDisplayLatest();if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var keyID=e.keyCode?e.keyCode:e.which;//回调事件
|
|
8537
8541
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_KEYDOWN);if(event&&event.Callback){var sendData={e:e,KeyID:keyID,PreventDefault:false};event.Callback(event,sendData,this);if(sendData.PreventDefault)return;}var draw=false;if(this.ChartCorssCursor&&this.ChartCorssCursor.OnKeyDown)//十字光标 隐藏显示
|
|
8538
8542
|
{var sendData={e:e,KeyID:keyID,Draw:false,PreventDefault:false};this.ChartCorssCursor.OnKeyDown(sendData);draw=sendData.Draw;}if(this.OnHotKeyDown(keyID,e)){//不让滚动条滚动
|
|
@@ -9168,7 +9172,7 @@ this.OnTouchStart=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.Is
|
|
|
9168
9172
|
return;
|
|
9169
9173
|
}
|
|
9170
9174
|
}
|
|
9171
|
-
*/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=最后移动的位置
|
|
9175
|
+
*/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:{},StartTime:Date.now()};//LastMove=最后移动的位置
|
|
9172
9176
|
//var touches=this.GetToucheData(e,false);
|
|
9173
9177
|
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)//画图工具模式
|
|
9174
9178
|
{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个点 直接完成
|
|
@@ -9178,7 +9182,7 @@ if(event&&event.Callback){var sendData={DrawPicture:drawPictrueData.ChartDrawPic
|
|
|
9178
9182
|
{var self=this;this.DragTimer=setTimeout(function(){self.IsPress=false;if(drag.Click.X==drag.LastMove.X&&drag.Click.Y==drag.LastMove.Y)//手指没有移动,出现十字光标
|
|
9179
9183
|
{var mouseDrag=self.MouseDrag;self.MouseDrag=null;self.MoveCorssCursor(drag.Click,e);//移动十字光标
|
|
9180
9184
|
}},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轴, 就显示十字光标
|
|
9181
|
-
}else if(this.IsClickShowCorssCursor){this.MoveCorssCursor(drag.Click,e);}}else if(this.IsPhonePinching(e)){var phonePinch={
|
|
9185
|
+
}else if(this.IsClickShowCorssCursor){this.MoveCorssCursor(drag.Click,e);}}else if(this.IsPhonePinching(e)){var phonePinch={Start:{},Last:{},StartTime:Date.now()};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; //锁屏禁止缩放
|
|
9182
9186
|
}this.TouchEvent({EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH,FunctionName:"OnTouchStart"},e);};this.OnTouchMove=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;if(e.cancelable)e.preventDefault();var touches=this.GetToucheData(e,false);if(this.IsPhoneDragging(e)){var drag=this.MouseDrag;if(drag==null){if(!this.ChartDrawOption.IsLockScreen)this.MoveCorssCursor({X:touches[0].clientX,Y:touches[0].clientY},e);}else{var moveSetp=Math.abs(drag.LastMove.Y-touches[0].clientY);var moveUpDown=Math.abs(drag.LastMove.X-touches[0].clientX);var isMoveCorssCursor=this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID&&this.TouchStatus.CorssCursorShow==true;//是否移动十字光标
|
|
9183
9187
|
if(this.VerticalDrag){if(this.VerticalDrag.IsDrag===true)isMoveCorssCursor=false;else isMoveCorssCursor=true;}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)//画图工具移动
|
|
9184
9188
|
{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 if(isMoveCorssCursor)//点击模式下 十字光标显示 左右移动十字光标
|
|
@@ -14769,7 +14773,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
14769
14773
|
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);};}/********************************************************************************
|
|
14770
14774
|
* 版本信息输出
|
|
14771
14775
|
*
|
|
14772
|
-
*/var HQCHART_VERSION="1.1.
|
|
14776
|
+
*/var HQCHART_VERSION="1.1.14696";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();//把给外界调用的方法暴露出来
|
|
14773
14777
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
14774
14778
|
// BaseIndex:BaseIndex,
|
|
14775
14779
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -2738,6 +2738,8 @@ var JSCHART_EVENT_ID=
|
|
|
2738
2738
|
ON_DBCLICK_DEAL_ROW:167,
|
|
2739
2739
|
|
|
2740
2740
|
ON_FORMAT_OVERLAY_INDEX_OUT_TEXT:168, //格式化叠指标标题
|
|
2741
|
+
|
|
2742
|
+
ON_TOUCH_FAST_SLIDE:169 //快速滑动
|
|
2741
2743
|
}
|
|
2742
2744
|
|
|
2743
2745
|
var JSCHART_OPERATOR_ID=
|
|
@@ -3111,6 +3113,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3111
3113
|
this.mapEvent=new Map(); //通知外部调用 key:JSCHART_EVENT_ID value:{Callback:回调,}
|
|
3112
3114
|
|
|
3113
3115
|
this.PhonePinch=null; //手机双指操作信息
|
|
3116
|
+
this.TouchDrag=null; //手势拖动操作信息
|
|
3114
3117
|
this.IsOnTouch = false; //是否再操作数据
|
|
3115
3118
|
this.TouchDrawCount = 0; //手势绘制次数
|
|
3116
3119
|
this.DisableMouse=false; //禁止鼠标事件
|
|
@@ -3197,6 +3200,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3197
3200
|
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
3198
3201
|
this.AryHotKey=[]; //热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
3199
3202
|
|
|
3203
|
+
this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250 }; //快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
|
|
3204
|
+
|
|
3200
3205
|
this.RestoreFocus=function(delay)
|
|
3201
3206
|
{
|
|
3202
3207
|
var value=1000;
|
|
@@ -5314,6 +5319,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5314
5319
|
this.IsOnTouch=true;
|
|
5315
5320
|
this.TouchDrawCount=0;
|
|
5316
5321
|
this.PhonePinch=null;
|
|
5322
|
+
this.TouchDrag=null;
|
|
5317
5323
|
this.StopDragTimer();
|
|
5318
5324
|
|
|
5319
5325
|
var isSingleTouch=this.IsSingleTouch(e);
|
|
@@ -5359,11 +5365,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5359
5365
|
|
|
5360
5366
|
if (this.EnableClickModel && this.ClickModel.IsShowCorssCursor==true) bStartTimer=false;
|
|
5361
5367
|
|
|
5362
|
-
var drag=
|
|
5363
|
-
{
|
|
5364
|
-
"Click":{},
|
|
5365
|
-
"LastMove":{} //最后移动的位置
|
|
5366
|
-
};
|
|
5368
|
+
var drag= { Click:{}, LastMove:{}, StartTime:Date.now() }; //LastMove 最后移动的位置
|
|
5369
|
+
var touchDrag={ Click:{}, LastMove:{}, StartTime:Date.now() };
|
|
5367
5370
|
|
|
5368
5371
|
//var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
5369
5372
|
|
|
@@ -5371,8 +5374,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5371
5374
|
drag.Click.Y=touches[0].clientY;
|
|
5372
5375
|
drag.LastMove.X=touches[0].clientX;
|
|
5373
5376
|
drag.LastMove.Y=touches[0].clientY;
|
|
5374
|
-
|
|
5375
5377
|
this.MouseDrag=drag;
|
|
5378
|
+
|
|
5379
|
+
touchDrag.Click.X=touches[0].clientX;
|
|
5380
|
+
touchDrag.Click.Y=touches[0].clientY;
|
|
5381
|
+
touchDrag.LastMove.X=touches[0].clientX;
|
|
5382
|
+
touchDrag.LastMove.Y=touches[0].clientY;
|
|
5383
|
+
this.TouchDrag=touchDrag;
|
|
5384
|
+
|
|
5376
5385
|
var drawPictureActive=this.GetActiveDrawPicture(); //上一次选中的
|
|
5377
5386
|
var selectedChart={ Chart:this.SelectedChart.Selected.Chart, Identify:this.SelectedChart.Selected.Identify }; //上一次选中的图形
|
|
5378
5387
|
this.PhoneTouchInfo={ Start:{X:touches[0].clientX, Y:touches[0].clientY }, End:{ X:touches[0].clientX, Y:touches[0].clientY } };
|
|
@@ -5494,11 +5503,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5494
5503
|
}
|
|
5495
5504
|
else if (this.IsPhonePinching(e))
|
|
5496
5505
|
{
|
|
5497
|
-
var phonePinch=
|
|
5498
|
-
{
|
|
5499
|
-
"Start":{},
|
|
5500
|
-
"Last":{}
|
|
5501
|
-
};
|
|
5506
|
+
var phonePinch={ Start:{}, Last:{}, StartTime:Date.now() };
|
|
5502
5507
|
|
|
5503
5508
|
var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
5504
5509
|
|
|
@@ -5633,6 +5638,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5633
5638
|
this.PhoneTouchInfo.End.X=touches[0].clientX;
|
|
5634
5639
|
this.PhoneTouchInfo.End.Y=touches[0].clientY;
|
|
5635
5640
|
}
|
|
5641
|
+
|
|
5642
|
+
if (this.TouchDrag)
|
|
5643
|
+
{
|
|
5644
|
+
var touchDrag=this.TouchDrag;
|
|
5645
|
+
touchDrag.LastMove.X=touches[0].clientX;
|
|
5646
|
+
touchDrag.LastMove.Y=touches[0].clientY;
|
|
5647
|
+
}
|
|
5636
5648
|
}
|
|
5637
5649
|
else if (this.IsPhonePinching(e))
|
|
5638
5650
|
{
|
|
@@ -5699,6 +5711,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5699
5711
|
JSConsole.Chart.Log('[KLineChartContainer:OnTouchEnd]',e);
|
|
5700
5712
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
5701
5713
|
|
|
5714
|
+
this.FastSlideEvent();
|
|
5715
|
+
|
|
5702
5716
|
var bClearDrawPicture=true;
|
|
5703
5717
|
if (this.CurrentChartDrawPicture)
|
|
5704
5718
|
{
|
|
@@ -5737,6 +5751,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5737
5751
|
this.OnTouchFinished();
|
|
5738
5752
|
this.TouchDrawCount=0;
|
|
5739
5753
|
this.PhonePinch=null;
|
|
5754
|
+
this.TouchDrag=null;
|
|
5740
5755
|
}
|
|
5741
5756
|
|
|
5742
5757
|
this.OnTouchDBClick=function(points)
|
|
@@ -11550,6 +11565,41 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11550
11565
|
|
|
11551
11566
|
return true;
|
|
11552
11567
|
}
|
|
11568
|
+
|
|
11569
|
+
//快速滑动
|
|
11570
|
+
this.FastSlideEvent=function()
|
|
11571
|
+
{
|
|
11572
|
+
if (!this.TouchDrag) return false;
|
|
11573
|
+
if (!this.FastSlideConfig) return false;
|
|
11574
|
+
|
|
11575
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_TOUCH_FAST_SLIDE);
|
|
11576
|
+
if (!event || !event.Callback) return false;
|
|
11577
|
+
|
|
11578
|
+
var config=this.FastSlideConfig;
|
|
11579
|
+
var drag=this.TouchDrag;
|
|
11580
|
+
var time=Date.now();
|
|
11581
|
+
var spanTime=time-drag.StartTime;
|
|
11582
|
+
if (spanTime>config.MaxTime) return false;
|
|
11583
|
+
|
|
11584
|
+
if (!drag.Click || !drag.LastMove) return false;
|
|
11585
|
+
|
|
11586
|
+
var xStart=drag.Click.X;
|
|
11587
|
+
var xEnd=drag.LastMove.X;
|
|
11588
|
+
|
|
11589
|
+
if (!IFrameSplitOperator.IsNumber(xStart) || !IFrameSplitOperator.IsNumber(xEnd)) return false;
|
|
11590
|
+
|
|
11591
|
+
var distance=xEnd-xStart;
|
|
11592
|
+
var speed=Math.abs(distance)/spanTime;
|
|
11593
|
+
JSConsole.Chart.Log(`[JSChartContainer:FastSlideEvent] speed=${speed}, distance=${distance}, spanTime=${spanTime}`);
|
|
11594
|
+
|
|
11595
|
+
if (Math.abs(distance)<config.MinDistance) return false;
|
|
11596
|
+
if (speed<config.MinSpeed) return false;
|
|
11597
|
+
|
|
11598
|
+
var sendData={ Speed:speed, Distance:distance, IsLeft:distance<0?true:false }
|
|
11599
|
+
event.Callback(event, sendData, this);
|
|
11600
|
+
|
|
11601
|
+
return true;
|
|
11602
|
+
}
|
|
11553
11603
|
}
|
|
11554
11604
|
|
|
11555
11605
|
function GetDevicePixelRatio()
|
|
@@ -87596,13 +87646,15 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87596
87646
|
this.IsOnTouch=true;
|
|
87597
87647
|
this.TouchDrawCount=0;
|
|
87598
87648
|
this.PhonePinch=null;
|
|
87649
|
+
this.TouchDrag=null;
|
|
87599
87650
|
this.StopDragTimer();
|
|
87600
87651
|
|
|
87601
87652
|
if (this.EnableScrollUpDown==false) e.preventDefault(); //上下拖动图形不能阻止事件
|
|
87602
87653
|
|
|
87603
87654
|
if (this.IsPhoneDragging(e))
|
|
87604
87655
|
{
|
|
87605
|
-
var drag= { Click:{}, LastMove:{} };//LastMove=最后移动的位置
|
|
87656
|
+
var drag= { Click:{}, LastMove:{}, StartTime:Date.now() };//LastMove=最后移动的位置 StartTime=开始时间
|
|
87657
|
+
var touchDrag={ Click:{}, LastMove:{}, StartTime:Date.now() };
|
|
87606
87658
|
var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
87607
87659
|
var pt=this.PointAbsoluteToRelative(touches[0].clientX, touches[0].clientY, true);
|
|
87608
87660
|
|
|
@@ -87628,6 +87680,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87628
87680
|
drag.Click.Y=touches[0].clientY;
|
|
87629
87681
|
drag.LastMove.X=touches[0].clientX;
|
|
87630
87682
|
drag.LastMove.Y=touches[0].clientY;
|
|
87683
|
+
|
|
87684
|
+
touchDrag.Click.X=touches[0].clientX;
|
|
87685
|
+
touchDrag.Click.Y=touches[0].clientY;
|
|
87686
|
+
touchDrag.LastMove.X=touches[0].clientX;
|
|
87687
|
+
touchDrag.LastMove.Y=touches[0].clientY;
|
|
87688
|
+
|
|
87631
87689
|
var self=this;
|
|
87632
87690
|
|
|
87633
87691
|
var T_ShowCorssCursor=function() //临时函数(Temp_) T_开头
|
|
@@ -87708,6 +87766,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87708
87766
|
}
|
|
87709
87767
|
|
|
87710
87768
|
this.MouseDrag=drag;
|
|
87769
|
+
this.TouchDrag=touchDrag;
|
|
87711
87770
|
this.PhoneTouchInfo={ Start:{X:touches[0].clientX, Y:touches[0].clientY }, End:{ X:touches[0].clientX, Y:touches[0].clientY } };
|
|
87712
87771
|
this.SelectChartDrawPicture=null;
|
|
87713
87772
|
|
|
@@ -87754,11 +87813,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87754
87813
|
}
|
|
87755
87814
|
else if (this.IsPhonePinching(e))
|
|
87756
87815
|
{
|
|
87757
|
-
var phonePinch=
|
|
87758
|
-
{
|
|
87759
|
-
"Start":{},
|
|
87760
|
-
"Last":{}
|
|
87761
|
-
};
|
|
87816
|
+
var phonePinch= { Start:{}, Last:{}, StartTime:Date.now() };
|
|
87762
87817
|
|
|
87763
87818
|
var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
87764
87819
|
|
|
@@ -87850,6 +87905,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87850
87905
|
this.PhoneTouchInfo.End.X=touches[0].clientX;
|
|
87851
87906
|
this.PhoneTouchInfo.End.Y=touches[0].clientY;
|
|
87852
87907
|
}
|
|
87908
|
+
|
|
87909
|
+
if (this.TouchDrag)
|
|
87910
|
+
{
|
|
87911
|
+
var touchDrag=this.TouchDrag;
|
|
87912
|
+
touchDrag.LastMove.X=touches[0].clientX;
|
|
87913
|
+
touchDrag.LastMove.Y=touches[0].clientY;
|
|
87914
|
+
}
|
|
87853
87915
|
}
|
|
87854
87916
|
else if (this.IsPhonePinching(e))
|
|
87855
87917
|
{
|
|
@@ -87907,6 +87969,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87907
87969
|
JSConsole.Chart.Log('[MinuteChartContainer::OnTouchEnd]',e);
|
|
87908
87970
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
87909
87971
|
|
|
87972
|
+
this.FastSlideEvent();
|
|
87973
|
+
|
|
87910
87974
|
var bClearDrawPicture=true;
|
|
87911
87975
|
if (this.CurrentChartDrawPicture)
|
|
87912
87976
|
{
|
|
@@ -87942,9 +88006,10 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87942
88006
|
this.TouchEvent({ EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH, FunctionName:"OnTouchEnd"}, e);
|
|
87943
88007
|
this.OnTouchFinished();
|
|
87944
88008
|
this.TouchDrawCount=0;
|
|
88009
|
+
this.TouchDrag=null;
|
|
87945
88010
|
}
|
|
87946
88011
|
|
|
87947
|
-
|
|
88012
|
+
|
|
87948
88013
|
//键盘左右移动十字光标
|
|
87949
88014
|
this.OnKeyDown=function(e)
|
|
87950
88015
|
{
|
|
@@ -93872,7 +93937,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
93872
93937
|
|
|
93873
93938
|
if (this.VerticalDrag) bStartTimer=false;
|
|
93874
93939
|
|
|
93875
|
-
var drag= { Click:{}, LastMove:{} }; //LastMove=最后移动的位置
|
|
93940
|
+
var drag= { Click:{}, LastMove:{}, StartTime:Date.now() }; //LastMove=最后移动的位置
|
|
93876
93941
|
|
|
93877
93942
|
|
|
93878
93943
|
//var touches=this.GetToucheData(e,false);
|
|
@@ -93969,11 +94034,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
93969
94034
|
}
|
|
93970
94035
|
else if (this.IsPhonePinching(e))
|
|
93971
94036
|
{
|
|
93972
|
-
var phonePinch=
|
|
93973
|
-
{
|
|
93974
|
-
"Start":{},
|
|
93975
|
-
"Last":{}
|
|
93976
|
-
};
|
|
94037
|
+
var phonePinch={ Start:{}, Last:{}, StartTime:Date.now() };
|
|
93977
94038
|
|
|
93978
94039
|
var touches=this.GetToucheData(e,false);
|
|
93979
94040
|
|
|
@@ -6834,6 +6834,8 @@ var JSCHART_EVENT_ID=
|
|
|
6834
6834
|
ON_DBCLICK_DEAL_ROW:167,
|
|
6835
6835
|
|
|
6836
6836
|
ON_FORMAT_OVERLAY_INDEX_OUT_TEXT:168, //格式化叠指标标题
|
|
6837
|
+
|
|
6838
|
+
ON_TOUCH_FAST_SLIDE:169 //快速滑动
|
|
6837
6839
|
}
|
|
6838
6840
|
|
|
6839
6841
|
var JSCHART_OPERATOR_ID=
|
|
@@ -7207,6 +7209,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7207
7209
|
this.mapEvent=new Map(); //通知外部调用 key:JSCHART_EVENT_ID value:{Callback:回调,}
|
|
7208
7210
|
|
|
7209
7211
|
this.PhonePinch=null; //手机双指操作信息
|
|
7212
|
+
this.TouchDrag=null; //手势拖动操作信息
|
|
7210
7213
|
this.IsOnTouch = false; //是否再操作数据
|
|
7211
7214
|
this.TouchDrawCount = 0; //手势绘制次数
|
|
7212
7215
|
this.DisableMouse=false; //禁止鼠标事件
|
|
@@ -7293,6 +7296,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7293
7296
|
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
7294
7297
|
this.AryHotKey=[]; //热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
7295
7298
|
|
|
7299
|
+
this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250 }; //快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
|
|
7300
|
+
|
|
7296
7301
|
this.RestoreFocus=function(delay)
|
|
7297
7302
|
{
|
|
7298
7303
|
var value=1000;
|
|
@@ -9410,6 +9415,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9410
9415
|
this.IsOnTouch=true;
|
|
9411
9416
|
this.TouchDrawCount=0;
|
|
9412
9417
|
this.PhonePinch=null;
|
|
9418
|
+
this.TouchDrag=null;
|
|
9413
9419
|
this.StopDragTimer();
|
|
9414
9420
|
|
|
9415
9421
|
var isSingleTouch=this.IsSingleTouch(e);
|
|
@@ -9455,11 +9461,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9455
9461
|
|
|
9456
9462
|
if (this.EnableClickModel && this.ClickModel.IsShowCorssCursor==true) bStartTimer=false;
|
|
9457
9463
|
|
|
9458
|
-
var drag=
|
|
9459
|
-
{
|
|
9460
|
-
"Click":{},
|
|
9461
|
-
"LastMove":{} //最后移动的位置
|
|
9462
|
-
};
|
|
9464
|
+
var drag= { Click:{}, LastMove:{}, StartTime:Date.now() }; //LastMove 最后移动的位置
|
|
9465
|
+
var touchDrag={ Click:{}, LastMove:{}, StartTime:Date.now() };
|
|
9463
9466
|
|
|
9464
9467
|
//var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
9465
9468
|
|
|
@@ -9467,8 +9470,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9467
9470
|
drag.Click.Y=touches[0].clientY;
|
|
9468
9471
|
drag.LastMove.X=touches[0].clientX;
|
|
9469
9472
|
drag.LastMove.Y=touches[0].clientY;
|
|
9470
|
-
|
|
9471
9473
|
this.MouseDrag=drag;
|
|
9474
|
+
|
|
9475
|
+
touchDrag.Click.X=touches[0].clientX;
|
|
9476
|
+
touchDrag.Click.Y=touches[0].clientY;
|
|
9477
|
+
touchDrag.LastMove.X=touches[0].clientX;
|
|
9478
|
+
touchDrag.LastMove.Y=touches[0].clientY;
|
|
9479
|
+
this.TouchDrag=touchDrag;
|
|
9480
|
+
|
|
9472
9481
|
var drawPictureActive=this.GetActiveDrawPicture(); //上一次选中的
|
|
9473
9482
|
var selectedChart={ Chart:this.SelectedChart.Selected.Chart, Identify:this.SelectedChart.Selected.Identify }; //上一次选中的图形
|
|
9474
9483
|
this.PhoneTouchInfo={ Start:{X:touches[0].clientX, Y:touches[0].clientY }, End:{ X:touches[0].clientX, Y:touches[0].clientY } };
|
|
@@ -9590,11 +9599,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9590
9599
|
}
|
|
9591
9600
|
else if (this.IsPhonePinching(e))
|
|
9592
9601
|
{
|
|
9593
|
-
var phonePinch=
|
|
9594
|
-
{
|
|
9595
|
-
"Start":{},
|
|
9596
|
-
"Last":{}
|
|
9597
|
-
};
|
|
9602
|
+
var phonePinch={ Start:{}, Last:{}, StartTime:Date.now() };
|
|
9598
9603
|
|
|
9599
9604
|
var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
9600
9605
|
|
|
@@ -9729,6 +9734,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9729
9734
|
this.PhoneTouchInfo.End.X=touches[0].clientX;
|
|
9730
9735
|
this.PhoneTouchInfo.End.Y=touches[0].clientY;
|
|
9731
9736
|
}
|
|
9737
|
+
|
|
9738
|
+
if (this.TouchDrag)
|
|
9739
|
+
{
|
|
9740
|
+
var touchDrag=this.TouchDrag;
|
|
9741
|
+
touchDrag.LastMove.X=touches[0].clientX;
|
|
9742
|
+
touchDrag.LastMove.Y=touches[0].clientY;
|
|
9743
|
+
}
|
|
9732
9744
|
}
|
|
9733
9745
|
else if (this.IsPhonePinching(e))
|
|
9734
9746
|
{
|
|
@@ -9795,6 +9807,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9795
9807
|
JSConsole.Chart.Log('[KLineChartContainer:OnTouchEnd]',e);
|
|
9796
9808
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
9797
9809
|
|
|
9810
|
+
this.FastSlideEvent();
|
|
9811
|
+
|
|
9798
9812
|
var bClearDrawPicture=true;
|
|
9799
9813
|
if (this.CurrentChartDrawPicture)
|
|
9800
9814
|
{
|
|
@@ -9833,6 +9847,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9833
9847
|
this.OnTouchFinished();
|
|
9834
9848
|
this.TouchDrawCount=0;
|
|
9835
9849
|
this.PhonePinch=null;
|
|
9850
|
+
this.TouchDrag=null;
|
|
9836
9851
|
}
|
|
9837
9852
|
|
|
9838
9853
|
this.OnTouchDBClick=function(points)
|
|
@@ -15646,6 +15661,41 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
15646
15661
|
|
|
15647
15662
|
return true;
|
|
15648
15663
|
}
|
|
15664
|
+
|
|
15665
|
+
//快速滑动
|
|
15666
|
+
this.FastSlideEvent=function()
|
|
15667
|
+
{
|
|
15668
|
+
if (!this.TouchDrag) return false;
|
|
15669
|
+
if (!this.FastSlideConfig) return false;
|
|
15670
|
+
|
|
15671
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_TOUCH_FAST_SLIDE);
|
|
15672
|
+
if (!event || !event.Callback) return false;
|
|
15673
|
+
|
|
15674
|
+
var config=this.FastSlideConfig;
|
|
15675
|
+
var drag=this.TouchDrag;
|
|
15676
|
+
var time=Date.now();
|
|
15677
|
+
var spanTime=time-drag.StartTime;
|
|
15678
|
+
if (spanTime>config.MaxTime) return false;
|
|
15679
|
+
|
|
15680
|
+
if (!drag.Click || !drag.LastMove) return false;
|
|
15681
|
+
|
|
15682
|
+
var xStart=drag.Click.X;
|
|
15683
|
+
var xEnd=drag.LastMove.X;
|
|
15684
|
+
|
|
15685
|
+
if (!IFrameSplitOperator.IsNumber(xStart) || !IFrameSplitOperator.IsNumber(xEnd)) return false;
|
|
15686
|
+
|
|
15687
|
+
var distance=xEnd-xStart;
|
|
15688
|
+
var speed=Math.abs(distance)/spanTime;
|
|
15689
|
+
JSConsole.Chart.Log(`[JSChartContainer:FastSlideEvent] speed=${speed}, distance=${distance}, spanTime=${spanTime}`);
|
|
15690
|
+
|
|
15691
|
+
if (Math.abs(distance)<config.MinDistance) return false;
|
|
15692
|
+
if (speed<config.MinSpeed) return false;
|
|
15693
|
+
|
|
15694
|
+
var sendData={ Speed:speed, Distance:distance, IsLeft:distance<0?true:false }
|
|
15695
|
+
event.Callback(event, sendData, this);
|
|
15696
|
+
|
|
15697
|
+
return true;
|
|
15698
|
+
}
|
|
15649
15699
|
}
|
|
15650
15700
|
|
|
15651
15701
|
function GetDevicePixelRatio()
|
|
@@ -91692,13 +91742,15 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91692
91742
|
this.IsOnTouch=true;
|
|
91693
91743
|
this.TouchDrawCount=0;
|
|
91694
91744
|
this.PhonePinch=null;
|
|
91745
|
+
this.TouchDrag=null;
|
|
91695
91746
|
this.StopDragTimer();
|
|
91696
91747
|
|
|
91697
91748
|
if (this.EnableScrollUpDown==false) e.preventDefault(); //上下拖动图形不能阻止事件
|
|
91698
91749
|
|
|
91699
91750
|
if (this.IsPhoneDragging(e))
|
|
91700
91751
|
{
|
|
91701
|
-
var drag= { Click:{}, LastMove:{} };//LastMove=最后移动的位置
|
|
91752
|
+
var drag= { Click:{}, LastMove:{}, StartTime:Date.now() };//LastMove=最后移动的位置 StartTime=开始时间
|
|
91753
|
+
var touchDrag={ Click:{}, LastMove:{}, StartTime:Date.now() };
|
|
91702
91754
|
var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
91703
91755
|
var pt=this.PointAbsoluteToRelative(touches[0].clientX, touches[0].clientY, true);
|
|
91704
91756
|
|
|
@@ -91724,6 +91776,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91724
91776
|
drag.Click.Y=touches[0].clientY;
|
|
91725
91777
|
drag.LastMove.X=touches[0].clientX;
|
|
91726
91778
|
drag.LastMove.Y=touches[0].clientY;
|
|
91779
|
+
|
|
91780
|
+
touchDrag.Click.X=touches[0].clientX;
|
|
91781
|
+
touchDrag.Click.Y=touches[0].clientY;
|
|
91782
|
+
touchDrag.LastMove.X=touches[0].clientX;
|
|
91783
|
+
touchDrag.LastMove.Y=touches[0].clientY;
|
|
91784
|
+
|
|
91727
91785
|
var self=this;
|
|
91728
91786
|
|
|
91729
91787
|
var T_ShowCorssCursor=function() //临时函数(Temp_) T_开头
|
|
@@ -91804,6 +91862,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91804
91862
|
}
|
|
91805
91863
|
|
|
91806
91864
|
this.MouseDrag=drag;
|
|
91865
|
+
this.TouchDrag=touchDrag;
|
|
91807
91866
|
this.PhoneTouchInfo={ Start:{X:touches[0].clientX, Y:touches[0].clientY }, End:{ X:touches[0].clientX, Y:touches[0].clientY } };
|
|
91808
91867
|
this.SelectChartDrawPicture=null;
|
|
91809
91868
|
|
|
@@ -91850,11 +91909,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91850
91909
|
}
|
|
91851
91910
|
else if (this.IsPhonePinching(e))
|
|
91852
91911
|
{
|
|
91853
|
-
var phonePinch=
|
|
91854
|
-
{
|
|
91855
|
-
"Start":{},
|
|
91856
|
-
"Last":{}
|
|
91857
|
-
};
|
|
91912
|
+
var phonePinch= { Start:{}, Last:{}, StartTime:Date.now() };
|
|
91858
91913
|
|
|
91859
91914
|
var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
91860
91915
|
|
|
@@ -91946,6 +92001,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91946
92001
|
this.PhoneTouchInfo.End.X=touches[0].clientX;
|
|
91947
92002
|
this.PhoneTouchInfo.End.Y=touches[0].clientY;
|
|
91948
92003
|
}
|
|
92004
|
+
|
|
92005
|
+
if (this.TouchDrag)
|
|
92006
|
+
{
|
|
92007
|
+
var touchDrag=this.TouchDrag;
|
|
92008
|
+
touchDrag.LastMove.X=touches[0].clientX;
|
|
92009
|
+
touchDrag.LastMove.Y=touches[0].clientY;
|
|
92010
|
+
}
|
|
91949
92011
|
}
|
|
91950
92012
|
else if (this.IsPhonePinching(e))
|
|
91951
92013
|
{
|
|
@@ -92003,6 +92065,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
92003
92065
|
JSConsole.Chart.Log('[MinuteChartContainer::OnTouchEnd]',e);
|
|
92004
92066
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
92005
92067
|
|
|
92068
|
+
this.FastSlideEvent();
|
|
92069
|
+
|
|
92006
92070
|
var bClearDrawPicture=true;
|
|
92007
92071
|
if (this.CurrentChartDrawPicture)
|
|
92008
92072
|
{
|
|
@@ -92038,9 +92102,10 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
92038
92102
|
this.TouchEvent({ EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH, FunctionName:"OnTouchEnd"}, e);
|
|
92039
92103
|
this.OnTouchFinished();
|
|
92040
92104
|
this.TouchDrawCount=0;
|
|
92105
|
+
this.TouchDrag=null;
|
|
92041
92106
|
}
|
|
92042
92107
|
|
|
92043
|
-
|
|
92108
|
+
|
|
92044
92109
|
//键盘左右移动十字光标
|
|
92045
92110
|
this.OnKeyDown=function(e)
|
|
92046
92111
|
{
|
|
@@ -97968,7 +98033,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
97968
98033
|
|
|
97969
98034
|
if (this.VerticalDrag) bStartTimer=false;
|
|
97970
98035
|
|
|
97971
|
-
var drag= { Click:{}, LastMove:{} }; //LastMove=最后移动的位置
|
|
98036
|
+
var drag= { Click:{}, LastMove:{}, StartTime:Date.now() }; //LastMove=最后移动的位置
|
|
97972
98037
|
|
|
97973
98038
|
|
|
97974
98039
|
//var touches=this.GetToucheData(e,false);
|
|
@@ -98065,11 +98130,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
98065
98130
|
}
|
|
98066
98131
|
else if (this.IsPhonePinching(e))
|
|
98067
98132
|
{
|
|
98068
|
-
var phonePinch=
|
|
98069
|
-
{
|
|
98070
|
-
"Start":{},
|
|
98071
|
-
"Last":{}
|
|
98072
|
-
};
|
|
98133
|
+
var phonePinch={ Start:{}, Last:{}, StartTime:Date.now() };
|
|
98073
98134
|
|
|
98074
98135
|
var touches=this.GetToucheData(e,false);
|
|
98075
98136
|
|
|
@@ -147531,7 +147592,7 @@ function ScrollBarBGChart()
|
|
|
147531
147592
|
|
|
147532
147593
|
|
|
147533
147594
|
|
|
147534
|
-
var HQCHART_VERSION="1.1.
|
|
147595
|
+
var HQCHART_VERSION="1.1.14696";
|
|
147535
147596
|
|
|
147536
147597
|
function PrintHQChartVersion()
|
|
147537
147598
|
{
|
|
@@ -6878,6 +6878,8 @@ var JSCHART_EVENT_ID=
|
|
|
6878
6878
|
ON_DBCLICK_DEAL_ROW:167,
|
|
6879
6879
|
|
|
6880
6880
|
ON_FORMAT_OVERLAY_INDEX_OUT_TEXT:168, //格式化叠指标标题
|
|
6881
|
+
|
|
6882
|
+
ON_TOUCH_FAST_SLIDE:169 //快速滑动
|
|
6881
6883
|
}
|
|
6882
6884
|
|
|
6883
6885
|
var JSCHART_OPERATOR_ID=
|
|
@@ -7251,6 +7253,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7251
7253
|
this.mapEvent=new Map(); //通知外部调用 key:JSCHART_EVENT_ID value:{Callback:回调,}
|
|
7252
7254
|
|
|
7253
7255
|
this.PhonePinch=null; //手机双指操作信息
|
|
7256
|
+
this.TouchDrag=null; //手势拖动操作信息
|
|
7254
7257
|
this.IsOnTouch = false; //是否再操作数据
|
|
7255
7258
|
this.TouchDrawCount = 0; //手势绘制次数
|
|
7256
7259
|
this.DisableMouse=false; //禁止鼠标事件
|
|
@@ -7337,6 +7340,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7337
7340
|
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
7338
7341
|
this.AryHotKey=[]; //热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
7339
7342
|
|
|
7343
|
+
this.FastSlideConfig={ MinDistance:500, MinSpeed:3, MaxTime:250 }; //快速滑动配置 MinDistance=最小的距离 MinSpeed=最小速度 MaxTime=最大间隔时间(ms)
|
|
7344
|
+
|
|
7340
7345
|
this.RestoreFocus=function(delay)
|
|
7341
7346
|
{
|
|
7342
7347
|
var value=1000;
|
|
@@ -9454,6 +9459,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9454
9459
|
this.IsOnTouch=true;
|
|
9455
9460
|
this.TouchDrawCount=0;
|
|
9456
9461
|
this.PhonePinch=null;
|
|
9462
|
+
this.TouchDrag=null;
|
|
9457
9463
|
this.StopDragTimer();
|
|
9458
9464
|
|
|
9459
9465
|
var isSingleTouch=this.IsSingleTouch(e);
|
|
@@ -9499,11 +9505,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9499
9505
|
|
|
9500
9506
|
if (this.EnableClickModel && this.ClickModel.IsShowCorssCursor==true) bStartTimer=false;
|
|
9501
9507
|
|
|
9502
|
-
var drag=
|
|
9503
|
-
{
|
|
9504
|
-
"Click":{},
|
|
9505
|
-
"LastMove":{} //最后移动的位置
|
|
9506
|
-
};
|
|
9508
|
+
var drag= { Click:{}, LastMove:{}, StartTime:Date.now() }; //LastMove 最后移动的位置
|
|
9509
|
+
var touchDrag={ Click:{}, LastMove:{}, StartTime:Date.now() };
|
|
9507
9510
|
|
|
9508
9511
|
//var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
9509
9512
|
|
|
@@ -9511,8 +9514,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9511
9514
|
drag.Click.Y=touches[0].clientY;
|
|
9512
9515
|
drag.LastMove.X=touches[0].clientX;
|
|
9513
9516
|
drag.LastMove.Y=touches[0].clientY;
|
|
9514
|
-
|
|
9515
9517
|
this.MouseDrag=drag;
|
|
9518
|
+
|
|
9519
|
+
touchDrag.Click.X=touches[0].clientX;
|
|
9520
|
+
touchDrag.Click.Y=touches[0].clientY;
|
|
9521
|
+
touchDrag.LastMove.X=touches[0].clientX;
|
|
9522
|
+
touchDrag.LastMove.Y=touches[0].clientY;
|
|
9523
|
+
this.TouchDrag=touchDrag;
|
|
9524
|
+
|
|
9516
9525
|
var drawPictureActive=this.GetActiveDrawPicture(); //上一次选中的
|
|
9517
9526
|
var selectedChart={ Chart:this.SelectedChart.Selected.Chart, Identify:this.SelectedChart.Selected.Identify }; //上一次选中的图形
|
|
9518
9527
|
this.PhoneTouchInfo={ Start:{X:touches[0].clientX, Y:touches[0].clientY }, End:{ X:touches[0].clientX, Y:touches[0].clientY } };
|
|
@@ -9634,11 +9643,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9634
9643
|
}
|
|
9635
9644
|
else if (this.IsPhonePinching(e))
|
|
9636
9645
|
{
|
|
9637
|
-
var phonePinch=
|
|
9638
|
-
{
|
|
9639
|
-
"Start":{},
|
|
9640
|
-
"Last":{}
|
|
9641
|
-
};
|
|
9646
|
+
var phonePinch={ Start:{}, Last:{}, StartTime:Date.now() };
|
|
9642
9647
|
|
|
9643
9648
|
var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
9644
9649
|
|
|
@@ -9773,6 +9778,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9773
9778
|
this.PhoneTouchInfo.End.X=touches[0].clientX;
|
|
9774
9779
|
this.PhoneTouchInfo.End.Y=touches[0].clientY;
|
|
9775
9780
|
}
|
|
9781
|
+
|
|
9782
|
+
if (this.TouchDrag)
|
|
9783
|
+
{
|
|
9784
|
+
var touchDrag=this.TouchDrag;
|
|
9785
|
+
touchDrag.LastMove.X=touches[0].clientX;
|
|
9786
|
+
touchDrag.LastMove.Y=touches[0].clientY;
|
|
9787
|
+
}
|
|
9776
9788
|
}
|
|
9777
9789
|
else if (this.IsPhonePinching(e))
|
|
9778
9790
|
{
|
|
@@ -9839,6 +9851,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9839
9851
|
JSConsole.Chart.Log('[KLineChartContainer:OnTouchEnd]',e);
|
|
9840
9852
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
9841
9853
|
|
|
9854
|
+
this.FastSlideEvent();
|
|
9855
|
+
|
|
9842
9856
|
var bClearDrawPicture=true;
|
|
9843
9857
|
if (this.CurrentChartDrawPicture)
|
|
9844
9858
|
{
|
|
@@ -9877,6 +9891,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9877
9891
|
this.OnTouchFinished();
|
|
9878
9892
|
this.TouchDrawCount=0;
|
|
9879
9893
|
this.PhonePinch=null;
|
|
9894
|
+
this.TouchDrag=null;
|
|
9880
9895
|
}
|
|
9881
9896
|
|
|
9882
9897
|
this.OnTouchDBClick=function(points)
|
|
@@ -15690,6 +15705,41 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
15690
15705
|
|
|
15691
15706
|
return true;
|
|
15692
15707
|
}
|
|
15708
|
+
|
|
15709
|
+
//快速滑动
|
|
15710
|
+
this.FastSlideEvent=function()
|
|
15711
|
+
{
|
|
15712
|
+
if (!this.TouchDrag) return false;
|
|
15713
|
+
if (!this.FastSlideConfig) return false;
|
|
15714
|
+
|
|
15715
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_TOUCH_FAST_SLIDE);
|
|
15716
|
+
if (!event || !event.Callback) return false;
|
|
15717
|
+
|
|
15718
|
+
var config=this.FastSlideConfig;
|
|
15719
|
+
var drag=this.TouchDrag;
|
|
15720
|
+
var time=Date.now();
|
|
15721
|
+
var spanTime=time-drag.StartTime;
|
|
15722
|
+
if (spanTime>config.MaxTime) return false;
|
|
15723
|
+
|
|
15724
|
+
if (!drag.Click || !drag.LastMove) return false;
|
|
15725
|
+
|
|
15726
|
+
var xStart=drag.Click.X;
|
|
15727
|
+
var xEnd=drag.LastMove.X;
|
|
15728
|
+
|
|
15729
|
+
if (!IFrameSplitOperator.IsNumber(xStart) || !IFrameSplitOperator.IsNumber(xEnd)) return false;
|
|
15730
|
+
|
|
15731
|
+
var distance=xEnd-xStart;
|
|
15732
|
+
var speed=Math.abs(distance)/spanTime;
|
|
15733
|
+
JSConsole.Chart.Log(`[JSChartContainer:FastSlideEvent] speed=${speed}, distance=${distance}, spanTime=${spanTime}`);
|
|
15734
|
+
|
|
15735
|
+
if (Math.abs(distance)<config.MinDistance) return false;
|
|
15736
|
+
if (speed<config.MinSpeed) return false;
|
|
15737
|
+
|
|
15738
|
+
var sendData={ Speed:speed, Distance:distance, IsLeft:distance<0?true:false }
|
|
15739
|
+
event.Callback(event, sendData, this);
|
|
15740
|
+
|
|
15741
|
+
return true;
|
|
15742
|
+
}
|
|
15693
15743
|
}
|
|
15694
15744
|
|
|
15695
15745
|
function GetDevicePixelRatio()
|
|
@@ -91736,13 +91786,15 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91736
91786
|
this.IsOnTouch=true;
|
|
91737
91787
|
this.TouchDrawCount=0;
|
|
91738
91788
|
this.PhonePinch=null;
|
|
91789
|
+
this.TouchDrag=null;
|
|
91739
91790
|
this.StopDragTimer();
|
|
91740
91791
|
|
|
91741
91792
|
if (this.EnableScrollUpDown==false) e.preventDefault(); //上下拖动图形不能阻止事件
|
|
91742
91793
|
|
|
91743
91794
|
if (this.IsPhoneDragging(e))
|
|
91744
91795
|
{
|
|
91745
|
-
var drag= { Click:{}, LastMove:{} };//LastMove=最后移动的位置
|
|
91796
|
+
var drag= { Click:{}, LastMove:{}, StartTime:Date.now() };//LastMove=最后移动的位置 StartTime=开始时间
|
|
91797
|
+
var touchDrag={ Click:{}, LastMove:{}, StartTime:Date.now() };
|
|
91746
91798
|
var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
91747
91799
|
var pt=this.PointAbsoluteToRelative(touches[0].clientX, touches[0].clientY, true);
|
|
91748
91800
|
|
|
@@ -91768,6 +91820,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91768
91820
|
drag.Click.Y=touches[0].clientY;
|
|
91769
91821
|
drag.LastMove.X=touches[0].clientX;
|
|
91770
91822
|
drag.LastMove.Y=touches[0].clientY;
|
|
91823
|
+
|
|
91824
|
+
touchDrag.Click.X=touches[0].clientX;
|
|
91825
|
+
touchDrag.Click.Y=touches[0].clientY;
|
|
91826
|
+
touchDrag.LastMove.X=touches[0].clientX;
|
|
91827
|
+
touchDrag.LastMove.Y=touches[0].clientY;
|
|
91828
|
+
|
|
91771
91829
|
var self=this;
|
|
91772
91830
|
|
|
91773
91831
|
var T_ShowCorssCursor=function() //临时函数(Temp_) T_开头
|
|
@@ -91848,6 +91906,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91848
91906
|
}
|
|
91849
91907
|
|
|
91850
91908
|
this.MouseDrag=drag;
|
|
91909
|
+
this.TouchDrag=touchDrag;
|
|
91851
91910
|
this.PhoneTouchInfo={ Start:{X:touches[0].clientX, Y:touches[0].clientY }, End:{ X:touches[0].clientX, Y:touches[0].clientY } };
|
|
91852
91911
|
this.SelectChartDrawPicture=null;
|
|
91853
91912
|
|
|
@@ -91894,11 +91953,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91894
91953
|
}
|
|
91895
91954
|
else if (this.IsPhonePinching(e))
|
|
91896
91955
|
{
|
|
91897
|
-
var phonePinch=
|
|
91898
|
-
{
|
|
91899
|
-
"Start":{},
|
|
91900
|
-
"Last":{}
|
|
91901
|
-
};
|
|
91956
|
+
var phonePinch= { Start:{}, Last:{}, StartTime:Date.now() };
|
|
91902
91957
|
|
|
91903
91958
|
var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
91904
91959
|
|
|
@@ -91990,6 +92045,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91990
92045
|
this.PhoneTouchInfo.End.X=touches[0].clientX;
|
|
91991
92046
|
this.PhoneTouchInfo.End.Y=touches[0].clientY;
|
|
91992
92047
|
}
|
|
92048
|
+
|
|
92049
|
+
if (this.TouchDrag)
|
|
92050
|
+
{
|
|
92051
|
+
var touchDrag=this.TouchDrag;
|
|
92052
|
+
touchDrag.LastMove.X=touches[0].clientX;
|
|
92053
|
+
touchDrag.LastMove.Y=touches[0].clientY;
|
|
92054
|
+
}
|
|
91993
92055
|
}
|
|
91994
92056
|
else if (this.IsPhonePinching(e))
|
|
91995
92057
|
{
|
|
@@ -92047,6 +92109,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
92047
92109
|
JSConsole.Chart.Log('[MinuteChartContainer::OnTouchEnd]',e);
|
|
92048
92110
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
92049
92111
|
|
|
92112
|
+
this.FastSlideEvent();
|
|
92113
|
+
|
|
92050
92114
|
var bClearDrawPicture=true;
|
|
92051
92115
|
if (this.CurrentChartDrawPicture)
|
|
92052
92116
|
{
|
|
@@ -92082,9 +92146,10 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
92082
92146
|
this.TouchEvent({ EventID:JSCHART_EVENT_ID.ON_PHONE_TOUCH, FunctionName:"OnTouchEnd"}, e);
|
|
92083
92147
|
this.OnTouchFinished();
|
|
92084
92148
|
this.TouchDrawCount=0;
|
|
92149
|
+
this.TouchDrag=null;
|
|
92085
92150
|
}
|
|
92086
92151
|
|
|
92087
|
-
|
|
92152
|
+
|
|
92088
92153
|
//键盘左右移动十字光标
|
|
92089
92154
|
this.OnKeyDown=function(e)
|
|
92090
92155
|
{
|
|
@@ -98012,7 +98077,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
98012
98077
|
|
|
98013
98078
|
if (this.VerticalDrag) bStartTimer=false;
|
|
98014
98079
|
|
|
98015
|
-
var drag= { Click:{}, LastMove:{} }; //LastMove=最后移动的位置
|
|
98080
|
+
var drag= { Click:{}, LastMove:{}, StartTime:Date.now() }; //LastMove=最后移动的位置
|
|
98016
98081
|
|
|
98017
98082
|
|
|
98018
98083
|
//var touches=this.GetToucheData(e,false);
|
|
@@ -98109,11 +98174,7 @@ function KLineChartHScreenContainer(uielement)
|
|
|
98109
98174
|
}
|
|
98110
98175
|
else if (this.IsPhonePinching(e))
|
|
98111
98176
|
{
|
|
98112
|
-
var phonePinch=
|
|
98113
|
-
{
|
|
98114
|
-
"Start":{},
|
|
98115
|
-
"Last":{}
|
|
98116
|
-
};
|
|
98177
|
+
var phonePinch={ Start:{}, Last:{}, StartTime:Date.now() };
|
|
98117
98178
|
|
|
98118
98179
|
var touches=this.GetToucheData(e,false);
|
|
98119
98180
|
|
|
@@ -158346,7 +158407,7 @@ function HQChartScriptWorker()
|
|
|
158346
158407
|
|
|
158347
158408
|
|
|
158348
158409
|
|
|
158349
|
-
var HQCHART_VERSION="1.1.
|
|
158410
|
+
var HQCHART_VERSION="1.1.14696";
|
|
158350
158411
|
|
|
158351
158412
|
function PrintHQChartVersion()
|
|
158352
158413
|
{
|