Comments (3)
TLD-2486 [Feature]: convert a grid area to a shape
from tldraw.
I would try to give my proposal on how it could be implemented.
I think this should work similar to how we draw a Rectangle shape.
- Select shape Rectangle
- Drag the mouse
- The start point and the end point form the rectangle
For a Table shape, we can do the same
- Select shape Table
- Drag the mouse
- The start point and the end point form the rectangle area where we can create a table inside this area
- The rectangle area at step 3 covers a specific grid behind it and can create the table on top of that grid
Note that it could work even if the user doesn't enable "Preferences > Show grid."
The app knows about the grid even if it is not shown visually.
The user doesn't need to see the grid because we can show the table shape on the fly, so user knows what is the final shape before release the mouse.
After creating the table shape, the user can easily resize as usual to scale up/down for bigger/smaller cells.
from tldraw.
Maybe I over complicated this shape when relating it with the grid system.
An easier way is just having a normal table shape.
By knowing the drag area, we can compute the number of cells per row/col of the table.
User can resize the whole shape, which will resize the cells accordingly.
=> I updated the original title/description with this simplification.
from tldraw.
Related Issues (20)
- [Feature]: Setting to make default export PNG HOT 1
- [Feature]: Frame selected elements by shortcut HOT 1
- [Bug]: QR code flashes when navigating to new shared project HOT 1
- [Bug]: Android, static loading spinner when going to staging.tldraw.com/new HOT 1
- [Bug]: Undo deletes shape if created while image shape is loading HOT 4
- Unknown error HOT 2
- [Bug]: Pen eraser not working on Safari and Firefox HOT 1
- [Bug]: Error: aUV >= aUV HOT 2
- [Bug]: Right clicking on a selected group changes the selection from the group to the element under the cursor HOT 1
- [Bug]: Wierd circles/loopy structures HOT 1
- [Example] Group layout constraints with bindings HOT 1
- [Bug]: Copy-pasting from tldraw.com to the file using VSCode Plugin produces empty `"records"` field HOT 1
- [Bug]: Shape shifting when scaling HOT 2
- [Bug]: Copying and Pasting Drawings not working on Firefox HOT 1
- [Example] Export whole canvas as image HOT 1
- Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. HOT 1
- [Bug]: Build Error in Next.js Project with tldraw v2.2.1 HOT 1
- [Bug]: Sticker Example - Stickers don't stick HOT 1
- ValidationError: At binding.type: Expected one of "arrow", got "pin"[Bug]: HOT 1
- [Bug]: cannot export image in shared canvas due to CORS error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tldraw.