[fix] missing border on group shape when unlocked (#2075)
This PR fixes a bug where the indicator on a locked group (or any shape!) would not appear when the shape was unlocked. This happens because the `memo` equality checker filtered out changes to the shape's locked property if they did not effect any other properties.  ### Change Type - [x] `patch` — Bug fix ### Release Notes - Fix case where indicator was not shown when unlocking groups
This commit is contained in:
parent
22955bb0ec
commit
ff9c1655f9
3 changed files with 20 additions and 28 deletions
|
@ -11,7 +11,11 @@ import { OptionalErrorBoundary } from './ErrorBoundary'
|
|||
class ShapeWithPropsEquality {
|
||||
constructor(public shape: TLShape | undefined) {}
|
||||
equals(other: ShapeWithPropsEquality) {
|
||||
return this.shape?.props === other?.shape?.props && this.shape?.meta === other?.shape?.meta
|
||||
return (
|
||||
this.shape?.isLocked === other?.shape?.isLocked &&
|
||||
this.shape?.props === other?.shape?.props &&
|
||||
this.shape?.meta === other?.shape?.meta
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue