提交 3740126e 编写于 作者: K kener

getVector优化

上级 9c240da3
......@@ -781,19 +781,30 @@ define(
var min = indicator.value.min;
var alpha;
if (typeof value != 'number') {
if (typeof value == 'undefined') {
return center;
}
switch (value) {
case 'min' :
value = min;
break;
case 'max' :
value = max;
break;
case 'center' :
value = (max + min) / 2;
break;
}
if (max != min) {
alpha = (value - min) / (max - min);
}
else {
if ( max != min) {
alpha = (value - min) / (max - min);
}
else {
alpha = 0.5;
}
return _mapVector(vector, center, alpha);
alpha = 0.5;
}
return _mapVector(vector, center, alpha);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册