Преглед на файлове

Remove width dependency

Adding width to calculation does not affect the `getKeyWidth` and `getKeyLeft` methods.
master
TheoryOfNekomata преди 3 години
родител
ревизия
d8163ebe7f
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. +2
    -2
      src/components/Keyboard/Keyboard.tsx

+ 2
- 2
src/components/Keyboard/Keyboard.tsx Целия файл

@@ -82,8 +82,8 @@ const Keyboard: React.FC<Props> = ({

const { natural: NaturalKey = DefaultNaturalKey, accidental: AccidentalKey = DefaultAccidentalKey } = keyComponents!

const getKeyWidth = React.useCallback((k) => getKeyWidthUnmemoized(startKey, endKey)(k), [startKey, endKey, width])
const getKeyLeft = React.useCallback((k) => getKeyLeftUnmemoized(startKey, endKey)(k), [startKey, endKey, width])
const getKeyWidth = React.useCallback((k) => getKeyWidthUnmemoized(startKey, endKey)(k), [startKey, endKey])
const getKeyLeft = React.useCallback((k) => getKeyLeftUnmemoized(startKey, endKey)(k), [startKey, endKey])
const isNaturalKey = React.useCallback((k) => isNaturalKeyUnmemoized(k), [])

React.useEffect(() => {


Зареждане…
Отказ
Запис