[Feature]: Support other custom shapes to have clip path imposed on their children?
xmliszt opened this issue · comments
What's the feature?
I am creating my custom shape, which I would like it to behave similarly to the TLFrameShape
, so that its children shapes will be clipped by its bound when the children are partially out of the bound like what is shown below.
By looking at the source code, I realize this is not possible because https://github.com/tldraw/tldraw/blob/main/packages/editor/src/lib/editor/Editor.ts#L3999-L4001 suggests that we are only getting the masks from ancestors which are strictly TLFrameShape
.
I am not sure if there is a workaround such that I can let the editor use my custom shape type to determine the masks area? Or if not, perhaps it could be a feature enhancement?
Contact Details
Code of Conduct
- I agree to follow this project's Code of Conduct