Commit 3819c8d
authored
Fix pin example reparenting (tldraw#7206)
Fixes tldraw#6607
### Change type
- [ ] `bugfix`
- [ ] `improvement`
- [ ] `feature`
- [ ] `api`
- [x] `other`
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Reparents a pin to the bound shape’s new parent when the target shape
changes, updating the `onAfterChangeToShape` handler to access
`shapeAfter`.
>
> - **Pin bindings example
(`apps/examples/src/examples/pin-bindings/PinExample.tsx`)**:
> - Update `onAfterChangeToShape` signature to include `shapeAfter`.
> - Reparent pin (`fromId`) to follow the bound shape’s (`toId`) new
`parentId` when it changes.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
733bbed. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent ec6b950 commit 3819c8d
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
278 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
279 | 289 | | |
280 | 290 | | |
281 | 291 | | |
| |||
0 commit comments