mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(dom) scrollIntoViewIfNeeded: pCenter -> center
This commit is contained in:
parent
d4f99855af
commit
3d2f0c94aa
1 changed files with 3 additions and 3 deletions
|
|
@ -1796,17 +1796,17 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
* @param element
|
||||
* @param pCenter
|
||||
*/
|
||||
this.scrollIntoViewIfNeeded = function(element, pCenter) {
|
||||
this.scrollIntoViewIfNeeded = function(element, center) {
|
||||
var ret = element && element.scrollIntoViewIfNeeded;
|
||||
|
||||
/* for scroll as small as possible
|
||||
* param should be false
|
||||
*/
|
||||
if (arguments.length === 1)
|
||||
pCenter = false;
|
||||
center = false;
|
||||
|
||||
if (ret)
|
||||
element.scrollIntoViewIfNeeded(pCenter);
|
||||
element.scrollIntoViewIfNeeded(center);
|
||||
|
||||
return ret;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue