[fix] Shape rendering (#1670)
This PR fixes shape rendering logic. Remember! memo's 2nd argument returns "when should we NOT render" not "when should we render" ### Change Type - [x] `patch` ### Test Plan 1. Use the draw tool
This commit is contained in:
parent
fd29006538
commit
81ee3381bf
1 changed files with 2 additions and 2 deletions
|
@ -148,7 +148,7 @@ const InnerShape = React.memo(
|
|||
function InnerShape<T extends TLShape>({ shape, util }: { shape: T; util: ShapeUtil<T> }) {
|
||||
return useStateTracking('InnerShape:' + util.type, () => util.component(shape))
|
||||
},
|
||||
(prev, next) => prev.shape.props === next.shape.props || prev.shape.meta === next.shape.meta
|
||||
(prev, next) => prev.shape.props === next.shape.props && prev.shape.meta === next.shape.meta
|
||||
)
|
||||
|
||||
const InnerShapeBackground = React.memo(
|
||||
|
@ -161,7 +161,7 @@ const InnerShapeBackground = React.memo(
|
|||
}) {
|
||||
return useStateTracking('InnerShape:' + util.type, () => util.backgroundComponent?.(shape))
|
||||
},
|
||||
(prev, next) => prev.shape.props === next.shape.props || prev.shape.meta === next.shape.meta
|
||||
(prev, next) => prev.shape.props === next.shape.props && prev.shape.meta === next.shape.meta
|
||||
)
|
||||
|
||||
const CulledShape = React.memo(
|
||||
|
|
Loading…
Reference in a new issue