hqchart 1.1.12790 → 1.1.12798
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 +18 -12
- package/package.json +1 -1
- package/src/jscommon/umychart.complier.js +1 -1
- package/src/jscommon/umychart.js +177 -104
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +179 -106
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +179 -106
package/lib/umychart.vue.js
CHANGED
|
@@ -1357,7 +1357,7 @@ for(var i=0;i<chart.Frame.SubFrame.length;++i){chart.Frame.SubFrame[i].Frame.Cha
|
|
|
1357
1357
|
};this.SetChartBorder=function(chart,option){if(!option.Border)return;var item=option.Border;if(IFrameSplitOperator.IsNumber(option.Border.Left))chart.Frame.ChartBorder.Left=option.Border.Left;else option.Border.Left=chart.Frame.ChartBorder.Left;if(IFrameSplitOperator.IsNumber(option.Border.Right))chart.Frame.ChartBorder.Right=option.Border.Right;else option.Border.Right=chart.Frame.ChartBorder.Right;if(IFrameSplitOperator.IsNumber(option.Border.Top))chart.Frame.ChartBorder.Top=option.Border.Top;else option.Border.Top=chart.Frame.ChartBorder.Top;if(IFrameSplitOperator.IsNumber(option.Border.Bottom))chart.Frame.ChartBorder.Bottom=option.Border.Bottom;else option.Border.Bottom=chart.Frame.ChartBorder.Bottom;if(item.AutoLeft){chart.Frame.AutoLeftBorder={};if(IFrameSplitOperator.IsNumber(item.AutoLeft.Blank))chart.Frame.AutoLeftBorder.Blank=item.AutoLeft.Blank;if(IFrameSplitOperator.IsNumber(item.AutoLeft.MinWidth))chart.Frame.AutoLeftBorder.MinWidth=item.AutoLeft.MinWidth;}if(item.AutoRight){chart.Frame.AutoRightBorder={};if(IFrameSplitOperator.IsNumber(item.AutoRight.Blank))chart.Frame.AutoRightBorder.Blank=item.AutoRight.Blank;if(IFrameSplitOperator.IsNumber(item.AutoRight.MinWidth))chart.Frame.AutoRightBorder.MinWidth=item.AutoRight.MinWidth;}};this.SetEventCallback=function(chart,aryCallback){if(!chart)return;if(!IFrameSplitOperator.IsNonEmptyArray(aryCallback))return;for(var i=0;i<aryCallback.length;++i){var item=aryCallback[i];chart.AddEventCallback(item);}};//历史K线图
|
|
1358
1358
|
this.CreateKLineChartContainer=function(option){var _this2=this;var chart=null;if(option.Type==="历史K线图横屏")chart=new KLineChartHScreenContainer(this.CanvasElement);else chart=new KLineChartContainer(this.CanvasElement,this.OffscreenCanvasElement,this.CacheCanvasElement);chart.GetExtraCanvas=function(name){return _this2.GetExtraCanvas(name);};var extraElement=this.GetExtraCanvas(JSChart.CorssCursorCanvasKey);if(extraElement)chart.SetCorssCursorElement(extraElement);if(option.EventCallback)this.SetEventCallback(chart,option.EventCallback);if(option.NetworkFilter)chart.NetworkFilter=option.NetworkFilter;//创建改参数div
|
|
1359
1359
|
chart.ModifyIndexDialog=this.ModifyIndexDialog;chart.ChangeIndexDialog=this.ChangeIndexDialog;chart.MinuteDialog=this.MinuteDialog;//右键菜单
|
|
1360
|
-
if(option.IsShowRightMenu==true)chart.RightMenu=new KLineRightMenu(this.DivElement);if(option.ScriptError)chart.ScriptErrorCallback=option.ScriptError;chart.SelectRectRightMenu=new KLineSelectRightMenu(this.DivElement);if(option.EnableScrollUpDown==true)chart.EnableScrollUpDown=option.EnableScrollUpDown;if(option.DisableMouse==true)chart.DisableMouse=option.DisableMouse;if(option.TouchMoveMinAngle)chart.TouchMoveMinAngle=option.TouchMoveMinAngle;if(option.EnableZoomUpDown)chart.EnableZoomUpDown=option.EnableZoomUpDown;if(IFrameSplitOperator.IsString(option.SplashTitle))chart.LoadDataSplashTitle=option.SplashTitle;if(IFrameSplitOperator.IsBool(option.EnableZoomIndexWindow))chart.EnableZoomIndexWindow=option.EnableZoomIndexWindow;if(IFrameSplitOperator.IsBool(option.IsDrawPictureXY))chart.IsDrawPictureXY=option.IsDrawPictureXY;if(IFrameSplitOperator.IsNumber(option.CtrlMoveStep))chart.CtrlMoveStep=option.CtrlMoveStep;if(IFrameSplitOperator.IsBool(option.EnableIndexChartDrag))chart.EnableIndexChartDrag=option.EnableIndexChartDrag;if(IFrameSplitOperator.IsBool(option.EnableVerifyRecvData))chart.EnableVerifyRecvData=option.EnableVerifyRecvData;if(option.GlobalOption){var item=option.GlobalOption;if(IFrameSplitOperator.IsBool(item.IsValueFullRange))chart.GlobalOption.IsValueFullRange=item.IsValueFullRange;if(item.SelectedBorder){var subItem=item.SelectedBorder;if(IFrameSplitOperator.IsNumber(subItem.Mode))chart.GlobalOption.SelectedBorder.Mode=subItem.Mode;}}if(option.EnableYDrag){var item=option.EnableYDrag;if(IFrameSplitOperator.IsBool(item.Left))chart.EnableYDrag.Left=item.Left;if(IFrameSplitOperator.IsBool(item.Right))chart.EnableYDrag.Right=item.Right;}if(option.KLine)//k线图的属性设置
|
|
1360
|
+
if(option.IsShowRightMenu==true)chart.RightMenu=new KLineRightMenu(this.DivElement);if(option.ScriptError)chart.ScriptErrorCallback=option.ScriptError;chart.SelectRectRightMenu=new KLineSelectRightMenu(this.DivElement);if(option.EnableScrollUpDown==true)chart.EnableScrollUpDown=option.EnableScrollUpDown;if(option.DisableMouse==true)chart.DisableMouse=option.DisableMouse;if(option.TouchMoveMinAngle)chart.TouchMoveMinAngle=option.TouchMoveMinAngle;if(option.EnableZoomUpDown)chart.EnableZoomUpDown=option.EnableZoomUpDown;if(IFrameSplitOperator.IsString(option.SplashTitle))chart.LoadDataSplashTitle=option.SplashTitle;if(IFrameSplitOperator.IsBool(option.EnableZoomIndexWindow))chart.EnableZoomIndexWindow=option.EnableZoomIndexWindow;if(IFrameSplitOperator.IsBool(option.IsDrawPictureXY))chart.IsDrawPictureXY=option.IsDrawPictureXY;if(IFrameSplitOperator.IsNumber(option.CtrlMoveStep))chart.CtrlMoveStep=option.CtrlMoveStep;if(IFrameSplitOperator.IsBool(option.EnableIndexChartDrag))chart.EnableIndexChartDrag=option.EnableIndexChartDrag;if(IFrameSplitOperator.IsBool(option.EnableVerifyRecvData))chart.EnableVerifyRecvData=option.EnableVerifyRecvData;if(option.GlobalOption){var item=option.GlobalOption;if(IFrameSplitOperator.IsBool(item.IsValueFullRange))chart.GlobalOption.IsValueFullRange=item.IsValueFullRange;if(item.SelectedBorder){var subItem=item.SelectedBorder;if(IFrameSplitOperator.IsNumber(subItem.Mode))chart.GlobalOption.SelectedBorder.Mode=subItem.Mode;}}if(option.EnableYDrag){var item=option.EnableYDrag;if(IFrameSplitOperator.IsBool(item.Left))chart.EnableYDrag.Left=item.Left;if(IFrameSplitOperator.IsBool(item.Right))chart.EnableYDrag.Right=item.Right;if(IFrameSplitOperator.IsBool(item.Wheel))chart.EnableYDrag.Wheel=item.Wheel;if(IFrameSplitOperator.IsNumber(item.WheelYMove))chart.EnableYDrag.WheelYMove=item.WheelYMove;}if(option.KLine)//k线图的属性设置
|
|
1361
1361
|
{if(option.KLine.DragMode>=0)chart.DragMode=option.KLine.DragMode;if(option.KLine.Right>=0)chart.Right=option.KLine.Right;if(option.KLine.Period>=0)chart.Period=option.KLine.Period;if(option.KLine.MaxReqeustDataCount>0)chart.MaxRequestDataCount=option.KLine.MaxReqeustDataCount;//兼容老版本
|
|
1362
1362
|
if(option.KLine.MaxRequestDataCount>0)chart.MaxRequestDataCount=option.KLine.MaxRequestDataCount;if(option.KLine.Info&&option.KLine.Info.length>0)chart.SetKLineInfo(option.KLine.Info,false);if(option.KLine.KLineDoubleClick==false)chart.MinuteDialog=this.MinuteDialog=null;if(option.KLine.IsShowTooltip==false)chart.IsShowTooltip=false;if(option.KLine.MaxRequestMinuteDayCount>0)chart.MaxRequestMinuteDayCount=option.KLine.MaxRequestMinuteDayCount;if(option.KLine.DrawType)chart.KLineDrawType=option.KLine.DrawType;if(option.KLine.FirstShowDate>19910101)chart.CustomShow={Date:option.KLine.FirstShowDate,PageSize:option.KLine.PageSize};if(option.KLine.RightSpaceCount>0)chart.RightSpaceCount=option.KLine.RightSpaceCount;if(option.KLine.ZoomType>0)chart.ZoomType=option.KLine.ZoomType;if(option.KLine.DataWidth>=1)chart.KLineSize={DataWidth:option.KLine.DataWidth};if(IFrameSplitOperator.IsNumber(option.KLine.RightFormula))chart.RightFormula=option.KLine.RightFormula;}if(option.EnableFlowCapital){var item=option.EnableFlowCapital;if(item.BIT==true)chart.EnableFlowCapital.BIT=item.BIT;}if(IFrameSplitOperator.IsBool(option.EnableBorderDrag)){chart.EnableBorderDrag=option.EnableBorderDrag;}if(option.Page){if(option.Page.Day&&option.Page.Day.Enable==true)chart.Page.Day.Enable=true;if(option.Page.Minute&&option.Page.Minute.Enable==true)chart.Page.Minute.Enable=true;}if(option.DragDownload){if(option.DragDownload.Day&&option.DragDownload.Day.Enable==true)chart.DragDownload.Day.Enable=true;if(option.DragDownload.Minute&&option.DragDownload.Minute.Enable==true)chart.DragDownload.Minute.Enable=true;}if(option.ZoomDownload){if(option.ZoomDownload.Day&&IFrameSplitOperator.IsBool(option.ZoomDownload.Day.Enable))chart.ZoomDownload.Day.Enable=option.ZoomDownload.Day.Enable;if(option.ZoomDownload.Minute&&IFrameSplitOperator.IsBool(option.ZoomDownload.Minute.Enable))chart.ZoomDownload.Minute.Enable=option.ZoomDownload.Minute.Enable;}if(option.Language){var value=g_JSChartLocalization.GetLanguageID(option.Language);if(IFrameSplitOperator.IsNumber(value))chart.LanguageID=value;}if(option.SourceDatatLimit)chart.SetSourceDatatLimit(option.SourceDatatLimit);if(option.DrawPicture)//画图工具
|
|
1363
1363
|
{if(option.DrawPicture.StorageKey&&chart.ChartDrawStorage)chart.ChartDrawStorage.Load(option.DrawPicture.StorageKey);}if(option.DrawTool)//画图工具
|
|
@@ -1512,7 +1512,8 @@ JSChart.SetTextResource=function(key,value){g_JSChartLocalization.SetTextResourc
|
|
|
1512
1512
|
JSChart.GetLocalization=function(){return g_JSChartLocalization;};//获取设备分辨率比
|
|
1513
1513
|
JSChart.GetDevicePixelRatio=function(){return GetDevicePixelRatio();};JSChart.CreateGuid=function(){return Guid();};JSChart.GetResource=function()//获取颜色配置 (设置配必须啊在JSChart.Init()之前)
|
|
1514
1514
|
{return g_JSChartResource;};JSChart.GetMinuteTimeStringData=function(){return g_MinuteTimeStringData;};JSChart.GetMinuteCoordinateData=function(){return g_MinuteCoordinateData;};JSChart.GetKLineZoom=function()//K线缩放配置
|
|
1515
|
-
{return ZOOM_SEED;};JSChart.
|
|
1515
|
+
{return ZOOM_SEED;};JSChart.SetKLineZoom=function(aryZoom)//设置K线缩放比例
|
|
1516
|
+
{ZOOM_SEED=aryZoom;};JSChart.GetDivTooltipDataFormat=function()//div tooltip数据格式化
|
|
1516
1517
|
{return g_DivTooltipDataForamt;};JSChart.GetKLineCustomCalulate=function()//K线额外计算
|
|
1517
1518
|
{return g_KLineCustomCalulate;};JSChart.SetUSATimeType=function(type)//设置 0=标准时间 1=夏令时间 3=美国时间
|
|
1518
1519
|
{g_NYMEXTimeData.TimeType=type;g_COMEXTimeData.TimeType=type;g_NYBOTTimeData.TimeType=type;g_CBOTTimeData.TimeType=type;};JSChart.GetChinaFuturesTimeData=function()//获取国内期货交易时间配置
|
|
@@ -1627,7 +1628,8 @@ ON_RECV_REALTIME_DATA:109,//实时数据
|
|
|
1627
1628
|
ON_CUSTOM_OVERLAY_TOOLBAR:110,//自定义叠加指标按钮
|
|
1628
1629
|
//绘图之前的事件
|
|
1629
1630
|
ON_BEFORE_DRAW:111,ON_BEFORE_DRAW_DYNAMIC_INFO:112,//自定义图形拖拽
|
|
1630
|
-
ON_CUSTOM_DRAG_MOUSE_DOWN:113,ON_CUSTOM_DRAG_DOC_MOUSE_MOVE:114,ON_CUSTOM_DRAG_DOC_MOUSE_UP:115,ON_CUSTOM_DRAG_MOUSE_MOVE:116,ON_KEYDOWN:117,ON_CREATE_OVERLAY_FRAME:118
|
|
1631
|
+
ON_CUSTOM_DRAG_MOUSE_DOWN:113,ON_CUSTOM_DRAG_DOC_MOUSE_MOVE:114,ON_CUSTOM_DRAG_DOC_MOUSE_UP:115,ON_CUSTOM_DRAG_MOUSE_MOVE:116,ON_KEYDOWN:117,ON_CREATE_OVERLAY_FRAME:118,//创建叠加框架回调
|
|
1632
|
+
ON_CREATE_CUSTOM_Y_COORDINATE:119//自定义Y轴刻度
|
|
1631
1633
|
};var JSCHART_OPERATOR_ID={OP_SCROLL_LEFT:1,//往左移动
|
|
1632
1634
|
OP_SCROLL_RIGHT:2,//往右移动
|
|
1633
1635
|
OP_ZOOM_OUT:3,//缩小
|
|
@@ -1725,8 +1727,9 @@ this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;this.PressTime=500;this.
|
|
|
1725
1727
|
this.LastMouseStatus={MouseOnToolbar:null};// MouseOnToolbar={ Rect:{}, Title: }
|
|
1726
1728
|
this.ClickDownPoint;//鼠标点击坐标 {X, Y}, 鼠标放开以后清空为null
|
|
1727
1729
|
this.IsDestroy=false;//是否已经销毁了
|
|
1728
|
-
this.EnableYDrag={Left:false,Right:false
|
|
1729
|
-
|
|
1730
|
+
this.EnableYDrag={Left:false,Right:false,//是否可以拖拽缩放Y轴最大最小值
|
|
1731
|
+
Wheel:false,WheelYMove:5//是否可以滚轴缩放Y轴最大最小值
|
|
1732
|
+
};this.EnableZoomIndexWindow=false;//是否支持双击缩放附图窗口
|
|
1730
1733
|
this.EnableVerifyRecvData=false;//是否检测接收到的数据
|
|
1731
1734
|
this.PhoneDBClick=new PhoneDBClick();this.SelectedChart={EnableSelected:false,EnableMoveOn:false,Selected:{Identify:null},MoveOn:{Identify:null}};//选中图形
|
|
1732
1735
|
this.IndexChartDrag;//拖拽指标图形
|
|
@@ -5029,7 +5032,8 @@ info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
|
5029
5032
|
if(IFrameSplitOperator.IsNumber(option.LineType))info.LineType=option.LineType;info.Value=item.Value;var text=IFrameSplitOperator.FormatValueString(item.Value,floatPrecision,this.LanguageID);if(option.Position=='left')info.Message[0]=text;else info.Message[1]=text;if(!pageInfo.IsLast){var config={};if(!pageInfo.IsLast)config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;info.ExtendData={Custom:config};}if(event){var sendData={PreventDefault:false,Label:info,Data:item,IndexName:chart.IndexName,FrameID:this.Frame.Identify};event.Callback(event,sendData,this);if(sendData.PreventDefault)continue;}this.Frame.CustomHorizontalInfo.push(info);}}}};this.CustomLatestOverlayIndexDataCoordinate=function(option){var pageInfo=this.GetKLinePageInfo();//获取当前屏信息
|
|
5030
5033
|
if(!pageInfo)return;if(!this.OverlayIndex)return;if(!IFrameSplitOperator.IsNonEmptyArray(this.OverlayIndex.ChartPaint))return;var event=null;if(this.GetEventCallback)event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_OVERLAY_INDEX_Y_LABEL);var endIndex=pageInfo.End.Index;var floatPrecision=2;if(IFrameSplitOperator.IsNumber(this.FloatPrecision))floatPrecision=this.FloatPrecision;for(var i=0,j=0;i<this.OverlayIndex.ChartPaint.length;++i){var chart=this.OverlayIndex.ChartPaint[i];if(!chart.ChartFrame)continue;if(!chart.GetItemData)continue;var aryItem=chart.GetItemData({Index:endIndex});if(!IFrameSplitOperator.IsNonEmptyArray(aryItem))continue;for(j=0;j<aryItem.length;++j){var item=aryItem[j];var info=new CoordinateInfo();info.Type=1;info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;info.LineColor=item.Color;info.LineType=-1;//默认不画线
|
|
5031
5034
|
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
5032
|
-
if(IFrameSplitOperator.IsNumber(option.LineType))info.LineType=option.LineType;info.Value=item.Value;var text=IFrameSplitOperator.FormatValueString(item.Value,floatPrecision,this.LanguageID);if(option.Position=='left')info.Message[0]=text;else info.Message[1]=text;if(!pageInfo.IsLast){var config={};if(!pageInfo.IsLast)config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;info.ExtendData={Custom:config};}if(event){var sendData={PreventDefault:false,Label:info,Data:item,IndexName:chart.IndexName,OverlayIdentify:this.OverlayIndex.Identify};event.Callback(event,sendData,this);if(sendData.PreventDefault)continue;}this.Frame.CustomHorizontalInfo.push(info);}}}
|
|
5035
|
+
if(IFrameSplitOperator.IsNumber(option.LineType))info.LineType=option.LineType;info.Value=item.Value;var text=IFrameSplitOperator.FormatValueString(item.Value,floatPrecision,this.LanguageID);if(option.Position=='left')info.Message[0]=text;else info.Message[1]=text;if(!pageInfo.IsLast){var config={};if(!pageInfo.IsLast)config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;info.ExtendData={Custom:config};}if(event){var sendData={PreventDefault:false,Label:info,Data:item,IndexName:chart.IndexName,OverlayIdentify:this.OverlayIndex.Identify};event.Callback(event,sendData,this);if(sendData.PreventDefault)continue;}this.Frame.CustomHorizontalInfo.push(info);}}},//回调外部处理自定义Y轴刻度
|
|
5036
|
+
this.InvokeCustomYCoordinateCallback=function(){if(!this.GetEventCallback)return null;var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CREATE_CUSTOM_Y_COORDINATE);if(!event||!event.Callback)return null;var data={ID:this.Frame.Identify,Frame:this.Frame,PreventDefault:false,Custom:this.Custom};if(this.OverlayIdentify)data.OverlayIdentify=this.OverlayIdentify;event.Callback(event,data,this);return data;};}//字符串格式化 千分位分割
|
|
5033
5037
|
IFrameSplitOperator.FormatValueThousandsString=function(value,floatPrecision){if(value==null||isNaN(value)){if(floatPrecision>0){var nullText='-.';for(var i=0;i<floatPrecision;++i){nullText+='-';}return nullText;}return'--';}var result='';var num=value.toFixed(floatPrecision);if(floatPrecision>0){var numFloat=num.split('.')[1];var numM=num.split('.')[0];while(numM.length>3){result=','+numM.slice(-3)+result;numM=numM.slice(0,numM.length-3);}if(numM){result=numM+result+'.'+numFloat;}}else{while(num.length>3){result=','+num.slice(-3)+result;num=num.slice(0,num.length-3);}if(num){result=num+result;}}return result;};//数据输出格式化 floatPrecision=小数位数
|
|
5034
5038
|
IFrameSplitOperator.FormatValueString=function(value,floatPrecision,languageID){/*
|
|
5035
5039
|
if (value==null || isNaN(value))
|
|
@@ -5162,7 +5166,7 @@ this.Frame.HorizontalInfo.splice(0,0,item);}this.Frame.Logarithmic={Up:aryUp,Dow
|
|
|
5162
5166
|
if(!isFixedMaxMin)this.IntegerCoordinateSplit(splitData);this.Frame.HorizontalInfo=[];for(var i=0,value=splitData.Min;i<splitData.Count;++i,value+=splitData.Interval){this.Frame.HorizontalInfo[i]=new CoordinateInfo();this.Frame.HorizontalInfo[i].Value=value;if(this.IsShowLeftText)this.Frame.HorizontalInfo[i].Message[0]=value.toFixed(floatPrecision);if(this.IsShowRightText)this.Frame.HorizontalInfo[i].Message[1]=value.toFixed(floatPrecision);}};this.SplitFixed=function(splitData,floatPrecision)//固定分割坐标
|
|
5163
5167
|
{this.Frame.HorizontalInfo=[];for(var i=0,value=splitData.Min;i<splitData.Count;++i,value+=splitData.Interval){this.Frame.HorizontalInfo[i]=new CoordinateInfo();this.Frame.HorizontalInfo[i].Value=value;if(this.IsShowLeftText)this.Frame.HorizontalInfo[i].Message[0]=value.toFixed(floatPrecision);if(this.IsShowRightText)this.Frame.HorizontalInfo[i].Message[1]=value.toFixed(floatPrecision);}};this.SplitFixedV2=function(splitData,floatPrecision)//固定分割坐标
|
|
5164
5168
|
{this.Frame.HorizontalInfo=[];for(var i=0,value=splitData.Min;i<splitData.Count;++i,value+=splitData.Interval){this.Frame.HorizontalInfo[i]=new CoordinateInfo();this.Frame.HorizontalInfo[i].Value=value;if(this.IsShowLeftText)this.Frame.HorizontalInfo[i].Message[0]=value.toFixed(floatPrecision);if(this.IsShowRightText)this.Frame.HorizontalInfo[i].Message[1]=value.toFixed(floatPrecision);}if(!splitData.IsFixedMaxMin)//缩放不需要调整大小
|
|
5165
|
-
{if(floatPrecision==0){splitData.Max+=1;splitData.Min-=1;}else if(floatPrecision==1){splitData.Max+=0.1;splitData.Min-=0.1;}else if(floatPrecision==2){splitData.Max+=0.01;splitData.Min-=0.01;}}};this.CustomCoordinate=function(floatPrecision){this.Frame.CustomHorizontalInfo=[];var lastCoordinate,pageLastCoordinate;for(var i=0;i<this.Custom.length;++i){var item=this.Custom[i];if(item.Type==JSCHART_CUSTOM_YCOORDINATE_ID.LATEST_VALUE_ID||item.Type==JSCHART_CUSTOM_YCOORDINATE_ID.PAGE_DATA_INCREASE||item.Type==JSCHART_CUSTOM_YCOORDINATE_ID.PAGE_LAST_PRICE_ID){var dec=floatPrecision;//外部设置小数位数
|
|
5169
|
+
{if(floatPrecision==0){splitData.Max+=1;splitData.Min-=1;}else if(floatPrecision==1){splitData.Max+=0.1;splitData.Min-=0.1;}else if(floatPrecision==2){splitData.Max+=0.01;splitData.Min-=0.01;}}};this.CustomCoordinate=function(floatPrecision){this.Frame.CustomHorizontalInfo=[];var data=this.InvokeCustomYCoordinateCallback();if(data&&data.PreventDefault==true)return;var lastCoordinate,pageLastCoordinate;for(var i=0;i<this.Custom.length;++i){var item=this.Custom[i];if(item.Type==JSCHART_CUSTOM_YCOORDINATE_ID.LATEST_VALUE_ID||item.Type==JSCHART_CUSTOM_YCOORDINATE_ID.PAGE_DATA_INCREASE||item.Type==JSCHART_CUSTOM_YCOORDINATE_ID.PAGE_LAST_PRICE_ID){var dec=floatPrecision;//外部设置小数位数
|
|
5166
5170
|
if(IFrameSplitOperator.IsNumber(item.FloatPrecision)&&item.FloatPrecision>=0)dec=item.FloatPrecision;var latestItem=this.GetLatestPrice(dec,item);if(latestItem){if(item.Type==JSCHART_CUSTOM_YCOORDINATE_ID.LATEST_VALUE_ID)lastCoordinate=latestItem;else if(item.Type==JSCHART_CUSTOM_YCOORDINATE_ID.PAGE_LAST_PRICE_ID)pageLastCoordinate=latestItem;else this.Frame.CustomHorizontalInfo.push(latestItem);}}else if(item.Type==JSCHART_CUSTOM_YCOORDINATE_ID.FIXED_VALUE_ID)//固定刻度
|
|
5167
5171
|
{this.CustomFixedCoordinate(item);}else if(item.Type==JSCHART_CUSTOM_YCOORDINATE_ID.PAGE_LAST_INDEX_VALUE_ID)//当前屏指标最后一个数据
|
|
5168
5172
|
{this.CustomLatestIndexDataCoordinate(item);}}//当前页最后一个数据和最新数据刻度如果相同,只显示一个
|
|
@@ -5206,7 +5210,7 @@ coordinate.Message[1]=IFrameSplitOperator.FormatValueString(value,floatPrecision
|
|
|
5206
5210
|
{var floatPrecision=this.FloatPrecision;if(IFrameSplitOperator.IsNumber(value)&&Math.abs(value)>1000)floatPrecision=0;text=IFrameSplitOperator.FormatValueString(value,floatPrecision,this.LanguageID);}else{var absValue=Math.abs(value);if(absValue<0.0000000001){text=0;}else if(absValue<this.FLOATPRECISION_RANGE[this.FLOATPRECISION_RANGE.length-1]){text=value.toExponential(2).toString();}else{var floatPrecision=this.GetFloatPrecision(absValue,this.FloatPrecision);//数据比小数位数还小, 调整小数位数
|
|
5207
5211
|
text=IFrameSplitOperator.FormatValueString(value,floatPrecision,this.LanguageID);}}return text;};this.FilterIgnoreYValue=function(){if(!this.IgnoreYValue||this.IgnoreYValue.length<=0)return;var setValue=new _set2.default(this.IgnoreYValue);this.Frame.HorizontalInfo=this.Frame.HorizontalInfo.filter(function(item){return!setValue.has(item.Value);});};this.DynamicMessageText=function(){if(this.SplitType==2){for(var i=0;i<this.Frame.HorizontalInfo.length;++i){var item=this.Frame.HorizontalInfo[i];if(item.Message[0])item.Message[0]+='%';if(item.Message[1])item.Message[1]+='%';}}};this.CallAcutionSplitY=function(count,splitData){if(this.Frame.Identify!=1)return null;var aryCallAcution=this.GetCallAcutionSplitY(count,splitData);if(!aryCallAcution)return;for(var i=0;i<this.Frame.HorizontalInfo.length;++i)//把显示的数据迁移到 Message[2] Message[3]
|
|
5208
5212
|
{var item=this.Frame.HorizontalInfo[i];if(aryCallAcution.IsBeforeData){item.Message[2]=item.Message[0];item.Message[0]=null;}if(aryCallAcution.IsAfterData&&(this.ShareAfterVol==0||this.ShareAfterVol==2)){item.Message[3]=item.Message[1];item.Message[1]=null;}}//集合竞价的坐标插入最后
|
|
5209
|
-
for(var i=0;i<aryCallAcution.HorizontalInfo.length;++i){var item=aryCallAcution.HorizontalInfo[i];this.Frame.HorizontalInfo.push(item);}};this.GetCallAcutionSplitY=function(count,splitData){if(this.Frame.Identify!=1)return null;var isBeforeData=this.IsBeforeData==true&&this.BeforeOpenData&&(this.BeforeOpenData.Ver==2.0||this.BeforeOpenData.Ver==3.0);var isAfterData=this.IsAfterData==true&&this.AfterCloseData&&(this.AfterCloseData.Ver==2.0||this.AfterCloseData.Ver==3.0);if(isBeforeData||isAfterData){var intervalY=(splitData.Max-splitData.Min)/(count-1);if(isBeforeData)var intervalLeft=(this.BeforeOpenData.VolMax-this.BeforeOpenData.VolMin)/(count-1);if(isAfterData)var intervalRight=(this.AfterCloseData.VolMax-this.AfterCloseData.VolMin)/(count-1);var aryHorizontalInfo=[];for(var i=0;i<count;++i){var item=new CoordinateInfo();var yValue=intervalY*i;item.Value=yValue;item.LineType=8;if(isBeforeData){var leftValue=intervalLeft*i;item.Message[0]=this.FormatValueString(leftValue);}if(isAfterData&&(this.ShareAfterVol==0||this.ShareAfterVol==2)){var rightValue=intervalRight*i;item.Message[1]=this.FormatValueString(rightValue);}aryHorizontalInfo.push(item);}return{HorizontalInfo:aryHorizontalInfo,IsBeforeData:isBeforeData,IsAfterData:isAfterData};}var isMultiDayBeforeData=false;var intervalLeft=null;if(this.MultiDayBeforeOpenData&&IFrameSplitOperator.IsNonEmptyArray(this.MultiDayBeforeOpenData)){isMultiDayBeforeData=true;var firstDayData=this.MultiDayBeforeOpenData[0];if(firstDayData.Ver==2.0||firstDayData.Ver==3.0){var intervalLeft=(firstDayData.VolMax-firstDayData.VolMin)/(count-1);}}var isMultiDayAfterData=false;var intervalRight=null;if(this.MultiDayAfterCloseData&&IFrameSplitOperator.IsNonEmptyArray(this.MultiDayAfterCloseData)){isMultiDayAfterData=true;var firstDayData=this.MultiDayAfterCloseData[0];if(firstDayData.Ver==2.0||firstDayData.Ver==3.0){var intervalRight=(firstDayData.VolMax-firstDayData.VolMin)/(count-1);}}if(isMultiDayBeforeData||isMultiDayAfterData){var intervalY=(splitData.Max-splitData.Min)/(count-1);var aryHorizontalInfo=[];for(var i=0;i<count;++i){var item=new CoordinateInfo();var yValue=intervalY*i;item.Value=yValue;item.LineType=9;var isVaild=false;if(intervalLeft!=null){var leftValue=intervalLeft*i;item.Message[0]=this.FormatValueString(leftValue);isVaild=true;}if(intervalRight!=null&&(this.ShareAfterVol==0||this.ShareAfterVol==2)){var rightValue=intervalRight*i;item.Message[1]=this.FormatValueString(rightValue);isVaild=true;}if(isVaild)aryHorizontalInfo.push(item);}if(IFrameSplitOperator.IsNonEmptyArray(aryHorizontalInfo))return{HorizontalInfo:aryHorizontalInfo,IsBeforeData:isMultiDayBeforeData,IsAfterData:isMultiDayAfterData};}return null;};this.RightFrameSplitY=function(){if(!this.Frame.RightFrame)return;var rightFrame=this.Frame.RightFrame;if(rightFrame.YSplitOperator)rightFrame.YSplitOperator.Operator();for(var i=0;i<this.Frame.HorizontalInfo.length;++i){var item=this.Frame.HorizontalInfo[i];var y=this.Frame.GetYFromData(item.Value);var yValue=rightFrame.GetYData(y);item.Message[1]=IFrameSplitOperator.FormatValueString(yValue,this.FloatPrecision,this.LanguageID);}};this.CustomCoordinate=function(){this.Frame.CustomHorizontalInfo=[];if(!IFrameSplitOperator.IsNonEmptyArray(this.Custom))return;for(var i=0;i<this.Custom.length;++i){var item=this.Custom[i];if(item.Type==JSCHART_CUSTOM_YCOORDINATE_ID.PAGE_LAST_INDEX_VALUE_ID)//当前屏最后一个数据
|
|
5213
|
+
for(var i=0;i<aryCallAcution.HorizontalInfo.length;++i){var item=aryCallAcution.HorizontalInfo[i];this.Frame.HorizontalInfo.push(item);}};this.GetCallAcutionSplitY=function(count,splitData){if(this.Frame.Identify!=1)return null;var isBeforeData=this.IsBeforeData==true&&this.BeforeOpenData&&(this.BeforeOpenData.Ver==2.0||this.BeforeOpenData.Ver==3.0);var isAfterData=this.IsAfterData==true&&this.AfterCloseData&&(this.AfterCloseData.Ver==2.0||this.AfterCloseData.Ver==3.0);if(isBeforeData||isAfterData){var intervalY=(splitData.Max-splitData.Min)/(count-1);if(isBeforeData)var intervalLeft=(this.BeforeOpenData.VolMax-this.BeforeOpenData.VolMin)/(count-1);if(isAfterData)var intervalRight=(this.AfterCloseData.VolMax-this.AfterCloseData.VolMin)/(count-1);var aryHorizontalInfo=[];for(var i=0;i<count;++i){var item=new CoordinateInfo();var yValue=intervalY*i;item.Value=yValue;item.LineType=8;if(isBeforeData){var leftValue=intervalLeft*i;item.Message[0]=this.FormatValueString(leftValue);}if(isAfterData&&(this.ShareAfterVol==0||this.ShareAfterVol==2)){var rightValue=intervalRight*i;item.Message[1]=this.FormatValueString(rightValue);}aryHorizontalInfo.push(item);}return{HorizontalInfo:aryHorizontalInfo,IsBeforeData:isBeforeData,IsAfterData:isAfterData};}var isMultiDayBeforeData=false;var intervalLeft=null;if(this.MultiDayBeforeOpenData&&IFrameSplitOperator.IsNonEmptyArray(this.MultiDayBeforeOpenData)){isMultiDayBeforeData=true;var firstDayData=this.MultiDayBeforeOpenData[0];if(firstDayData.Ver==2.0||firstDayData.Ver==3.0){var intervalLeft=(firstDayData.VolMax-firstDayData.VolMin)/(count-1);}}var isMultiDayAfterData=false;var intervalRight=null;if(this.MultiDayAfterCloseData&&IFrameSplitOperator.IsNonEmptyArray(this.MultiDayAfterCloseData)){isMultiDayAfterData=true;var firstDayData=this.MultiDayAfterCloseData[0];if(firstDayData.Ver==2.0||firstDayData.Ver==3.0){var intervalRight=(firstDayData.VolMax-firstDayData.VolMin)/(count-1);}}if(isMultiDayBeforeData||isMultiDayAfterData){var intervalY=(splitData.Max-splitData.Min)/(count-1);var aryHorizontalInfo=[];for(var i=0;i<count;++i){var item=new CoordinateInfo();var yValue=intervalY*i;item.Value=yValue;item.LineType=9;var isVaild=false;if(intervalLeft!=null){var leftValue=intervalLeft*i;item.Message[0]=this.FormatValueString(leftValue);isVaild=true;}if(intervalRight!=null&&(this.ShareAfterVol==0||this.ShareAfterVol==2)){var rightValue=intervalRight*i;item.Message[1]=this.FormatValueString(rightValue);isVaild=true;}if(isVaild)aryHorizontalInfo.push(item);}if(IFrameSplitOperator.IsNonEmptyArray(aryHorizontalInfo))return{HorizontalInfo:aryHorizontalInfo,IsBeforeData:isMultiDayBeforeData,IsAfterData:isMultiDayAfterData};}return null;};this.RightFrameSplitY=function(){if(!this.Frame.RightFrame)return;var rightFrame=this.Frame.RightFrame;if(rightFrame.YSplitOperator)rightFrame.YSplitOperator.Operator();for(var i=0;i<this.Frame.HorizontalInfo.length;++i){var item=this.Frame.HorizontalInfo[i];var y=this.Frame.GetYFromData(item.Value);var yValue=rightFrame.GetYData(y);item.Message[1]=IFrameSplitOperator.FormatValueString(yValue,this.FloatPrecision,this.LanguageID);}};this.CustomCoordinate=function(){this.Frame.CustomHorizontalInfo=[];var data=this.InvokeCustomYCoordinateCallback();if(data&&data.PreventDefault==true)return;if(!IFrameSplitOperator.IsNonEmptyArray(this.Custom))return;for(var i=0;i<this.Custom.length;++i){var item=this.Custom[i];if(item.Type==JSCHART_CUSTOM_YCOORDINATE_ID.PAGE_LAST_INDEX_VALUE_ID)//当前屏最后一个数据
|
|
5210
5214
|
{this.CustomLatestIndexDataCoordinate(item);}else if(item.Type==JSCHART_CUSTOM_YCOORDINATE_ID.FIXED_VALUE_ID)//自定义刻度
|
|
5211
5215
|
{this.CustomFixedCoordinate(item);}else if(item.Type==JSCHART_CUSTOM_YCOORDINATE_ID.PAGE_LAST_OVERLAY_INDEX_VALUE_ID)//叠加指标当前屏最后一个数据
|
|
5212
5216
|
{this.CustomLatestOverlayIndexDataCoordinate(item);}}};this.CustomFixedCoordinate=function(option)//固定坐标刻度
|
|
@@ -5238,7 +5242,7 @@ this.DefaultSplitType=0;this.LimitPrice;//{Max: Min:} 涨跌停价
|
|
|
5238
5242
|
this.Custom;this.RightTextFormat=0;//右边刻度显示模式 0=百分比 1=价格
|
|
5239
5243
|
this.BeforeOpenData;this.IsBeforeData=false;this.AfterCloseData;this.IsAfterData=false;this.MultiDayBeforeOpenData;this.MultiDayAfterCloseData;this.DayOffset;this.AverageData;//均线
|
|
5240
5244
|
this.DayCount=1;this.GlobalOption;this.HQChart;this.IsEnableDragY=function(){return false;};this.Operator=function(){this.Frame.HorizontalInfo=[];this.Frame.CustomHorizontalInfo=[];if(!this.Data)return;var range=this.GetMaxMin();if(this.Symbol&&MARKET_SUFFIX_NAME.IsUSA(this.Symbol.toUpperCase())){this.USASplit(range);}else if(this.SplitType==2){this.USASplit(range);}else{this.DefaultSplit(range);}this.CustomCoordinate();if(this.GetEventCallback){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_SPLIT_YCOORDINATE);if(event&&event.Callback){var data={ID:this.Frame.Identify,Frame:this.Frame};event.Callback(event,data,this);}}};this.CustomCoordinate=function()//自定义刻度
|
|
5241
|
-
{if(!this.Custom)return;var defaultfloatPrecision=GetfloatPrecision(this.Symbol);for(var i in this.Custom){var item=this.Custom[i];if(item.Type==1)this.CustomFixedCoordinate(item);else if(item.Type==0){var latestItem=this.GetLatestPrice(defaultfloatPrecision,item);if(latestItem)this.Frame.CustomHorizontalInfo.push(latestItem);}}};this.GetLatestPrice=function(floatPrecision,option){if(!this.Data||!this.Data.Data)return null;if(this.Data.Data.length<=0)return null;var price=this.Data.Data[this.Data.Data.length-1];if(!IFrameSplitOperator.IsNumber(price)||!IFrameSplitOperator.IsNumber(this.YClose))return null;var info=new CoordinateInfo();info.Type=0;info.Value=price;info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;info.LineType=2;//虚线
|
|
5245
|
+
{var data=this.InvokeCustomYCoordinateCallback();if(data&&data.PreventDefault==true)return;if(!this.Custom)return;var defaultfloatPrecision=GetfloatPrecision(this.Symbol);for(var i in this.Custom){var item=this.Custom[i];if(item.Type==1)this.CustomFixedCoordinate(item);else if(item.Type==0){var latestItem=this.GetLatestPrice(defaultfloatPrecision,item);if(latestItem)this.Frame.CustomHorizontalInfo.push(latestItem);}}};this.GetLatestPrice=function(floatPrecision,option){if(!this.Data||!this.Data.Data)return null;if(this.Data.Data.length<=0)return null;var price=this.Data.Data[this.Data.Data.length-1];if(!IFrameSplitOperator.IsNumber(price)||!IFrameSplitOperator.IsNumber(this.YClose))return null;var info=new CoordinateInfo();info.Type=0;info.Value=price;info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;info.LineType=2;//虚线
|
|
5242
5246
|
var strPrice=price.toFixed(floatPrecision);if(option.DateTime=='HH:MM'){var latestItem=this.Frame.Data.Data[this.Frame.Data.Data.length-1];var strTime=IFrameSplitOperator.FormatTimeString(latestItem.Time,option.DateTime);var aryText=[{Text:strPrice},{Text:strTime}];if(option.Position=='left')info.Message[0]=aryText;else info.Message[1]=aryText;}else{if(option.Position=='left')info.Message[0]=strPrice;else info.Message[1]=strPrice;}if(price>this.YClose)info.LineColor=g_JSChartResource.FrameLatestPrice.UpBarColor;else if(price<this.YClose)info.LineColor=g_JSChartResource.FrameLatestPrice.DownBarColor;else info.LineColor=g_JSChartResource.FrameLatestPrice.UnchagneBarColor;if(IFrameSplitOperator.IsNumber(option.LineType))info.LineType=option.LineType;if(IFrameSplitOperator.IsPlusNumber(option.LineWidth))info.LineWidth=option.LineWidth;if(option.LineDash)info.LineDash=option.LineDash;if(option.IsShowLine==false)info.LineType=-1;if(option.PositionEx===1)info.ExtendData={Custom:{Position:1}};//强制画在内部
|
|
5243
5247
|
return info;};this.CustomFixedCoordinate=function(option)//固定坐标刻度
|
|
5244
5248
|
{var defaultfloatPrecision=GetfloatPrecision(this.Symbol);for(var i=0;i<option.Data.length;++i){var item=option.Data[i];var info=new CoordinateInfo();info.Type=1;info.TextColor=item.TextColor;info.LineColor=item.Color;info.LineType=2;//虚线
|
|
@@ -6960,7 +6964,9 @@ this.ResetFrameXSplit();this.Frame.SetSizeChage(true);this.Draw();this.UpdatePoi
|
|
|
6960
6964
|
};this.OnWheel=function(e){var _this16=this;JSConsole.Chart.Log('[KLineChartContainer::OnWheel]',e);if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;var pixelTatio=GetDevicePixelRatio();var x=(e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;var y=(e.clientY-this.UIElement.getBoundingClientRect().top)*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);var wheelValue=e.wheelDelta;if(!IFrameSplitOperator.IsObjectExist(e.wheelDelta))wheelValue=e.deltaY*-0.01;var enableZoomUpDown=true;//是否允许缩放
|
|
6961
6965
|
if(this.EnableZoomUpDown&&this.EnableZoomUpDown.Wheel===false)enableZoomUpDown=false;if(this.SourceData&&this.SourceData.Data){if(isInClient&&wheelValue<0&&enableZoomUpDown)//缩小
|
|
6962
6966
|
{var cursorIndex={ZoomType:this.ZoomType,IsLockRight:this.IsZoomLockRight};cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));if(this.Frame.ZoomDown(cursorIndex,{ZoomDownloadDataCallback:function ZoomDownloadDataCallback(requestData){_this16.ZoomDownloadData(requestData);}})){this.CursorIndex=cursorIndex.Index;this.UpdataDataoffset();this.UpdatePointByCursorIndex();this.UpdateFrameMaxMin();this.ResetFrameXSplit();this.Draw();this.OnKLinePageChange("wheel");}}else if(isInClient&&wheelValue>0&&enableZoomUpDown)//放大
|
|
6963
|
-
{var cursorIndex={ZoomType:this.ZoomType,IsLockRight:this.IsZoomLockRight};cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));if(this.Frame.ZoomUp(cursorIndex)){JSConsole.Chart.Log("[KLineChartContainer::OnWheel] cursorIndex ",cursorIndex);this.CursorIndex=cursorIndex.Index;this.UpdatePointByCursorIndex();this.UpdataDataoffset();this.UpdateFrameMaxMin();this.ResetFrameXSplit();this.Draw();this.OnKLinePageChange("wheel");}}}if(!isInClient)return;if(e.preventDefault)e.preventDefault();else e.returnValue=false;}
|
|
6967
|
+
{var cursorIndex={ZoomType:this.ZoomType,IsLockRight:this.IsZoomLockRight};cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));if(this.Frame.ZoomUp(cursorIndex)){JSConsole.Chart.Log("[KLineChartContainer::OnWheel] cursorIndex ",cursorIndex);this.CursorIndex=cursorIndex.Index;this.UpdatePointByCursorIndex();this.UpdataDataoffset();this.UpdateFrameMaxMin();this.ResetFrameXSplit();this.Draw();this.OnKLinePageChange("wheel");}}}if(!isInClient){if(!this.OnWheel_ZoomUpDownFrameY(e,x,y))return;}if(e.preventDefault)e.preventDefault();else e.returnValue=false;};//通过滚轴缩放Y轴
|
|
6968
|
+
this.OnWheel_ZoomUpDownFrameY=function(e,x,y){if(!this.EnableYDrag.Wheel)return false;var dragY=this.TryYDrag(x,y);if(!dragY)return false;if(dragY.Left&&!dragY.IsOverlay||dragY.Right){}else{return false;}var wheelValue=e.wheelDelta;if(!IFrameSplitOperator.IsObjectExist(e.wheelDelta))wheelValue=e.deltaY*-0.01;var yMove=this.EnableYDrag.WheelYMove;if(wheelValue>0)yMove*=-1;dragY.Position=0;//只能两边缩放
|
|
6969
|
+
if(!this.Frame.OnZoomUpDownFrameY(dragY,yMove))return false;this.Frame.SetSizeChage(true);this.Draw();return true;};//创建
|
|
6964
6970
|
//windowCount 窗口个数
|
|
6965
6971
|
this.Create=function(windowCount,option){var _this17=this;this.UIElement.JSChartContainer=this;//创建十字光标
|
|
6966
6972
|
this.ChartCorssCursor=new ChartCorssCursor();this.ChartCorssCursor.Canvas=this.Canvas;this.ChartCorssCursor.StringFormatX=g_DivTooltipDataForamt.Create("CorssCursor_XStringFormat");this.ChartCorssCursor.StringFormatX.GetEventCallback=function(id){return _this17.GetEventCallback(id);};this.ChartCorssCursor.StringFormatX.LanguageID=this.LanguageID;this.ChartCorssCursor.StringFormatY=g_DivTooltipDataForamt.Create("CorssCursor_YStringFormat");this.ChartCorssCursor.StringFormatY.GetEventCallback=function(id){return _this17.GetEventCallback(id);};this.ChartCorssCursor.StringFormatY.LanguageID=this.LanguageID;this.ChartCorssCursor.StringFormatY.ExtendChartPaint=this.ExtendChartPaint;//创建等待提示
|
|
@@ -11608,7 +11614,7 @@ if(lockData.BG)this.LockBG=lockData.BG;if(lockData.TextColor)this.LockTextColor=
|
|
|
11608
11614
|
this.IsLocked=false;//是否锁住指标
|
|
11609
11615
|
this.LockCallback=null;this.LockID=null;this.LockBG=null;//锁背景色
|
|
11610
11616
|
this.LockTextColor=null;this.LockText=null;this.LockFont=null;this.LockCount=20;}};//是否超出执行的最大次数
|
|
11611
|
-
this.IsExcessRunCount=function(){if(this.MaxRunCount
|
|
11617
|
+
this.IsExcessRunCount=function(){if(this.MaxRunCount<0)return false;//没有限制
|
|
11612
11618
|
return this.RunCount>=this.MaxRunCount;};this.ExecuteScript=function(hqChart,windowIndex,hisData){this.OutVar=[];var self=this;var param={HQChart:hqChart,WindowIndex:windowIndex,HistoryData:hisData,Self:this};//数据类型
|
|
11613
11619
|
var hqDataType=HQ_DATA_TYPE.KLINE_ID;//默认K线
|
|
11614
11620
|
if(hqChart.ClassName==='MinuteChartContainer'||hqChart.ClassName==='MinuteChartHScreenContainer'){if(hqChart.DayCount>1)hqDataType=HQ_DATA_TYPE.MULTIDAY_MINUTE_ID;//多日分钟
|
|
@@ -13003,7 +13009,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
13003
13009
|
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);};}/********************************************************************************
|
|
13004
13010
|
* 版本信息输出
|
|
13005
13011
|
*
|
|
13006
|
-
*/var HQCHART_VERSION="1.1.
|
|
13012
|
+
*/var HQCHART_VERSION="1.1.12797";function PrintHQChartVersion(){var log='*************************************************************************************************************\n*\n* HQChart Ver: '+HQCHART_VERSION+' \n* \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n*************************************************************************************************************\n';console.log(log);}PrintHQChartVersion();//把给外界调用的方法暴露出来
|
|
13007
13013
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
13008
13014
|
// BaseIndex:BaseIndex,
|
|
13009
13015
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
|
@@ -19500,7 +19500,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
19500
19500
|
//是否超出执行的最大次数
|
|
19501
19501
|
this.IsExcessRunCount=function()
|
|
19502
19502
|
{
|
|
19503
|
-
if (this.MaxRunCount
|
|
19503
|
+
if (this.MaxRunCount<0) return false; //没有限制
|
|
19504
19504
|
|
|
19505
19505
|
return this.RunCount>=this.MaxRunCount;
|
|
19506
19506
|
}
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -307,6 +307,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
307
307
|
var item=option.EnableYDrag;
|
|
308
308
|
if (IFrameSplitOperator.IsBool(item.Left)) chart.EnableYDrag.Left=item.Left;
|
|
309
309
|
if (IFrameSplitOperator.IsBool(item.Right)) chart.EnableYDrag.Right=item.Right;
|
|
310
|
+
if (IFrameSplitOperator.IsBool(item.Wheel)) chart.EnableYDrag.Wheel=item.Wheel;
|
|
311
|
+
if (IFrameSplitOperator.IsNumber(item.WheelYMove)) chart.EnableYDrag.WheelYMove=item.WheelYMove;
|
|
310
312
|
}
|
|
311
313
|
|
|
312
314
|
if (option.KLine) //k线图的属性设置
|
|
@@ -2260,6 +2262,11 @@ JSChart.GetKLineZoom=function() //K线缩放配置
|
|
|
2260
2262
|
return ZOOM_SEED;
|
|
2261
2263
|
}
|
|
2262
2264
|
|
|
2265
|
+
JSChart.SetKLineZoom=function(aryZoom) //设置K线缩放比例
|
|
2266
|
+
{
|
|
2267
|
+
ZOOM_SEED=aryZoom;
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2263
2270
|
JSChart.GetDivTooltipDataFormat=function() //div tooltip数据格式化
|
|
2264
2271
|
{
|
|
2265
2272
|
return g_DivTooltipDataForamt;
|
|
@@ -2541,6 +2548,8 @@ var JSCHART_EVENT_ID=
|
|
|
2541
2548
|
ON_KEYDOWN:117,
|
|
2542
2549
|
|
|
2543
2550
|
ON_CREATE_OVERLAY_FRAME:118, //创建叠加框架回调
|
|
2551
|
+
|
|
2552
|
+
ON_CREATE_CUSTOM_Y_COORDINATE:119, //自定义Y轴刻度
|
|
2544
2553
|
}
|
|
2545
2554
|
|
|
2546
2555
|
var JSCHART_OPERATOR_ID=
|
|
@@ -2838,7 +2847,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
2838
2847
|
this.ClickDownPoint; //鼠标点击坐标 {X, Y}, 鼠标放开以后清空为null
|
|
2839
2848
|
this.IsDestroy=false; //是否已经销毁了
|
|
2840
2849
|
|
|
2841
|
-
this.EnableYDrag=
|
|
2850
|
+
this.EnableYDrag=
|
|
2851
|
+
{
|
|
2852
|
+
Left:false, Right:false, //是否可以拖拽缩放Y轴最大最小值
|
|
2853
|
+
Wheel:false, WheelYMove:5 //是否可以滚轴缩放Y轴最大最小值
|
|
2854
|
+
};
|
|
2855
|
+
|
|
2842
2856
|
this.EnableZoomIndexWindow=false; //是否支持双击缩放附图窗口
|
|
2843
2857
|
this.EnableVerifyRecvData=false; //是否检测接收到的数据
|
|
2844
2858
|
|
|
@@ -43264,130 +43278,144 @@ function IFrameSplitOperator()
|
|
|
43264
43278
|
return result;
|
|
43265
43279
|
}
|
|
43266
43280
|
|
|
43267
|
-
|
|
43268
|
-
|
|
43269
|
-
|
|
43270
|
-
var pageInfo=this.GetKLinePageInfo(); //获取当前屏信息
|
|
43271
|
-
if (!pageInfo) return;
|
|
43272
|
-
if (!this.HQChart) return;
|
|
43273
|
-
|
|
43274
|
-
var event=null;
|
|
43275
|
-
if (this.GetEventCallback)
|
|
43276
|
-
event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_INDEX_Y_LABEL);
|
|
43277
|
-
|
|
43278
|
-
var endIndex=pageInfo.End.Index;
|
|
43279
|
-
var floatPrecision=2;
|
|
43280
|
-
if (IFrameSplitOperator.IsNumber(this.FloatPrecision)) floatPrecision=this.FloatPrecision;
|
|
43281
|
-
for(var i=0, j=0;i<this.HQChart.ChartPaint.length;++i)
|
|
43282
|
-
{
|
|
43283
|
-
var chart=this.HQChart.ChartPaint[i];
|
|
43284
|
-
if (!chart.ChartFrame) continue;
|
|
43285
|
-
if (!chart.GetItemData) continue;
|
|
43286
|
-
if (chart.ChartFrame.Identify==this.Frame.Identify || chart.ChartFrame==this.Frame)
|
|
43287
|
-
{
|
|
43288
|
-
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
43289
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
43290
|
-
|
|
43291
|
-
for(j=0; j<aryItem.length; ++j)
|
|
43292
|
-
{
|
|
43293
|
-
var item=aryItem[j];
|
|
43294
|
-
|
|
43295
|
-
var info=new CoordinateInfo();
|
|
43296
|
-
info.Type=1;
|
|
43297
|
-
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
43298
|
-
info.LineColor=item.Color;
|
|
43299
|
-
info.LineType=-1; //默认不画线
|
|
43300
|
-
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
43301
|
-
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
43302
|
-
|
|
43303
|
-
info.Value=item.Value;
|
|
43304
|
-
var text=IFrameSplitOperator.FormatValueString(item.Value, floatPrecision,this.LanguageID);
|
|
43305
|
-
|
|
43306
|
-
if (option.Position=='left') info.Message[0]=text;
|
|
43307
|
-
else info.Message[1]=text;
|
|
43308
|
-
|
|
43309
|
-
if (!pageInfo.IsLast)
|
|
43310
|
-
{
|
|
43311
|
-
var config={};
|
|
43312
|
-
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
43313
|
-
|
|
43314
|
-
info.ExtendData={ Custom:config };
|
|
43315
|
-
}
|
|
43316
|
-
|
|
43317
|
-
if (event)
|
|
43318
|
-
{
|
|
43319
|
-
var sendData={ PreventDefault:false, Label:info, Data:item, IndexName:chart.IndexName, FrameID:this.Frame.Identify };
|
|
43320
|
-
event.Callback(event,sendData,this);
|
|
43321
|
-
|
|
43322
|
-
if (sendData.PreventDefault) continue;
|
|
43323
|
-
}
|
|
43324
|
-
|
|
43325
|
-
this.Frame.CustomHorizontalInfo.push(info);
|
|
43326
|
-
}
|
|
43327
|
-
}
|
|
43328
|
-
}
|
|
43329
|
-
}
|
|
43330
|
-
|
|
43331
|
-
this.CustomLatestOverlayIndexDataCoordinate=function(option)
|
|
43332
|
-
{
|
|
43281
|
+
//当前屏最新指标数据
|
|
43282
|
+
this.CustomLatestIndexDataCoordinate=function(option)
|
|
43283
|
+
{
|
|
43333
43284
|
var pageInfo=this.GetKLinePageInfo(); //获取当前屏信息
|
|
43334
43285
|
if (!pageInfo) return;
|
|
43335
|
-
if (!this.
|
|
43336
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(this.OverlayIndex.ChartPaint)) return;
|
|
43286
|
+
if (!this.HQChart) return;
|
|
43337
43287
|
|
|
43338
43288
|
var event=null;
|
|
43339
43289
|
if (this.GetEventCallback)
|
|
43340
|
-
event=this.GetEventCallback(JSCHART_EVENT_ID.
|
|
43290
|
+
event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_INDEX_Y_LABEL);
|
|
43341
43291
|
|
|
43342
43292
|
var endIndex=pageInfo.End.Index;
|
|
43343
43293
|
var floatPrecision=2;
|
|
43344
43294
|
if (IFrameSplitOperator.IsNumber(this.FloatPrecision)) floatPrecision=this.FloatPrecision;
|
|
43345
|
-
|
|
43346
|
-
for(var i=0, j=0;i<this.OverlayIndex.ChartPaint.length;++i)
|
|
43295
|
+
for(var i=0, j=0;i<this.HQChart.ChartPaint.length;++i)
|
|
43347
43296
|
{
|
|
43348
|
-
var chart=this.
|
|
43297
|
+
var chart=this.HQChart.ChartPaint[i];
|
|
43349
43298
|
if (!chart.ChartFrame) continue;
|
|
43350
43299
|
if (!chart.GetItemData) continue;
|
|
43351
|
-
|
|
43352
|
-
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
43353
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
43354
|
-
for(j=0; j<aryItem.length; ++j)
|
|
43300
|
+
if (chart.ChartFrame.Identify==this.Frame.Identify || chart.ChartFrame==this.Frame)
|
|
43355
43301
|
{
|
|
43356
|
-
var
|
|
43357
|
-
|
|
43358
|
-
info.Type=1;
|
|
43359
|
-
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
43360
|
-
info.LineColor=item.Color;
|
|
43361
|
-
info.LineType=-1; //默认不画线
|
|
43362
|
-
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
43363
|
-
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
43302
|
+
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
43303
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
43364
43304
|
|
|
43365
|
-
|
|
43366
|
-
|
|
43305
|
+
for(j=0; j<aryItem.length; ++j)
|
|
43306
|
+
{
|
|
43307
|
+
var item=aryItem[j];
|
|
43367
43308
|
|
|
43368
|
-
|
|
43369
|
-
|
|
43309
|
+
var info=new CoordinateInfo();
|
|
43310
|
+
info.Type=1;
|
|
43311
|
+
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
43312
|
+
info.LineColor=item.Color;
|
|
43313
|
+
info.LineType=-1; //默认不画线
|
|
43314
|
+
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
43315
|
+
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
43316
|
+
|
|
43317
|
+
info.Value=item.Value;
|
|
43318
|
+
var text=IFrameSplitOperator.FormatValueString(item.Value, floatPrecision,this.LanguageID);
|
|
43370
43319
|
|
|
43371
|
-
|
|
43372
|
-
|
|
43373
|
-
var config={};
|
|
43374
|
-
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
43320
|
+
if (option.Position=='left') info.Message[0]=text;
|
|
43321
|
+
else info.Message[1]=text;
|
|
43375
43322
|
|
|
43376
|
-
|
|
43377
|
-
|
|
43323
|
+
if (!pageInfo.IsLast)
|
|
43324
|
+
{
|
|
43325
|
+
var config={};
|
|
43326
|
+
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
43378
43327
|
|
|
43379
|
-
|
|
43380
|
-
|
|
43381
|
-
var sendData={ PreventDefault:false, Label:info, Data:item, IndexName:chart.IndexName, OverlayIdentify:this.OverlayIndex.Identify };
|
|
43382
|
-
event.Callback(event,sendData,this);
|
|
43328
|
+
info.ExtendData={ Custom:config };
|
|
43329
|
+
}
|
|
43383
43330
|
|
|
43384
|
-
if (
|
|
43331
|
+
if (event)
|
|
43332
|
+
{
|
|
43333
|
+
var sendData={ PreventDefault:false, Label:info, Data:item, IndexName:chart.IndexName, FrameID:this.Frame.Identify };
|
|
43334
|
+
event.Callback(event,sendData,this);
|
|
43335
|
+
|
|
43336
|
+
if (sendData.PreventDefault) continue;
|
|
43337
|
+
}
|
|
43338
|
+
|
|
43339
|
+
this.Frame.CustomHorizontalInfo.push(info);
|
|
43385
43340
|
}
|
|
43386
|
-
|
|
43387
|
-
this.Frame.CustomHorizontalInfo.push(info);
|
|
43388
43341
|
}
|
|
43389
43342
|
}
|
|
43390
|
-
|
|
43343
|
+
}
|
|
43344
|
+
|
|
43345
|
+
this.CustomLatestOverlayIndexDataCoordinate=function(option)
|
|
43346
|
+
{
|
|
43347
|
+
var pageInfo=this.GetKLinePageInfo(); //获取当前屏信息
|
|
43348
|
+
if (!pageInfo) return;
|
|
43349
|
+
if (!this.OverlayIndex) return;
|
|
43350
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.OverlayIndex.ChartPaint)) return;
|
|
43351
|
+
|
|
43352
|
+
var event=null;
|
|
43353
|
+
if (this.GetEventCallback)
|
|
43354
|
+
event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_OVERLAY_INDEX_Y_LABEL);
|
|
43355
|
+
|
|
43356
|
+
var endIndex=pageInfo.End.Index;
|
|
43357
|
+
var floatPrecision=2;
|
|
43358
|
+
if (IFrameSplitOperator.IsNumber(this.FloatPrecision)) floatPrecision=this.FloatPrecision;
|
|
43359
|
+
|
|
43360
|
+
for(var i=0, j=0;i<this.OverlayIndex.ChartPaint.length;++i)
|
|
43361
|
+
{
|
|
43362
|
+
var chart=this.OverlayIndex.ChartPaint[i];
|
|
43363
|
+
if (!chart.ChartFrame) continue;
|
|
43364
|
+
if (!chart.GetItemData) continue;
|
|
43365
|
+
|
|
43366
|
+
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
43367
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
43368
|
+
for(j=0; j<aryItem.length; ++j)
|
|
43369
|
+
{
|
|
43370
|
+
var item=aryItem[j];
|
|
43371
|
+
var info=new CoordinateInfo();
|
|
43372
|
+
info.Type=1;
|
|
43373
|
+
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
43374
|
+
info.LineColor=item.Color;
|
|
43375
|
+
info.LineType=-1; //默认不画线
|
|
43376
|
+
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
43377
|
+
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
43378
|
+
|
|
43379
|
+
info.Value=item.Value;
|
|
43380
|
+
var text=IFrameSplitOperator.FormatValueString(item.Value, floatPrecision,this.LanguageID);
|
|
43381
|
+
|
|
43382
|
+
if (option.Position=='left') info.Message[0]=text;
|
|
43383
|
+
else info.Message[1]=text;
|
|
43384
|
+
|
|
43385
|
+
if (!pageInfo.IsLast)
|
|
43386
|
+
{
|
|
43387
|
+
var config={};
|
|
43388
|
+
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
43389
|
+
|
|
43390
|
+
info.ExtendData={ Custom:config };
|
|
43391
|
+
}
|
|
43392
|
+
|
|
43393
|
+
if (event)
|
|
43394
|
+
{
|
|
43395
|
+
var sendData={ PreventDefault:false, Label:info, Data:item, IndexName:chart.IndexName, OverlayIdentify:this.OverlayIndex.Identify };
|
|
43396
|
+
event.Callback(event,sendData,this);
|
|
43397
|
+
|
|
43398
|
+
if (sendData.PreventDefault) continue;
|
|
43399
|
+
}
|
|
43400
|
+
|
|
43401
|
+
this.Frame.CustomHorizontalInfo.push(info);
|
|
43402
|
+
}
|
|
43403
|
+
}
|
|
43404
|
+
},
|
|
43405
|
+
|
|
43406
|
+
//回调外部处理自定义Y轴刻度
|
|
43407
|
+
this.InvokeCustomYCoordinateCallback=function()
|
|
43408
|
+
{
|
|
43409
|
+
if (!this.GetEventCallback) return null;
|
|
43410
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CREATE_CUSTOM_Y_COORDINATE);
|
|
43411
|
+
if (!event || !event.Callback) return null;
|
|
43412
|
+
|
|
43413
|
+
var data={ ID:this.Frame.Identify, Frame:this.Frame, PreventDefault:false, Custom:this.Custom };
|
|
43414
|
+
if (this.OverlayIdentify) data.OverlayIdentify=this.OverlayIdentify;
|
|
43415
|
+
event.Callback(event,data,this);
|
|
43416
|
+
|
|
43417
|
+
return data;
|
|
43418
|
+
}
|
|
43391
43419
|
}
|
|
43392
43420
|
|
|
43393
43421
|
//字符串格式化 千分位分割
|
|
@@ -44388,6 +44416,10 @@ function FrameSplitKLinePriceY()
|
|
|
44388
44416
|
this.CustomCoordinate=function(floatPrecision)
|
|
44389
44417
|
{
|
|
44390
44418
|
this.Frame.CustomHorizontalInfo=[];
|
|
44419
|
+
|
|
44420
|
+
var data=this.InvokeCustomYCoordinateCallback();
|
|
44421
|
+
if (data && data.PreventDefault==true) return;
|
|
44422
|
+
|
|
44391
44423
|
var lastCoordinate, pageLastCoordinate;
|
|
44392
44424
|
for(var i=0; i<this.Custom.length; ++i)
|
|
44393
44425
|
{
|
|
@@ -45035,6 +45067,9 @@ function FrameSplitY()
|
|
|
45035
45067
|
{
|
|
45036
45068
|
this.Frame.CustomHorizontalInfo=[];
|
|
45037
45069
|
|
|
45070
|
+
var data=this.InvokeCustomYCoordinateCallback();
|
|
45071
|
+
if (data && data.PreventDefault==true) return;
|
|
45072
|
+
|
|
45038
45073
|
if (!IFrameSplitOperator.IsNonEmptyArray(this.Custom)) return;
|
|
45039
45074
|
|
|
45040
45075
|
for(var i=0; i<this.Custom.length; ++i)
|
|
@@ -45416,6 +45451,9 @@ function FrameSplitMinutePriceY()
|
|
|
45416
45451
|
|
|
45417
45452
|
this.CustomCoordinate=function() //自定义刻度
|
|
45418
45453
|
{
|
|
45454
|
+
var data=this.InvokeCustomYCoordinateCallback();
|
|
45455
|
+
if (data && data.PreventDefault==true) return;
|
|
45456
|
+
|
|
45419
45457
|
if (!this.Custom) return;
|
|
45420
45458
|
|
|
45421
45459
|
var defaultfloatPrecision=GetfloatPrecision(this.Symbol);
|
|
@@ -66229,12 +66267,47 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
66229
66267
|
}
|
|
66230
66268
|
}
|
|
66231
66269
|
|
|
66232
|
-
if (!isInClient)
|
|
66270
|
+
if (!isInClient)
|
|
66271
|
+
{
|
|
66272
|
+
if (!this.OnWheel_ZoomUpDownFrameY(e,x,y)) return;
|
|
66273
|
+
}
|
|
66233
66274
|
|
|
66234
66275
|
if(e.preventDefault) e.preventDefault();
|
|
66235
66276
|
else e.returnValue = false;
|
|
66236
66277
|
}
|
|
66237
66278
|
|
|
66279
|
+
//通过滚轴缩放Y轴
|
|
66280
|
+
this.OnWheel_ZoomUpDownFrameY=function(e, x, y)
|
|
66281
|
+
{
|
|
66282
|
+
if (!this.EnableYDrag.Wheel) return false;
|
|
66283
|
+
|
|
66284
|
+
var dragY=this.TryYDrag(x,y);
|
|
66285
|
+
if (!dragY) return false;
|
|
66286
|
+
|
|
66287
|
+
if ((dragY.Left && !dragY.IsOverlay) || dragY.Right)
|
|
66288
|
+
{
|
|
66289
|
+
|
|
66290
|
+
}
|
|
66291
|
+
else
|
|
66292
|
+
{
|
|
66293
|
+
return false;
|
|
66294
|
+
}
|
|
66295
|
+
|
|
66296
|
+
var wheelValue=e.wheelDelta;
|
|
66297
|
+
if (!IFrameSplitOperator.IsObjectExist(e.wheelDelta))
|
|
66298
|
+
wheelValue=e.deltaY* -0.01;
|
|
66299
|
+
|
|
66300
|
+
var yMove=this.EnableYDrag.WheelYMove;
|
|
66301
|
+
if (wheelValue>0) yMove*=-1;
|
|
66302
|
+
dragY.Position=0; //只能两边缩放
|
|
66303
|
+
if (!this.Frame.OnZoomUpDownFrameY(dragY, yMove)) return false;
|
|
66304
|
+
|
|
66305
|
+
this.Frame.SetSizeChage(true);
|
|
66306
|
+
this.Draw();
|
|
66307
|
+
|
|
66308
|
+
return true;
|
|
66309
|
+
}
|
|
66310
|
+
|
|
66238
66311
|
//创建
|
|
66239
66312
|
//windowCount 窗口个数
|
|
66240
66313
|
this.Create=function(windowCount, option)
|