Fix suggestions
This commit is contained in:
parent
4fce7f8be5
commit
161488616f
1 changed files with 31 additions and 28 deletions
|
@ -98,13 +98,12 @@ function centerOnFocus(e, scrollSlider, horizontal) {
|
|||
function centerOnFocusHorizontal(e) {
|
||||
centerOnFocus(e, this, true);
|
||||
}
|
||||
|
||||
function centerOnFocusVertical(e) {
|
||||
centerOnFocus(e, this, false);
|
||||
}
|
||||
|
||||
export default {
|
||||
getPosition: getPosition,
|
||||
centerFocus: {
|
||||
export const centerFocus = {
|
||||
on: function (element, horizontal) {
|
||||
if (horizontal) {
|
||||
dom.addEventListener(element, 'focus', centerOnFocusHorizontal, {
|
||||
|
@ -131,7 +130,11 @@ export default {
|
|||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export default {
|
||||
getPosition: getPosition,
|
||||
centerFocus: centerFocus,
|
||||
toCenter: toCenter,
|
||||
toStart: toStart
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue