mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
moved calling api scrollIntoViewIfNeeded to setCurrentFile
This commit is contained in:
parent
55f1b25ca6
commit
4e04e4954f
2 changed files with 14 additions and 18 deletions
|
|
@ -661,7 +661,10 @@ CloudClient.Util = (function(){
|
|||
if(lCurrentFileWas)
|
||||
this.unSetCurrentFile(lCurrentFileWas);
|
||||
|
||||
pCurrentFile.className = CloudCommander.CURRENT_FILE;
|
||||
pCurrentFile.className = CloudCommander.CURRENT_FILE;
|
||||
|
||||
/* scrolling to current file */
|
||||
Util.scrollIntoViewIfNeeded(pCurrentFile);
|
||||
|
||||
return lRet_b;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -160,10 +160,7 @@ var CloudCommander;
|
|||
lCurrentFile = lCurrentFile.previousSibling;
|
||||
if(lCurrentFile){
|
||||
/* выделяем предыдущую строку*/
|
||||
Util.setCurrentFile(lCurrentFile);
|
||||
|
||||
/* scrolling to current file*/
|
||||
Util.scrollIntoViewIfNeeded(lCurrentFile);
|
||||
Util.setCurrentFile(lCurrentFile);
|
||||
}
|
||||
|
||||
event.preventDefault();//запрет на дальнейшее действие
|
||||
|
|
@ -179,9 +176,6 @@ var CloudCommander;
|
|||
if(lCurrentFile){
|
||||
/* выделяем следующую строку*/
|
||||
Util.setCurrentFile(lCurrentFile);
|
||||
|
||||
/* scrolling to current file*/
|
||||
Util.scrollIntoViewIfNeeded(lCurrentFile);
|
||||
|
||||
event.preventDefault();//запрет на дальнейшее действие
|
||||
}
|
||||
|
|
@ -199,10 +193,10 @@ var CloudCommander;
|
|||
lCurrentFile = lCurrentFile.
|
||||
parentElement.firstChild;
|
||||
|
||||
Util.setCurrentFile(lCurrentFile);
|
||||
|
||||
/* move scrollbar to top */
|
||||
lCurrentFile.scrollIntoView();
|
||||
/* set current file and
|
||||
* move scrollbar to top
|
||||
*/
|
||||
Util.setCurrentFile(lCurrentFile);
|
||||
|
||||
event.preventDefault();//запрет на дальнейшее действие
|
||||
}
|
||||
|
|
@ -215,12 +209,11 @@ var CloudCommander;
|
|||
lCurrentFile = lCurrentFile.
|
||||
parentElement.lastElementChild;
|
||||
|
||||
Util.setCurrentFile(lCurrentFile);
|
||||
|
||||
/* move scrollbar to bottom*/
|
||||
lCurrentFile.scrollIntoView();
|
||||
|
||||
event.preventDefault();//запрет на дальнейшее действие
|
||||
/* set current file and
|
||||
* move scrollbar to bottom
|
||||
*/
|
||||
Util.setCurrentFile(lCurrentFile);
|
||||
event.preventDefault();//запрет на дальнейшее действие
|
||||
}
|
||||
|
||||
/* если нажали клавишу page down
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue