Replies: 4 comments 2 replies
-
So supporting RTL writing and layout i don't think they map on 1:1 This would be applied just for text, and i wish for the developer to assign origin left/right after inspecting the object by himself. I m strictly convinced that we are feeding the library with too many option i want less of them or simpler one. |
Beta Was this translation helpful? Give feedback.
-
That's my thought as a rtl developer. |
Beta Was this translation helpful? Give feedback.
-
I have faced this issue when tried to implemented objects alignment similar to what we have in other known editors (Align to left, right, center, top, etc) The main concern was that we need to identify each My 2 cents is that WDYT ? |
Beta Was this translation helpful? Give feedback.
-
Perhaps it is a separate thing from origin. WDYT? |
Beta Was this translation helpful? Give feedback.
-
Supporting rtl means supporting originX
start
,end
.Consider a simple common use case.
I have a text object, my app is multi language and I want it to be 50px from the start (left or right depending on the direction)
This is why we need originX
start
,end
.The thing is we will need the parent's size for these calculation in case we are in rtl.
This is not the case in initialization of course. So I thought in case there is no parent ref (group/canvas) we use the object's size the resolve origin and then recalculate from the onAdded method of the parent.
This also means that we will need to recalculate position of objects once their ancestors resize.
Fortunately, now that group is a layout engine that is totally plausible. We're talking about a simple map/array containing these objects and an iteration each layout pass.
@asturur @mistriel thoughts?
Beta Was this translation helpful? Give feedback.
All reactions