Open danielsteinkogler opened 10 months ago
@horenso @markus2330, I have created this issue, providing details about the backend implementation for the drawing layer. I have documented all the properties currently used in the frontend. Please feel free to ask questions or start discussions in this comment section. 😊
Thank you, great work! :heart:
All shapes have following properties in common:
Most important question: Does this include the images? (Can the type be "image"?)
If images are very clumsy to handle in the same layer/endpoint; we actually already had the idea to put images to an extra layer (also for other reasons). Maybe that is the cleaner approach overall?
Are Closed vs. Open polygons/bezier handled via the same endpoints? If yes, we need a boolean to know if they are closed?
Color should be typed, if Typeshare plays well with it, maybe we can use https://docs.rs/image/latest/image/struct.Rgba.html (otherwise we can simply define a struct with 3 or 4 u8, depending on if alpha is needed)
Btw. see also #476, we want creation and modification times/user of every element. For new endpoints we should implement this already. We will discuss this on Monday.
The drawing layer provides multiple shapes/elements that have to stored in database:
shapes:
further elements:
All shapes have following properties in common:
Properties of rectangle
Properties of ellipses
Properties of free lines
Properties of bezier lines
Properties of polygons
Properties of images
(has to be defined)
Endpoints that are needed
for all shapes:
for lines/polygons
Keep in mind: https://github.com/ElektraInitiative/PermaplanT/issues/1168