您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

useShapesToRender.ts 409B

12345678910111213
  1. import { useSelector } from 'state'
  2. import { getShapeUtils } from 'state/shape-utils'
  3. import { deepCompareArrays, getPage } from 'utils'
  4. export default function useShapesToRender(): string[] {
  5. return useSelector(
  6. (s) =>
  7. Object.values(getPage(s.data).shapes)
  8. .filter((shape) => shape && !getShapeUtils(shape).isForeignObject)
  9. .map((shape) => shape.id),
  10. deepCompareArrays
  11. )
  12. }