hqchart 1.1.13981 → 1.1.13983
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
|
@@ -13807,7 +13807,9 @@ Top:25,Bottom:25,AutoLeft:{Blank:10,MinWidth:60},AutoRight:{Blank:10,MinWidth:60
|
|
|
13807
13807
|
*/function JSPopKeyboard(){this.DivDialog=null;this.DragTitle=null;this.InputDOM=null;this.Title="HQChart 键盘精灵";this.ID=Guid();this.ActiveDOM=null;//启动键盘精灵是的控件
|
|
13808
13808
|
this.InputStatus=0;//0=空闲 1=输入中
|
|
13809
13809
|
this.Keyboard={Option:JSPopKeyboard.GetOption(),JSChart:null};this.Inital=function(){var _this89=this;window.addEventListener('mousedown',function(e){_this89.OnWindowMouseDown(e);});};this.OnWindowMouseDown=function(e){if(!this.DivDialog)return;console.log("[JSPopKeyboard::OnWindowMouseDown] e=",e);if(!this.DivDialog.contains(e.target)){this.Hide();}};this.Create=function(){var _this90=this;var divDom=document.createElement('div');divDom.className='jchart_pop_keyboard_dailog';divDom.id=this.ID;var divTitle=document.createElement("div");divTitle.className='jschart_keyboard_Title_Div';divTitle.onmousedown=function(e){_this90.OnMouseDownTitle(e);};divDom.appendChild(divTitle);var divInfoText=document.createElement("div");divInfoText.className="jschart_keyboard_Title";divInfoText.innerText=this.Title;this.DivInfoText=divInfoText;divTitle.appendChild(divInfoText);var divClose=document.createElement("div");divClose.className='jschart_keyboard_Close_Div';divClose.innerText="x";divClose.onmousedown=function(e){_this90.Hide();};divTitle.appendChild(divClose);var divInput=document.createElement("div");divInput.className='jschart_keyboard_Input_Div';divDom.appendChild(divInput);var input=document.createElement("input");input.className="jschart_keyboard_input";input.addEventListener("keydown",function(event){_this90.OnKeydown(event);});input.addEventListener("keyup",function(event){_this90.OnKeyup(event);});input.addEventListener("compositionstart",function(event){_this90.OnCompositionStart(event);});input.addEventListener("compositionupdate",function(event){_this90.OnCompositionUpdate(event);});input.addEventListener("compositionend",function(event){_this90.OnCompositionEnd(event);});divInput.appendChild(input);var divChart=document.createElement("div");divChart.className="jschart_keyboard_Chart_Div";divDom.appendChild(divChart);this.DivDialog=divDom;this.InputDOM=input;var chart=JSKeyboardChart.Init(divChart);this.Keyboard.JSChart=chart;this.Keyboard.Option.OnCreatedCallback=function(chart){_this90.OnCreateHQChart(chart);};chart.SetOption(this.Keyboard.Option);//设置K线配置
|
|
13810
|
-
chart.AddEventCallback({event:JSCHART_EVENT_ID.ON_KEYBOARD_MOUSEUP,callback:function callback(event,data,chart){_this90.OnChartMouseUp(event,data,chart);}});document.body.appendChild(divDom);};this.OnCreateHQChart=function(chart){};this.OnCompositionStart=function(event){this.InputStatus=1;};this.OnCompositionUpdate=function(event){};this.OnCompositionEnd=function(event){this.InputStatus=0;};this.OnKeydown=function(event){if(this.InputStatus!=0)return;var aryKey=new _set2.default([40,38,13,33,34]);if(aryKey.has(event.keyCode)){this.Keyboard.JSChart.OnKeyDown(event);}if(event.keyCode==27){this.Hide();}};this.OnKeyup=function(event){if(this.InputStatus!=0)return;var code=event.keyCode;if(code
|
|
13810
|
+
chart.AddEventCallback({event:JSCHART_EVENT_ID.ON_KEYBOARD_MOUSEUP,callback:function callback(event,data,chart){_this90.OnChartMouseUp(event,data,chart);}});document.body.appendChild(divDom);};this.OnCreateHQChart=function(chart){};this.OnCompositionStart=function(event){this.InputStatus=1;};this.OnCompositionUpdate=function(event){};this.OnCompositionEnd=function(event){this.InputStatus=0;};this.OnKeydown=function(event){if(this.InputStatus!=0)return;var aryKey=new _set2.default([40,38,13,33,34]);if(aryKey.has(event.keyCode)){this.Keyboard.JSChart.OnKeyDown(event);}if(event.keyCode==27){this.Hide();}};this.OnKeyup=function(event){if(this.InputStatus!=0)return;var code=event.keyCode;if(code==8)//删除
|
|
13811
|
+
{var strText=this.InputDOM.value;if(strText.length==0){this.Hide();//只有按了删除 才能隐藏
|
|
13812
|
+
return;}}if(code>=48&&code<=57||code>=65&&code<=90||code>=97&&code<=122||code==8){var strText=this.InputDOM.value;strText=strText.toUpperCase();this.Keyboard.JSChart.Search(strText);}};this.OnMouseDownTitle=function(e){var _this91=this;if(!this.DivDialog)return;var dragData={X:e.clientX,Y:e.clientY};dragData.YOffset=e.clientX-this.DivDialog.offsetLeft;dragData.XOffset=e.clientY-this.DivDialog.offsetTop;this.DragTitle=dragData;document.onmousemove=function(e){_this91.DocOnMouseMoveTitle(e);};document.onmouseup=function(e){_this91.DocOnMouseUpTitle(e);};};this.DocOnMouseMoveTitle=function(e){if(!this.DragTitle)return;var left=e.clientX-this.DragTitle.YOffset;var top=e.clientY-this.DragTitle.XOffset;var right=left+this.DivDialog.offsetWidth;var bottom=top+this.DivDialog.offsetHeight;if(right+5>=window.innerWidth)left=window.innerWidth-this.DivDialog.offsetWidth-5;if(bottom+5>=window.innerHeight)top=window.innerHeight-this.DivDialog.offsetHeight-5;this.DivDialog.style.left=left+'px';this.DivDialog.style.top=top+'px';if(e.preventDefault)e.preventDefault();};this.DocOnMouseUpTitle=function(e){this.DragTitle=null;this.onmousemove=null;this.onmouseup=null;};this.SetSymbolData=function(data){if(!this.Keyboard.JSChart)return false;this.Keyboard.JSChart.SetSymbolData(data);};this.Show=function(){if(!this.DivDialog)return;//显示在右下方
|
|
13811
13813
|
var height=this.DivDialog.offsetHeight;var width=this.DivDialog.offsetWidth;var xRight=window.innerWidth-5;var ybottom=window.innerHeight-5;var x=xRight-width;var y=ybottom-height;this.DivDialog.style.visibility='visible';this.DivDialog.style.top=y+"px";this.DivDialog.style.left=x+"px";};this.Hide=function(){if(!this.DivDialog)return;this.DivDialog.style.visibility='hidden';this.InputDOM.value="";this.Keyboard.JSChart.ClearSearch();if(this.ActiveDOM){if(this.ActiveDOM.focus)this.ActiveDOM.focus();//把焦点换回去
|
|
13812
13814
|
this.ActiveDOM=null;}};this.IsShow=function(){if(!this.DivDialog)return false;return this.DivDialog.style.visibility==='visible';};this.OnGlobalKeydown=function(event){if(!this.DivDialog)return;var code=event.keyCode;if(!this.IsShow()&&code>=48&&code<=57||code>=65&&code<=90||code>=97&&code<=122){this.Show();this.InputDOM.focus();if(event.target)this.ActiveDOM=event.target;}else if(code==27&&this.IsShow()){this.Hide();}};this.OnGlobalMouseDown=function(event){if(!this.DivDialog)return;if(this.DivDialog.style.display=='none')return;if(!this.DivDialog.contains(event.target)){this.Hide();}};this.OnChartMouseUp=function(event,data,chart){this.InputDOM.focus();};}JSPopKeyboard.GetOption=function(){var option={Type:'键盘精灵',//创建图形类型
|
|
13813
13815
|
Border://边框
|
|
@@ -13902,7 +13904,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
13902
13904
|
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);};}/********************************************************************************
|
|
13903
13905
|
* 版本信息输出
|
|
13904
13906
|
*
|
|
13905
|
-
*/var HQCHART_VERSION="1.1.
|
|
13907
|
+
*/var HQCHART_VERSION="1.1.13982";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();//把给外界调用的方法暴露出来
|
|
13906
13908
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
13907
13909
|
// BaseIndex:BaseIndex,
|
|
13908
13910
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
|
@@ -153,19 +153,23 @@ function JSPopKeyboard()
|
|
|
153
153
|
if (this.InputStatus!=0) return;
|
|
154
154
|
|
|
155
155
|
var code=event.keyCode;
|
|
156
|
-
|
|
156
|
+
|
|
157
|
+
if (code==8) //删除
|
|
157
158
|
{
|
|
158
159
|
var strText=this.InputDOM.value;
|
|
159
|
-
strText
|
|
160
|
-
if (strText.length==0)
|
|
161
|
-
{
|
|
162
|
-
this.Hide();
|
|
163
|
-
}
|
|
164
|
-
else
|
|
160
|
+
if (strText.length==0)
|
|
165
161
|
{
|
|
166
|
-
this.
|
|
162
|
+
this.Hide(); //只有按了删除 才能隐藏
|
|
163
|
+
return;
|
|
167
164
|
}
|
|
168
165
|
}
|
|
166
|
+
|
|
167
|
+
if ((code>=48 && code<=57) || (code>=65 && code<=90) || (code>=97 && code<=122) || code==8)
|
|
168
|
+
{
|
|
169
|
+
var strText=this.InputDOM.value;
|
|
170
|
+
strText=strText.toUpperCase();
|
|
171
|
+
this.Keyboard.JSChart.Search(strText);
|
|
172
|
+
}
|
|
169
173
|
}
|
|
170
174
|
|
|
171
175
|
|
|
@@ -139071,7 +139071,7 @@ function ScrollBarBGChart()
|
|
|
139071
139071
|
|
|
139072
139072
|
|
|
139073
139073
|
|
|
139074
|
-
var HQCHART_VERSION="1.1.
|
|
139074
|
+
var HQCHART_VERSION="1.1.13982";
|
|
139075
139075
|
|
|
139076
139076
|
function PrintHQChartVersion()
|
|
139077
139077
|
{
|
|
@@ -143469,19 +143469,23 @@ function JSPopKeyboard()
|
|
|
143469
143469
|
if (this.InputStatus!=0) return;
|
|
143470
143470
|
|
|
143471
143471
|
var code=event.keyCode;
|
|
143472
|
-
|
|
143472
|
+
|
|
143473
|
+
if (code==8) //删除
|
|
143473
143474
|
{
|
|
143474
143475
|
var strText=this.InputDOM.value;
|
|
143475
|
-
strText
|
|
143476
|
-
if (strText.length==0)
|
|
143476
|
+
if (strText.length==0)
|
|
143477
143477
|
{
|
|
143478
|
-
this.Hide();
|
|
143479
|
-
|
|
143480
|
-
else
|
|
143481
|
-
{
|
|
143482
|
-
this.Keyboard.JSChart.Search(strText);
|
|
143478
|
+
this.Hide(); //只有按了删除 才能隐藏
|
|
143479
|
+
return;
|
|
143483
143480
|
}
|
|
143484
143481
|
}
|
|
143482
|
+
|
|
143483
|
+
if ((code>=48 && code<=57) || (code>=65 && code<=90) || (code>=97 && code<=122) || code==8)
|
|
143484
|
+
{
|
|
143485
|
+
var strText=this.InputDOM.value;
|
|
143486
|
+
strText=strText.toUpperCase();
|
|
143487
|
+
this.Keyboard.JSChart.Search(strText);
|
|
143488
|
+
}
|
|
143485
143489
|
}
|
|
143486
143490
|
|
|
143487
143491
|
|
|
@@ -145442,7 +145446,7 @@ function HQChartScriptWorker()
|
|
|
145442
145446
|
|
|
145443
145447
|
|
|
145444
145448
|
|
|
145445
|
-
var HQCHART_VERSION="1.1.
|
|
145449
|
+
var HQCHART_VERSION="1.1.13982";
|
|
145446
145450
|
|
|
145447
145451
|
function PrintHQChartVersion()
|
|
145448
145452
|
{
|