Commit 6b1c4fbd authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

рефакторинг

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56833 954022d7-b5bf-4e40-9824-e11837661b57
parent af615dc3
......@@ -3626,28 +3626,32 @@ CChartsDrawer.prototype =
var secPart = val.toString().split('.');
var numPow = 1,tempMax;
if(secPart[1] && secPart[1].toString().search('e+') != -1 && secPart[0] && secPart[0].toString().length == 1)
if(secPart[1] && secPart[1].toString().indexOf('e+') != -1 && secPart[0] && secPart[0].toString().length == 1)
{
var expNum = secPart[1].toString().split('e+');
numPow = Math.pow(10, expNum[1]);
}
else if(secPart[1] && secPart[1].toString().indexOf('e-') != -1 && secPart[0] && secPart[0].toString().length == 1)
{
var expNum = secPart[1].toString().split('e');
numPow = Math.pow(10, expNum[1]);
}
else if(0 != secPart[0])
numPow = Math.pow(10, secPart[0].toString().length - 1)
else if(0 == secPart[0])
{
var tempMax = val;
var num = -1;
while(0 == tempMax.toString().split('.')[0])
var num = 0;
while(1 > tempMax)
{
tempMax = val;
numPow = Math.pow(10, num);
tempMax = tempMax / numPow;
num--;
tempMax = tempMax * 10;
num--;
}
numPow = Math.pow(10, num);
val = tempMax;
}
if(tempMax == undefined)
};
if(tempMax == undefined)
val = val / numPow;
return {val: val, numPow: numPow};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment