hqchart 1.1.14713 → 1.1.14718
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
|
@@ -1543,7 +1543,8 @@ SEARCH_DIALOG_ON_CLICK_INDEX:163,//切换指标-指标对话框
|
|
|
1543
1543
|
ON_CALCULATE_CHIP_DATA:164,//计算筹码数据 (筹码图用)
|
|
1544
1544
|
ON_CLICK_DEAL_ROW:165,ON_RCLICK_DEAL_ROW:166,ON_DBCLICK_DEAL_ROW:167,ON_FORMAT_OVERLAY_INDEX_OUT_TEXT:168,//格式化叠指标标题
|
|
1545
1545
|
ON_TOUCH_FAST_SLIDE:169,//快速滑动
|
|
1546
|
-
ON_CLICK_CROSSCURSOR_BOTTOM:170
|
|
1546
|
+
ON_CLICK_CROSSCURSOR_BOTTOM:170,//十字光标底部文字点击
|
|
1547
|
+
ON_CLICK_CHART_CELL:171//点击图形单元
|
|
1547
1548
|
};var JSCHART_OPERATOR_ID={OP_SCROLL_LEFT:1,//往左移动
|
|
1548
1549
|
OP_SCROLL_RIGHT:2,//往右移动
|
|
1549
1550
|
OP_ZOOM_OUT:3,//缩小
|
|
@@ -1728,7 +1729,7 @@ LockCorssCursor:{X:{Enable:false}},//图形中的单元选中状态
|
|
|
1728
1729
|
MapIndexChartCache:new _map2.default()//key 指标GUID
|
|
1729
1730
|
};this.VerticalDrag;//通过X轴左右拖动数据(手势才有)
|
|
1730
1731
|
this.EnableVerticalDrag=false;//十字光标长留(手势才有)
|
|
1731
|
-
this.ClickModel={IsShowCorssCursor:false,PreventHide:false};//PreventHide 阻止隐藏十字光标
|
|
1732
|
+
this.ClickModel={IsShowCorssCursor:false,PreventHide:false,IsClickButton:false};//PreventHide 阻止隐藏十字光标
|
|
1732
1733
|
this.EnableClickModel=false;//标题栏显示最新数据
|
|
1733
1734
|
this.DisplayLatestOption={Timer:null,Enable:false,DelayTime:60*1000*3,LastPoint:null};this.DrawDynamicInfoOption={Timer:null,Enable:false,DelayTime:10};this.CustomChartDrag;//自定义图形的拖拽操作 { Type:, Data: }
|
|
1734
1735
|
this.StockCache={Data:null};//扩展数据缓存数据
|
|
@@ -1765,7 +1766,7 @@ uielement.onmousemove=function(e){_this6.UIOnMouseMove(e);};uielement.oncontextm
|
|
|
1765
1766
|
var pixelTatio=GetDevicePixelRatio();//鼠标移动坐标是原始坐标 需要乘以放大倍速
|
|
1766
1767
|
var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;this.StopDisplayLatest();//加载数据中,禁用鼠标事件
|
|
1767
1768
|
this.MoveOnChartDrawPicture=null;if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;if(this.DisableMouse==true)return;if(this.BorderDrag)return;if(this.YDrag)return;if(this.IndexChartDrag)return;if(this.CustomChartDrag)return;//if (this.RectSelectDrag) return;
|
|
1768
|
-
|
|
1769
|
+
if(this.EnableClickModel&&this.ClickModel.IsClickButton)return;/*
|
|
1769
1770
|
if (this.CurrentChartDrawPicture)
|
|
1770
1771
|
{
|
|
1771
1772
|
var drawPicture=this.CurrentChartDrawPicture;
|
|
@@ -1781,7 +1782,7 @@ return;}var x=e.clientX-this.UIElement.getBoundingClientRect().left;var y=e.clie
|
|
|
1781
1782
|
};this.UIOnDblClick=function(e){if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash)return;var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;this.OnDoubleClick(x,y,e);};//是否在拖拽Y轴上
|
|
1782
1783
|
this.TryYDrag=function(x,y){if(!this.EnableYDrag)return null;if(!this.EnableYDrag.Left&&!this.EnableYDrag.Right)return null;if(!this.Frame||!this.Frame.PtInFrameY)return null;var dragY=this.Frame.PtInFrameY(x,y);if(!dragY||dragY.Index<0)return null;if(dragY.IsOverlay===true){if(!dragY.Right||!this.EnableYDrag.Right)return null;if(this.Frame.IsEnableOverlayDragY(dragY.Index,dragY.OverlayIndex))return dragY;return null;}if(dragY.Left&&this.EnableYDrag.Left&&this.Frame.IsEnableDragY(dragY.Index)){return dragY;}if(dragY.Right&&this.EnableYDrag.Right&&this.Frame.IsEnableDragY(dragY.Index)){return dragY;}return null;};//是否可以上下拖拽
|
|
1783
1784
|
this.TryUpDownDrag=function(x,y){var windowIndex=this.Frame.PtInFrame(x,y);if(windowIndex<0)return null;var item=this.Frame.SubFrame[windowIndex];if(!item||!item.Frame)return null;var frame=item.Frame;if(!frame.YSplitOperator||!frame.YSplitOperator.FixedYMaxMin)return null;return{Index:windowIndex,X:x,Y:y};};this.TryRectSelectDrag=function(x,y){var paint=this.GetRectSelectPaint();if(!paint)return null;if(paint.GetPointCount()<=0)return null;var item=paint.PtInPaint(x,y);return{Item:item,X:x,Y:y};};this.TryClickCrossCursor=function(x,y,e){if(!this.ChartCorssCursor)return;var button=this.ChartCorssCursor.PtInButton(x,y);if(!button)return false;if(button.Type==1){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_CROSSCURSOR_RIGHT);if(event&&event.Callback){var sendData={Button:button,e:e};event.Callback(event,sendData,this);}}else if(button.Type==2){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_CROSSCURSOR_BOTTOM);if(event&&event.Callback){var sendData={Button:button,e:e};event.Callback(event,sendData,this);}}return true;};this.TryClickButton=function(x,y,e){var button=this.Frame.PtInButtons(x,y);if(button&&this.ClickFrameButton){this.ClickFrameButton(button,e);return true;}button=this.PtInExtendChartButtons(x,y);if(button&&this.ClickExtendChartButton){this.ClickExtendChartButton(button,e);return true;}button=this.PtInDrawPictureButtons(x,y);if(button&&this.ClickDrawPictureButton){this.ClickDrawPictureButton(button,e);return true;}button=this.PtInTitleButtons(x,y);if(button&&this.ClickTitleButton){this.ClickTitleButton(button,e);return true;}var label=this.Frame.PtInHorizontalLabel(x,y);if(label&&this.ClickHorizontalLabel){this.ClickHorizontalLabel(label,e);return true;}return false;};//点击图新内部元素
|
|
1784
|
-
this.TryClickChartCell=function(x,y,e){var result=null;for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];if(!item.ClickCell)continue;if(item.IsHideScriptIndex())continue;result=item.ClickCell(x,y,e);if(result)return result;}for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];if(!item.ClickCell)continue;result=item.ClickCell(x,y,e);if(result)return result;}for(var i=0,j=0,k=0;i<this.Frame.SubFrame.length;++i){var item=this.Frame.SubFrame[i];if(!IFrameSplitOperator.IsNonEmptyArray(item.OverlayIndex))continue;for(j=0;j<item.OverlayIndex.length;++j){var overlayItem=item.OverlayIndex[j];if(!IFrameSplitOperator.IsNonEmptyArray(overlayItem.ChartPaint))continue;for(var k=0;k<overlayItem.ChartPaint.length;++k){var chart=overlayItem.ChartPaint[k];if(!chart.IsShow)continue;if(chart.IsHideScriptIndex())continue;if(chart.ClickCell){result=chart.ClickCell(x,y,e);if(result)return result;}}}}return null;};this.TryMouseMove_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_MOUSE_MOVE);if(!event||!event.Callback)return false;return event.Callback(event,sendData,this);};this.TryClick_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_MOUSE_DOWN);if(!event||!event.Callback)return false;sendData.ChartDrag=null;sendData.Cusrsor=null;event.Callback(event,sendData,this);this.CustomChartDrag=sendData.ChartDrag;this.SetCursor(sendData);};this.TryDragMove_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_DOC_MOUSE_MOVE);if(!event||!event.Callback)return;var e=sendData.e;var drag=sendData.Drag;if(Math.abs(drag.LastMove.Y-e.clientY)<2&&Math.abs(drag.LastMove.X-e.clientX)<2)return;if(event.Callback(event,sendData,this)){drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}};this.TryMouseUp_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_DOC_MOUSE_UP);if(!event||!event.Callback)return;event.Callback(event,sendData,this);};this.UIOnMouseDown=function(e){var _this7=this;this.MoveOnChartDrawPicture=null;if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.ClickDownPoint={X:e.clientX,Y:e.clientY};this.IsOnTouch=true;this.BorderDrag=null;this.YDrag=null;this.UpDownDrag=null;this.RectSelectDrag=null;this.IndexChartDrag=null;this.CustomChartDrag=null;var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;if(this.TryClickButton(x,y,e)){this.IsOnTouch=false;return;}var bDrawDynamicInfo=false;if(this.GlobalOption.SelectedBorder&&this.GlobalOption.SelectedBorder.Mode>=1){var item=this.GlobalOption.SelectedBorder;var frameId=this.Frame.PtInFrame(x,y);if(frameId>=0&&frameId!=item.SelFrame){item.SelFrame=frameId;bDrawDynamicInfo=true;}}var bRedraw=false;if(this.GlobalOption.SelectedXBorder&&this.GlobalOption.SelectedXBorder.Mode>=1){if(this.PtInMulitDayMinute){var item=this.GlobalOption.SelectedXBorder;var selectedDate=this.PtInMulitDayMinute(x,y);if(item.Date!=selectedDate){item.Date=selectedDate;bRedraw=true;}}}if(this.TryClickCrossCursor(x,y,e)){this.IsOnTouch=false;return;}if(this.TryClickChartTooltipData&&this.TryClickChartTooltipData(x,y,e))//预留给外部点击图标什么用的
|
|
1785
|
+
this.TryClickChartCell=function(x,y,e){var result=null;for(var i=0;i<this.ChartPaint.length;++i){var item=this.ChartPaint[i];if(!item.ClickCell)continue;if(item.IsHideScriptIndex())continue;result=item.ClickCell(x,y,e);if(result){result.Chart=item;return result;}}for(var i=0;i<this.OverlayChartPaint.length;++i){var item=this.OverlayChartPaint[i];if(!item.ClickCell)continue;result=item.ClickCell(x,y,e);if(result){result.Chart=item;result.IsOverlayChart=true;return result;}}for(var i=0,j=0,k=0;i<this.Frame.SubFrame.length;++i){var item=this.Frame.SubFrame[i];if(!IFrameSplitOperator.IsNonEmptyArray(item.OverlayIndex))continue;for(j=0;j<item.OverlayIndex.length;++j){var overlayItem=item.OverlayIndex[j];if(!IFrameSplitOperator.IsNonEmptyArray(overlayItem.ChartPaint))continue;for(var k=0;k<overlayItem.ChartPaint.length;++k){var chart=overlayItem.ChartPaint[k];if(!chart.IsShow)continue;if(chart.IsHideScriptIndex())continue;if(chart.ClickCell){result=chart.ClickCell(x,y,e);if(result){result.Chart=chart;result.IsOverlayIndex=true;return result;}}}}}return null;};this.TryMouseMove_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_MOUSE_MOVE);if(!event||!event.Callback)return false;return event.Callback(event,sendData,this);};this.TryClick_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_MOUSE_DOWN);if(!event||!event.Callback)return false;sendData.ChartDrag=null;sendData.Cusrsor=null;event.Callback(event,sendData,this);this.CustomChartDrag=sendData.ChartDrag;this.SetCursor(sendData);};this.TryDragMove_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_DOC_MOUSE_MOVE);if(!event||!event.Callback)return;var e=sendData.e;var drag=sendData.Drag;if(Math.abs(drag.LastMove.Y-e.clientY)<2&&Math.abs(drag.LastMove.X-e.clientX)<2)return;if(event.Callback(event,sendData,this)){drag.LastMove.X=e.clientX;drag.LastMove.Y=e.clientY;}};this.TryMouseUp_CustomChartDrag=function(sendData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_DRAG_DOC_MOUSE_UP);if(!event||!event.Callback)return;event.Callback(event,sendData,this);};this.UIOnMouseDown=function(e){var _this7=this;this.MoveOnChartDrawPicture=null;if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;this.ClickDownPoint={X:e.clientX,Y:e.clientY};this.IsOnTouch=true;this.BorderDrag=null;this.YDrag=null;this.UpDownDrag=null;this.RectSelectDrag=null;this.IndexChartDrag=null;this.CustomChartDrag=null;var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;if(this.TryClickButton(x,y,e)){this.IsOnTouch=false;return;}var bDrawDynamicInfo=false;if(this.GlobalOption.SelectedBorder&&this.GlobalOption.SelectedBorder.Mode>=1){var item=this.GlobalOption.SelectedBorder;var frameId=this.Frame.PtInFrame(x,y);if(frameId>=0&&frameId!=item.SelFrame){item.SelFrame=frameId;bDrawDynamicInfo=true;}}var bRedraw=false;if(this.GlobalOption.SelectedXBorder&&this.GlobalOption.SelectedXBorder.Mode>=1){if(this.PtInMulitDayMinute){var item=this.GlobalOption.SelectedXBorder;var selectedDate=this.PtInMulitDayMinute(x,y);if(item.Date!=selectedDate){item.Date=selectedDate;bRedraw=true;}}}if(this.TryClickCrossCursor(x,y,e)){this.IsOnTouch=false;return;}if(this.TryClickChartTooltipData&&this.TryClickChartTooltipData(x,y,e))//预留给外部点击图标什么用的
|
|
1785
1786
|
{this.IsOnTouch=false;return;}if(this.TryClickLock){//JSConsole.Chart.Log('[uielement.onmousedown] left, top ',e.clientX, e.clientY, this.getBoundingClientRect().left,this.getBoundingClientRect().top);
|
|
1786
1787
|
if(this.TryClickLock(x,y))return;}this.HideSelectRect();this.ClearDragSelectRect();if(this.ChartPictureMenu)this.ChartPictureMenu.Hide();var paint=this.GetRectSelectPaint();if(paint&&paint.GetPointCount()>0){var item=paint.PtInPaint(x,y);if(item){if(item.Type==4){//this.UIElement.style.cursor="pointer";
|
|
1787
1788
|
this.SetCursor({Cursor:"pointer"});var obj={X:e.clientX};if(this.GetXDataIndex(obj)){this.RectSelectDrag={DataIndex:obj.DataIndex,Type:item.Type,X:e.clientX};JSConsole.Chart.Log("[JSChartContainer::UIOnMouseDown] drag sub rect select ",obj);}}else{//this.UIElement.style.cursor="ew-resize";
|
|
@@ -1807,7 +1808,8 @@ var bDraw=false;if(drawPictureActive.Select.Guid&&drawPictureActive.Select.Chart
|
|
|
1807
1808
|
this.SelectChartDrawPicture.DragInfo={Click:{X:e.clientX,Y:e.clientY}};}var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_DRAWPICTURE);//选中画图工具事件
|
|
1808
1809
|
if(event&&event.Callback){var sendData={DrawPicture:drawPictrueData.ChartDrawPicture};event.Callback(event,sendData,this);}else{this.OnSelectChartPicture(drawPictrueData.ChartDrawPicture);//选中画图工具事件
|
|
1809
1810
|
}}else{if(this.ClickChartTimer!=null){clearTimeout(this.ClickChartTimer);this.ClickChartTimer=null;}var self=this;var ptClick={X:this.ClickDownPoint.X,Y:this.ClickDownPoint.Y};this.ClickChartTimer=setTimeout(function(){self.TryClickPaintEvent(JSCHART_EVENT_ID.ON_CLICK_CHART_PAINT,ptClick,e);},250);var bSelectedChartChanged=false;var clickCellData=this.TryClickChartCell(x,y,e);//点击图形子元素
|
|
1810
|
-
if(clickCellData){
|
|
1811
|
+
if(clickCellData){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_CHART_CELL);//点击图形单个元素
|
|
1812
|
+
if(event&&event.Callback){var data={Event:e,CellData:clickCellData};event.Callback(event,data,this);}if(clickCellData.Redraw===true)bRedraw=true;}else{if(this.SelectedChart.EnableSelected)//整体图形选中
|
|
1811
1813
|
{var selectChart=this.PtInChart(x,y);if(selectChart){if(this.SelectedChart.Selected.Identify!=selectChart.Identify){this.SelectedChart.Selected.Identify=selectChart.Identify;this.SelectedChart.Selected.Chart=selectChart.Chart;bSelectedChartChanged=true;}if(this.EnableIndexChartDrag){this.IndexChartDrag={SelectedChart:selectChart,LastMove:{X:x,Y:y},Click:{X:x,Y:y}};this.IndexChartDrag.Info=this.GetSelectedChartInfo(selectChart);if(this.IndexChartDrag.Info)this.IndexChartDrag.Info.FrameID=this.Frame.PtInFrame(x,y);}}else{if(this.SelectedChart.Selected.Identify){this.SelectedChart.Selected.Identify=null;this.SelectedChart.Selected.Chart=null;bSelectedChartChanged=true;}}}else{if(this.SelectedChart.Selected.Identify){this.SelectedChart.Selected.Identify=null;bSelectedChartChanged=true;}}}if(drawPictureActive.Select.Guid!=null&&this.SelectChartDrawPicture==null||bSelectedChartChanged){var drawType=0;if(drawPictureActive.Select.Guid&&drawPictureActive.Select.Chart&&drawPictureActive.Select.Chart.IsDrawMain)drawType=1;if(bSelectedChartChanged){var chart=selectedChart.Chart;if(chart&&chart.SetSelectedStatus){chart.SetSelectedStatus(0);drawType=1;}chart=this.SelectedChart.Selected.Chart;if(chart&&chart.SetSelectedStatus){chart.SetSelectedStatus(1);drawType=1;}}if(drawType==1)this.Draw();else this.DrawDynamicInfo();}else if(bRedraw){this.Draw();}else if(bDrawDynamicInfo){this.DrawDynamicInfo();}}}if(!this.SelectChartDrawPicture)this.CloseModifyDrawDialog();//当前没有选中画图 隐藏画图修改框
|
|
1812
1814
|
document.onmousemove=function(e){_this7.DocOnMouseMove(e);};document.onmouseup=function(e){_this7.DocOnMouseUp(e);};document.oncontextmenu=function(e){_this7.DocContextMenu(e);};};this.IsShfitDragKLine=function(e){if(this.DragMode!=1)return false;if(!this.KLineDragConfig)return false;if(!this.KLineDragConfig.EnableShfit)return false;if(!e.shiftKey)return false;return true;};this.DocOnMouseMove=function(e){//加载数据中,禁用鼠标事件
|
|
1813
1815
|
if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash)return;var bRButtonSelectRect=this.IsEnableRSelectRect(e,"DocOnMouseMove");//右键区间选择
|
|
@@ -1860,7 +1862,8 @@ IsLButton:selectData.IsLButton,IsRButton:selectData.IsRButton,PreventDefault:fal
|
|
|
1860
1862
|
event.Callback(event,sendData,this);if(sendData.PreventDefault==true)return;//已被上层替换,不调用默认的网络请求
|
|
1861
1863
|
aryMenu=sendData.AryMenu;command=sendData.Command;}if(aryMenu)//弹菜单
|
|
1862
1864
|
{this.PopupSelectRectMenuV3(aryMenu,data,e);return;}if(command)//执行命令
|
|
1863
|
-
{this.ExecuteMenuCommand(command.ID,command.Args);return;}this.HideSelectRect();this.UpdateSelectRect(selectData.Start,selectData.End);};this.PopupSelectRectMenuV3=function(aryMenu,data,e){var _this9=this;if(!aryMenu)return;var menuData={Menu:aryMenu,Position:JSPopMenu.POSITION_ID.RIGHT_MENU_ID};menuData.ClickCallback=function(data){_this9.OnClickRightMenu(data);};var x=data.X,y=data.Y;this.PopupMenuByRClick(menuData,x,y);};this.DocContextMenu=function(e){if(this.PreventRightMenu.Enable)e.preventDefault();};this.UIOnMounseOut=function(e){JSConsole.Chart.Log('[KLineChartContainer::UIOnMounseOut]',e);if(
|
|
1865
|
+
{this.ExecuteMenuCommand(command.ID,command.Args);return;}this.HideSelectRect();this.UpdateSelectRect(selectData.Start,selectData.End);};this.PopupSelectRectMenuV3=function(aryMenu,data,e){var _this9=this;if(!aryMenu)return;var menuData={Menu:aryMenu,Position:JSPopMenu.POSITION_ID.RIGHT_MENU_ID};menuData.ClickCallback=function(data){_this9.OnClickRightMenu(data);};var x=data.X,y=data.Y;this.PopupMenuByRClick(menuData,x,y);};this.DocContextMenu=function(e){if(this.PreventRightMenu.Enable)e.preventDefault();};this.UIOnMounseOut=function(e){JSConsole.Chart.Log('[KLineChartContainer::UIOnMounseOut]',e);if(this.EnableClickModel&&this.ClickModel.IsShowCorssCursor==true)return;//点击模式 十字光标显示下 不需要处理
|
|
1866
|
+
if(!this.IsLockCorssCursor())this.UIOnMouseMove(e);//锁十字光标时, 始终显示十字光标
|
|
1864
1867
|
};this.UIOnMouseleave=function(e){JSConsole.Chart.Log('[KLineChartContainer::UIOnMouseleave]',e);//this.UIOnMouseMove(e);
|
|
1865
1868
|
};this.OnDragChart=function(drag){if(!drag)return false;var info=drag.Info;var lastMove=drag.LastMove;var startFrameID=info.FrameID;var endFrameID=this.Frame.PtInFrame(lastMove.X,lastMove.Y);if(endFrameID<0){if(endFrameID==-3)//底部 移动到新的窗口
|
|
1866
1869
|
return this.MoveIndexToNewWindow({WindowIndex:startFrameID,IndexID:info.IndexID},{Operator:0});return false;}if(startFrameID==endFrameID)return false;//移动指标
|
|
@@ -1880,9 +1883,9 @@ for(var i=0;i<e.touches.length;++i){var item=e.touches[i];if(isForceLandscape){t
|
|
|
1880
1883
|
{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)//计算角度
|
|
1881
1884
|
{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;};//手机拖拽
|
|
1882
1885
|
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)//指标枷锁区域 , 指标标题点击
|
|
1883
|
-
{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;}if(this.TryClickCrossCursor(x,y)){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;
|
|
1886
|
+
{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;}if(this.TryClickCrossCursor(x,y)){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.ClickModel.IsClickButton=false;this.ClickModel.PreventHide=false;this.StopDragTimer();var isSingleTouch=this.IsSingleTouch(e);if(this.EnableScrollUpDown==false||!isSingleTouch||//多点触屏
|
|
1884
1887
|
this.DragMode==JSCHART_DRAG_ID.CLICK_TOUCH_MODE_ID&&this.TouchStatus.CorssCursorShow==true)//十字光标显示,不能滚动页面
|
|
1885
|
-
{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 最后移动的位置
|
|
1888
|
+
{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)){this.ClickModel.IsClickButton=true;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 最后移动的位置
|
|
1886
1889
|
var touchDrag={Click:{},LastMove:{},StartTime:Date.now()};//var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
1887
1890
|
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();//上一次选中的
|
|
1888
1891
|
var selectedChart={Chart:this.SelectedChart.Selected.Chart,Identify:this.SelectedChart.Selected.Identify};//上一次选中的图形
|
|
@@ -1896,7 +1899,7 @@ var self=this;this.DragTimer=setTimeout(function(){self.IsPress=true;if(drag.Cli
|
|
|
1896
1899
|
if(self.EnableClickModel===true)self.ClickModel.IsShowCorssCursor=true;self.MoveCorssCursor(drag.Click,e);//移动十字光标
|
|
1897
1900
|
}},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)
|
|
1898
1901
|
}else if(this.VerticalDrag){if(!this.VerticalDrag.IsDrag)this.MoveCorssCursor(drag.Click,e);//没有点击X轴, 就显示十字光标
|
|
1899
|
-
}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计算
|
|
1902
|
+
}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);this.ClickModel.IsClickButton=false;if(this.IsPhoneDragging(e)){var drag=this.MouseDrag;if(drag==null){if(this.IsForceLandscape)y=uielement.getBoundingClientRect().width-touches[0].clientY;//强制横屏Y计算
|
|
1900
1903
|
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;//是否移动十字光标
|
|
1901
1904
|
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}`);
|
|
1902
1905
|
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)//画图工具移动
|
|
@@ -14789,7 +14792,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
14789
14792
|
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);};}/********************************************************************************
|
|
14790
14793
|
* 版本信息输出
|
|
14791
14794
|
*
|
|
14792
|
-
*/var HQCHART_VERSION="1.1.
|
|
14795
|
+
*/var HQCHART_VERSION="1.1.14717";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();//把给外界调用的方法暴露出来
|
|
14793
14796
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
14794
14797
|
// BaseIndex:BaseIndex,
|
|
14795
14798
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -2773,6 +2773,8 @@ var JSCHART_EVENT_ID=
|
|
|
2773
2773
|
ON_TOUCH_FAST_SLIDE:169, //快速滑动
|
|
2774
2774
|
|
|
2775
2775
|
ON_CLICK_CROSSCURSOR_BOTTOM:170, //十字光标底部文字点击
|
|
2776
|
+
|
|
2777
|
+
ON_CLICK_CHART_CELL:171, //点击图形单元
|
|
2776
2778
|
}
|
|
2777
2779
|
|
|
2778
2780
|
var JSCHART_OPERATOR_ID=
|
|
@@ -3204,7 +3206,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3204
3206
|
this.EnableVerticalDrag=false;
|
|
3205
3207
|
|
|
3206
3208
|
//十字光标长留(手势才有)
|
|
3207
|
-
this.ClickModel={ IsShowCorssCursor:false, PreventHide:false }; //PreventHide 阻止隐藏十字光标
|
|
3209
|
+
this.ClickModel={ IsShowCorssCursor:false, PreventHide:false, IsClickButton:false }; //PreventHide 阻止隐藏十字光标
|
|
3208
3210
|
this.EnableClickModel=false;
|
|
3209
3211
|
|
|
3210
3212
|
//标题栏显示最新数据
|
|
@@ -3686,6 +3688,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3686
3688
|
if (this.IndexChartDrag) return;
|
|
3687
3689
|
if (this.CustomChartDrag) return;
|
|
3688
3690
|
//if (this.RectSelectDrag) return;
|
|
3691
|
+
if (this.EnableClickModel && this.ClickModel.IsClickButton) return;
|
|
3689
3692
|
|
|
3690
3693
|
/*
|
|
3691
3694
|
if (this.CurrentChartDrawPicture)
|
|
@@ -3902,7 +3905,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3902
3905
|
if (item.IsHideScriptIndex()) continue;
|
|
3903
3906
|
|
|
3904
3907
|
result=item.ClickCell(x,y,e);
|
|
3905
|
-
if (result)
|
|
3908
|
+
if (result)
|
|
3909
|
+
{
|
|
3910
|
+
result.Chart=item;
|
|
3911
|
+
return result;
|
|
3912
|
+
}
|
|
3906
3913
|
}
|
|
3907
3914
|
|
|
3908
3915
|
for(var i=0;i<this.OverlayChartPaint.length;++i)
|
|
@@ -3911,7 +3918,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3911
3918
|
if (!item.ClickCell) continue;
|
|
3912
3919
|
|
|
3913
3920
|
result=item.ClickCell(x,y,e);
|
|
3914
|
-
if (result)
|
|
3921
|
+
if (result)
|
|
3922
|
+
{
|
|
3923
|
+
result.Chart=item;
|
|
3924
|
+
result.IsOverlayChart=true;
|
|
3925
|
+
return result;
|
|
3926
|
+
}
|
|
3915
3927
|
}
|
|
3916
3928
|
|
|
3917
3929
|
for(var i=0,j=0,k=0;i<this.Frame.SubFrame.length;++i)
|
|
@@ -3932,7 +3944,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3932
3944
|
if (chart.ClickCell)
|
|
3933
3945
|
{
|
|
3934
3946
|
result=chart.ClickCell(x,y,e);
|
|
3935
|
-
if (result)
|
|
3947
|
+
if (result)
|
|
3948
|
+
{
|
|
3949
|
+
result.Chart=chart;
|
|
3950
|
+
result.IsOverlayIndex=true;
|
|
3951
|
+
return result;
|
|
3952
|
+
}
|
|
3936
3953
|
}
|
|
3937
3954
|
}
|
|
3938
3955
|
}
|
|
@@ -4256,6 +4273,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4256
4273
|
|
|
4257
4274
|
if (clickCellData)
|
|
4258
4275
|
{
|
|
4276
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_CHART_CELL); //点击图形单个元素
|
|
4277
|
+
if (event && event.Callback)
|
|
4278
|
+
{
|
|
4279
|
+
var data={ Event:e, CellData:clickCellData };
|
|
4280
|
+
event.Callback(event,data,this);
|
|
4281
|
+
}
|
|
4282
|
+
|
|
4259
4283
|
if (clickCellData.Redraw===true) bRedraw=true;
|
|
4260
4284
|
}
|
|
4261
4285
|
else
|
|
@@ -4953,6 +4977,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4953
4977
|
this.UIOnMounseOut=function(e)
|
|
4954
4978
|
{
|
|
4955
4979
|
JSConsole.Chart.Log('[KLineChartContainer::UIOnMounseOut]',e);
|
|
4980
|
+
if (this.EnableClickModel && this.ClickModel.IsShowCorssCursor==true) return; //点击模式 十字光标显示下 不需要处理
|
|
4981
|
+
|
|
4956
4982
|
if (!this.IsLockCorssCursor()) this.UIOnMouseMove(e); //锁十字光标时, 始终显示十字光标
|
|
4957
4983
|
}
|
|
4958
4984
|
|
|
@@ -5372,7 +5398,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5372
5398
|
this.TouchDrawCount=0;
|
|
5373
5399
|
this.PhonePinch=null;
|
|
5374
5400
|
this.TouchDrag=null;
|
|
5375
|
-
|
|
5401
|
+
this.ClickModel.IsClickButton=false;
|
|
5402
|
+
this.ClickModel.PreventHide=false;
|
|
5403
|
+
|
|
5404
|
+
|
|
5376
5405
|
this.StopDragTimer();
|
|
5377
5406
|
|
|
5378
5407
|
var isSingleTouch=this.IsSingleTouch(e);
|
|
@@ -5388,8 +5417,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5388
5417
|
var pt=this.PointAbsoluteToRelative(touches[0].clientX, touches[0].clientY, true);
|
|
5389
5418
|
|
|
5390
5419
|
if (this.TryPhoneClickButton(pt.X, pt.Y, e))
|
|
5420
|
+
{
|
|
5421
|
+
this.ClickModel.IsClickButton=true;
|
|
5391
5422
|
return;
|
|
5392
|
-
|
|
5423
|
+
}
|
|
5424
|
+
|
|
5393
5425
|
if (this.EnableVerticalDrag )
|
|
5394
5426
|
{
|
|
5395
5427
|
this.VerticalDrag={ IsDrag:false };
|
|
@@ -5574,6 +5606,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5574
5606
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
5575
5607
|
|
|
5576
5608
|
var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
5609
|
+
this.ClickModel.IsClickButton=false;
|
|
5577
5610
|
|
|
5578
5611
|
if (this.IsPhoneDragging(e))
|
|
5579
5612
|
{
|
|
@@ -6869,6 +6869,8 @@ var JSCHART_EVENT_ID=
|
|
|
6869
6869
|
ON_TOUCH_FAST_SLIDE:169, //快速滑动
|
|
6870
6870
|
|
|
6871
6871
|
ON_CLICK_CROSSCURSOR_BOTTOM:170, //十字光标底部文字点击
|
|
6872
|
+
|
|
6873
|
+
ON_CLICK_CHART_CELL:171, //点击图形单元
|
|
6872
6874
|
}
|
|
6873
6875
|
|
|
6874
6876
|
var JSCHART_OPERATOR_ID=
|
|
@@ -7300,7 +7302,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7300
7302
|
this.EnableVerticalDrag=false;
|
|
7301
7303
|
|
|
7302
7304
|
//十字光标长留(手势才有)
|
|
7303
|
-
this.ClickModel={ IsShowCorssCursor:false, PreventHide:false }; //PreventHide 阻止隐藏十字光标
|
|
7305
|
+
this.ClickModel={ IsShowCorssCursor:false, PreventHide:false, IsClickButton:false }; //PreventHide 阻止隐藏十字光标
|
|
7304
7306
|
this.EnableClickModel=false;
|
|
7305
7307
|
|
|
7306
7308
|
//标题栏显示最新数据
|
|
@@ -7782,6 +7784,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7782
7784
|
if (this.IndexChartDrag) return;
|
|
7783
7785
|
if (this.CustomChartDrag) return;
|
|
7784
7786
|
//if (this.RectSelectDrag) return;
|
|
7787
|
+
if (this.EnableClickModel && this.ClickModel.IsClickButton) return;
|
|
7785
7788
|
|
|
7786
7789
|
/*
|
|
7787
7790
|
if (this.CurrentChartDrawPicture)
|
|
@@ -7998,7 +8001,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7998
8001
|
if (item.IsHideScriptIndex()) continue;
|
|
7999
8002
|
|
|
8000
8003
|
result=item.ClickCell(x,y,e);
|
|
8001
|
-
if (result)
|
|
8004
|
+
if (result)
|
|
8005
|
+
{
|
|
8006
|
+
result.Chart=item;
|
|
8007
|
+
return result;
|
|
8008
|
+
}
|
|
8002
8009
|
}
|
|
8003
8010
|
|
|
8004
8011
|
for(var i=0;i<this.OverlayChartPaint.length;++i)
|
|
@@ -8007,7 +8014,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8007
8014
|
if (!item.ClickCell) continue;
|
|
8008
8015
|
|
|
8009
8016
|
result=item.ClickCell(x,y,e);
|
|
8010
|
-
if (result)
|
|
8017
|
+
if (result)
|
|
8018
|
+
{
|
|
8019
|
+
result.Chart=item;
|
|
8020
|
+
result.IsOverlayChart=true;
|
|
8021
|
+
return result;
|
|
8022
|
+
}
|
|
8011
8023
|
}
|
|
8012
8024
|
|
|
8013
8025
|
for(var i=0,j=0,k=0;i<this.Frame.SubFrame.length;++i)
|
|
@@ -8028,7 +8040,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8028
8040
|
if (chart.ClickCell)
|
|
8029
8041
|
{
|
|
8030
8042
|
result=chart.ClickCell(x,y,e);
|
|
8031
|
-
if (result)
|
|
8043
|
+
if (result)
|
|
8044
|
+
{
|
|
8045
|
+
result.Chart=chart;
|
|
8046
|
+
result.IsOverlayIndex=true;
|
|
8047
|
+
return result;
|
|
8048
|
+
}
|
|
8032
8049
|
}
|
|
8033
8050
|
}
|
|
8034
8051
|
}
|
|
@@ -8352,6 +8369,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8352
8369
|
|
|
8353
8370
|
if (clickCellData)
|
|
8354
8371
|
{
|
|
8372
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_CHART_CELL); //点击图形单个元素
|
|
8373
|
+
if (event && event.Callback)
|
|
8374
|
+
{
|
|
8375
|
+
var data={ Event:e, CellData:clickCellData };
|
|
8376
|
+
event.Callback(event,data,this);
|
|
8377
|
+
}
|
|
8378
|
+
|
|
8355
8379
|
if (clickCellData.Redraw===true) bRedraw=true;
|
|
8356
8380
|
}
|
|
8357
8381
|
else
|
|
@@ -9049,6 +9073,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9049
9073
|
this.UIOnMounseOut=function(e)
|
|
9050
9074
|
{
|
|
9051
9075
|
JSConsole.Chart.Log('[KLineChartContainer::UIOnMounseOut]',e);
|
|
9076
|
+
if (this.EnableClickModel && this.ClickModel.IsShowCorssCursor==true) return; //点击模式 十字光标显示下 不需要处理
|
|
9077
|
+
|
|
9052
9078
|
if (!this.IsLockCorssCursor()) this.UIOnMouseMove(e); //锁十字光标时, 始终显示十字光标
|
|
9053
9079
|
}
|
|
9054
9080
|
|
|
@@ -9468,7 +9494,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9468
9494
|
this.TouchDrawCount=0;
|
|
9469
9495
|
this.PhonePinch=null;
|
|
9470
9496
|
this.TouchDrag=null;
|
|
9471
|
-
|
|
9497
|
+
this.ClickModel.IsClickButton=false;
|
|
9498
|
+
this.ClickModel.PreventHide=false;
|
|
9499
|
+
|
|
9500
|
+
|
|
9472
9501
|
this.StopDragTimer();
|
|
9473
9502
|
|
|
9474
9503
|
var isSingleTouch=this.IsSingleTouch(e);
|
|
@@ -9484,8 +9513,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9484
9513
|
var pt=this.PointAbsoluteToRelative(touches[0].clientX, touches[0].clientY, true);
|
|
9485
9514
|
|
|
9486
9515
|
if (this.TryPhoneClickButton(pt.X, pt.Y, e))
|
|
9516
|
+
{
|
|
9517
|
+
this.ClickModel.IsClickButton=true;
|
|
9487
9518
|
return;
|
|
9488
|
-
|
|
9519
|
+
}
|
|
9520
|
+
|
|
9489
9521
|
if (this.EnableVerticalDrag )
|
|
9490
9522
|
{
|
|
9491
9523
|
this.VerticalDrag={ IsDrag:false };
|
|
@@ -9670,6 +9702,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9670
9702
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
9671
9703
|
|
|
9672
9704
|
var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
9705
|
+
this.ClickModel.IsClickButton=false;
|
|
9673
9706
|
|
|
9674
9707
|
if (this.IsPhoneDragging(e))
|
|
9675
9708
|
{
|
|
@@ -147890,7 +147923,7 @@ function ScrollBarBGChart()
|
|
|
147890
147923
|
|
|
147891
147924
|
|
|
147892
147925
|
|
|
147893
|
-
var HQCHART_VERSION="1.1.
|
|
147926
|
+
var HQCHART_VERSION="1.1.14717";
|
|
147894
147927
|
|
|
147895
147928
|
function PrintHQChartVersion()
|
|
147896
147929
|
{
|
|
@@ -6913,6 +6913,8 @@ var JSCHART_EVENT_ID=
|
|
|
6913
6913
|
ON_TOUCH_FAST_SLIDE:169, //快速滑动
|
|
6914
6914
|
|
|
6915
6915
|
ON_CLICK_CROSSCURSOR_BOTTOM:170, //十字光标底部文字点击
|
|
6916
|
+
|
|
6917
|
+
ON_CLICK_CHART_CELL:171, //点击图形单元
|
|
6916
6918
|
}
|
|
6917
6919
|
|
|
6918
6920
|
var JSCHART_OPERATOR_ID=
|
|
@@ -7344,7 +7346,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7344
7346
|
this.EnableVerticalDrag=false;
|
|
7345
7347
|
|
|
7346
7348
|
//十字光标长留(手势才有)
|
|
7347
|
-
this.ClickModel={ IsShowCorssCursor:false, PreventHide:false }; //PreventHide 阻止隐藏十字光标
|
|
7349
|
+
this.ClickModel={ IsShowCorssCursor:false, PreventHide:false, IsClickButton:false }; //PreventHide 阻止隐藏十字光标
|
|
7348
7350
|
this.EnableClickModel=false;
|
|
7349
7351
|
|
|
7350
7352
|
//标题栏显示最新数据
|
|
@@ -7826,6 +7828,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7826
7828
|
if (this.IndexChartDrag) return;
|
|
7827
7829
|
if (this.CustomChartDrag) return;
|
|
7828
7830
|
//if (this.RectSelectDrag) return;
|
|
7831
|
+
if (this.EnableClickModel && this.ClickModel.IsClickButton) return;
|
|
7829
7832
|
|
|
7830
7833
|
/*
|
|
7831
7834
|
if (this.CurrentChartDrawPicture)
|
|
@@ -8042,7 +8045,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8042
8045
|
if (item.IsHideScriptIndex()) continue;
|
|
8043
8046
|
|
|
8044
8047
|
result=item.ClickCell(x,y,e);
|
|
8045
|
-
if (result)
|
|
8048
|
+
if (result)
|
|
8049
|
+
{
|
|
8050
|
+
result.Chart=item;
|
|
8051
|
+
return result;
|
|
8052
|
+
}
|
|
8046
8053
|
}
|
|
8047
8054
|
|
|
8048
8055
|
for(var i=0;i<this.OverlayChartPaint.length;++i)
|
|
@@ -8051,7 +8058,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8051
8058
|
if (!item.ClickCell) continue;
|
|
8052
8059
|
|
|
8053
8060
|
result=item.ClickCell(x,y,e);
|
|
8054
|
-
if (result)
|
|
8061
|
+
if (result)
|
|
8062
|
+
{
|
|
8063
|
+
result.Chart=item;
|
|
8064
|
+
result.IsOverlayChart=true;
|
|
8065
|
+
return result;
|
|
8066
|
+
}
|
|
8055
8067
|
}
|
|
8056
8068
|
|
|
8057
8069
|
for(var i=0,j=0,k=0;i<this.Frame.SubFrame.length;++i)
|
|
@@ -8072,7 +8084,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8072
8084
|
if (chart.ClickCell)
|
|
8073
8085
|
{
|
|
8074
8086
|
result=chart.ClickCell(x,y,e);
|
|
8075
|
-
if (result)
|
|
8087
|
+
if (result)
|
|
8088
|
+
{
|
|
8089
|
+
result.Chart=chart;
|
|
8090
|
+
result.IsOverlayIndex=true;
|
|
8091
|
+
return result;
|
|
8092
|
+
}
|
|
8076
8093
|
}
|
|
8077
8094
|
}
|
|
8078
8095
|
}
|
|
@@ -8396,6 +8413,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8396
8413
|
|
|
8397
8414
|
if (clickCellData)
|
|
8398
8415
|
{
|
|
8416
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CLICK_CHART_CELL); //点击图形单个元素
|
|
8417
|
+
if (event && event.Callback)
|
|
8418
|
+
{
|
|
8419
|
+
var data={ Event:e, CellData:clickCellData };
|
|
8420
|
+
event.Callback(event,data,this);
|
|
8421
|
+
}
|
|
8422
|
+
|
|
8399
8423
|
if (clickCellData.Redraw===true) bRedraw=true;
|
|
8400
8424
|
}
|
|
8401
8425
|
else
|
|
@@ -9093,6 +9117,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9093
9117
|
this.UIOnMounseOut=function(e)
|
|
9094
9118
|
{
|
|
9095
9119
|
JSConsole.Chart.Log('[KLineChartContainer::UIOnMounseOut]',e);
|
|
9120
|
+
if (this.EnableClickModel && this.ClickModel.IsShowCorssCursor==true) return; //点击模式 十字光标显示下 不需要处理
|
|
9121
|
+
|
|
9096
9122
|
if (!this.IsLockCorssCursor()) this.UIOnMouseMove(e); //锁十字光标时, 始终显示十字光标
|
|
9097
9123
|
}
|
|
9098
9124
|
|
|
@@ -9512,7 +9538,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9512
9538
|
this.TouchDrawCount=0;
|
|
9513
9539
|
this.PhonePinch=null;
|
|
9514
9540
|
this.TouchDrag=null;
|
|
9515
|
-
|
|
9541
|
+
this.ClickModel.IsClickButton=false;
|
|
9542
|
+
this.ClickModel.PreventHide=false;
|
|
9543
|
+
|
|
9544
|
+
|
|
9516
9545
|
this.StopDragTimer();
|
|
9517
9546
|
|
|
9518
9547
|
var isSingleTouch=this.IsSingleTouch(e);
|
|
@@ -9528,8 +9557,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9528
9557
|
var pt=this.PointAbsoluteToRelative(touches[0].clientX, touches[0].clientY, true);
|
|
9529
9558
|
|
|
9530
9559
|
if (this.TryPhoneClickButton(pt.X, pt.Y, e))
|
|
9560
|
+
{
|
|
9561
|
+
this.ClickModel.IsClickButton=true;
|
|
9531
9562
|
return;
|
|
9532
|
-
|
|
9563
|
+
}
|
|
9564
|
+
|
|
9533
9565
|
if (this.EnableVerticalDrag )
|
|
9534
9566
|
{
|
|
9535
9567
|
this.VerticalDrag={ IsDrag:false };
|
|
@@ -9714,6 +9746,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9714
9746
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
9715
9747
|
|
|
9716
9748
|
var touches=this.GetToucheData(e,this.IsForceLandscape);
|
|
9749
|
+
this.ClickModel.IsClickButton=false;
|
|
9717
9750
|
|
|
9718
9751
|
if (this.IsPhoneDragging(e))
|
|
9719
9752
|
{
|
|
@@ -158705,7 +158738,7 @@ function HQChartScriptWorker()
|
|
|
158705
158738
|
|
|
158706
158739
|
|
|
158707
158740
|
|
|
158708
|
-
var HQCHART_VERSION="1.1.
|
|
158741
|
+
var HQCHART_VERSION="1.1.14717";
|
|
158709
158742
|
|
|
158710
158743
|
function PrintHQChartVersion()
|
|
158711
158744
|
{
|