Coordinates origin change
Novack opened this issue · 2 comments
Novack commented
Hello, we have been looking without luck into how to move the coordinates origin.
Currently, the (0,0) is at the top-left. In our current case we need it at the bottom-left, increasing towards top and right.
Are there any run or export options for his?
Thanks in advance.
twolfson commented
I'm assuming you're using the default binary-tree
layout. The easiest way to perform that would be offsetting the result from that algorithm. This can be done by:
- Defining your own algorithm
- Running
binary-tree
in that algorithm, https://github.com/twolfson/layout/tree/2.2.0#getting-started - Offsetting the results (i.e.
x = width - x
,y = height - y
)