kopia lustrzana https://github.com/Tldraw/Tldraw
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 fixpull/3511/head
rodzic
413838cd3d
commit
6282f65519
|
@ -3973,13 +3973,7 @@ export class Editor extends EventEmitter<TLEventMap> {
|
||||||
/** @internal */
|
/** @internal */
|
||||||
@computed private _getShapeMaskCache(): ComputedCache<Vec[], TLShape> {
|
@computed private _getShapeMaskCache(): ComputedCache<Vec[], TLShape> {
|
||||||
return this.store.createComputedCache('pageMaskCache', (shape) => {
|
return this.store.createComputedCache('pageMaskCache', (shape) => {
|
||||||
// todo: Consider adding a flag for this hardcoded behaviour
|
if (isPageId(shape.parentId)) return undefined
|
||||||
if (
|
|
||||||
isPageId(shape.parentId) ||
|
|
||||||
shape.type === 'note' ||
|
|
||||||
this.findShapeAncestor(shape, (v) => v.type === 'note')
|
|
||||||
)
|
|
||||||
return undefined
|
|
||||||
|
|
||||||
const frameAncestors = this.getShapeAncestors(shape.id).filter((shape) =>
|
const frameAncestors = this.getShapeAncestors(shape.id).filter((shape) =>
|
||||||
this.isShapeOfType<TLFrameShape>(shape, 'frame')
|
this.isShapeOfType<TLFrameShape>(shape, 'frame')
|
||||||
|
|
Ładowanie…
Reference in New Issue