Stickies: fix sticky note clipping (#3503)

This PR restores masking for sticky notes that are the child of frames.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `bugfix` — Bug fix
pull/3511/head
Steve Ruiz 2024-04-17 10:31:36 +01:00 zatwierdzone przez GitHub
rodzic 413838cd3d
commit 6282f65519
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 1 dodań i 7 usunięć

Wyświetl plik

@ -3973,13 +3973,7 @@ export class Editor extends EventEmitter<TLEventMap> {
/** @internal */
@computed private _getShapeMaskCache(): ComputedCache<Vec[], TLShape> {
return this.store.createComputedCache('pageMaskCache', (shape) => {
// todo: Consider adding a flag for this hardcoded behaviour
if (
isPageId(shape.parentId) ||
shape.type === 'note' ||
this.findShapeAncestor(shape, (v) => v.type === 'note')
)
return undefined
if (isPageId(shape.parentId)) return undefined
const frameAncestors = this.getShapeAncestors(shape.id).filter((shape) =>
this.isShapeOfType<TLFrameShape>(shape, 'frame')