mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
Link Hints: fix start value calculation (#2970)
* Link Hints: fix start value calculation * fix comment
This commit is contained in:
parent
b8cc55ec3f
commit
bc082b15b0
|
@ -827,8 +827,12 @@ function LinkHints(linkHintHotKey){
|
|||
}
|
||||
|
||||
LinkHints.prototype.getHintStartValue = function(targetsCount){
|
||||
// if we have 321 tooltips we start from 100
|
||||
var maxHintStringLength = targetsCount.toString().length;
|
||||
// e.g. if we have 89 tooltips we start from 10
|
||||
// if we have 90 tooltips we start from 100
|
||||
// if we have 900 tooltips we start from 1000
|
||||
var
|
||||
baseLength = Math.pow(10, targetsCount.toString().length - 1),
|
||||
maxHintStringLength = (targetsCount + baseLength).toString().length;
|
||||
return Math.pow(10, maxHintStringLength - 1);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user