Skip to content

Commit

Permalink
small renames, based on re-reading
Browse files Browse the repository at this point in the history
  • Loading branch information
ndp committed Feb 16, 2022
1 parent 9891059 commit a174cc7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/grid-navigator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Andrew J. Peterson. All Rights Reserved.
import { KeyToMoveOpMap, NAV_AND_ARROW_MAP } from './key-maps'
import { KeyToMoveOpMap, DEFAULT_STANDARD } from './key-maps'
import {
indexOf,
objectGridNavigator,
Expand Down Expand Up @@ -77,7 +77,7 @@ export class GridNavigator<E extends HTMLElement> {
constructor ({
elementsProvider,
selectCallback,
keyMap = NAV_AND_ARROW_MAP
keyMap = DEFAULT_STANDARD
}: GridNavigatorInit<E>
) {
this.elemsProviderFn = elementsProvider
Expand Down Expand Up @@ -140,7 +140,7 @@ export class GridNavigator<E extends HTMLElement> {

return objectGridNavigator(
this.elems(),
this.rowHt(),
this.columnCount(),
3,
((newEl: E, prevEl: E | null) => {
if (prevEl)
Expand All @@ -158,7 +158,7 @@ export class GridNavigator<E extends HTMLElement> {
* There are certainly other strategies that will do this.
* @private
*/
private rowHt (): number {
private columnCount (): number {
if (this.elems().length < 4) return 1
const x = Math.round(this.elems()[0].offsetLeft)

Expand Down

0 comments on commit a174cc7

Please sign in to comment.