浏览代码

Add width dependency

This is to cover repainting of keys using the widths.
master
父节点
当前提交
c7be66173a
共有 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])
const getKeyLeft = React.useCallback((k) => getKeyLeftUnmemoized(startKey, endKey)(k), [startKey, endKey])
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 isNaturalKey = React.useCallback((k) => isNaturalKeyUnmemoized(k), [])

React.useEffect(() => {


正在加载...
取消
保存