Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Side cloning #149

Merged
merged 4 commits into from Oct 14, 2021
Merged

[feature] Side cloning #149

merged 4 commits into from Oct 14, 2021

Conversation

steveruizok
Copy link
Collaborator

This PR adds a canClone flag to a shape's ShapeUtil. When one shape of that type is selected, the UI will display buttons to create clones off to the side. Clicking one of these buttons will fire the onShapeClone callback.

Kapture 2021-10-14 at 15 36 25

In TLDraw, you can now clone sticky notes (or any shape marked with canClone: true, though for now this is just the sticky note) either by using the clone buttons or by pressing Tab on an empty sticky. After cloning, a user can optionally translate the note before releasing.

@vercel
Copy link

vercel bot commented Oct 14, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/steveruiz/tldraw/8LshqHjkMxdq5NJXUcu5EVCcdhng
✅ Preview: https://tldraw-git-feature-side-duplication-steveruiz.vercel.app

@steveruizok steveruizok merged commit 46c9ac5 into main Oct 14, 2021
@steveruizok steveruizok deleted the feature-side-duplication branch October 14, 2021 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant