Closed igorwessel closed 5 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
mermaid-to-excalidraw | ✅ Ready (Inspect) | Visit Preview | May 16, 2024 5:20am |
@ad1992 It was also mentioned about escaping HTML. Does it make sense for mermaid-to-excalidraw to bring this as well? I see that this is a bit out of the scope of this PR, it has to be something a bit more global for all diagrams.
@ad1992 It was also mentioned about escaping HTML. Does it make sense for mermaid-to-excalidraw to bring this as well? I see that this is a bit out of the scope of this PR, it has to be something a bit more global for all diagrams.
I guess you meant font awesome support ? we don't support it yet, it's out of scope of this PR. We can look into that later.
I guess you meant font awesome support ? we don't support it yet, it's out of scope of this PR. We can look into that later.
No but basic support for some HTML tags, for example: <br>
, although you could use \n
. I don't know to what extent we have possibilities here.
In this issue #45, we have some entities using HTML tags to format labels, although I believe we should not support this.
The arrows seems to be breaking in this PR 👇🏻
@ad1992 Apparently, the problem is that the penultimate point is very close to the last point. It may be solved by calculating the distance between the penultimate point and the last point, and only including the penultimate point when it is greater than some limit we define. But I feel there might be something more that I'm not seeing at the moment.
The arrows seems to be breaking in this PR 👇🏻
@ad1992 Apparently, the problem is that the penultimate point is very close to the last point. It may be solved by calculating the distance between the penultimate point and the last point, and only including the penultimate point when it is greater than some limit we define. But I feel there might be something more that I'm not seeing at the moment.
@igorwessel this was working earlier for all arrows but not anymore. Since it is breaking post the changes in this PR, we should be able to fix it in this PR itself.
@ad1992 I implemented two solutions but I'm still undecided about which is the best approach:
I sent the commit with both solutions, both have their pros/cons but should work in the majority of cases. Only comment the check for distance for 1 solution (testing some values I think I reached the ideal of 50.)
And we could check the closure because the problem of repeated edges has returned 😢
I'm will pull the updates from main, and create some tests to ensure.
@ad1992 friendly reminder, you think this distance calculation solution is enough?
@ad1992 friendly reminder, you think this distance calculation solution is enough?
Hi @igorwessel sorry for the delayed response! I am gonna check this soon either tonight or tomorrow morning
@ad1992 it's great! I didn't remember there was a function for hypotenuse in Math haha
Pushed a fix for excluding point when its same as prev point Merging, thanks @igorwessel ✨
Closes https://github.com/excalidraw/mermaid-to-excalidraw/issues/45
Revision
8d58faa38229d2b30b2301f1173c85f525d1995b
There are cases where one entity can have multiple relationships to another entity, we were only considering that there was just one relationship.
31fea663c573940876425ed04e95732955d3b4fb
The filter condition was updated to include points that change in either the x or y direction. This ensures that points on a straight line in the same direction are included in the reflectionPoints array, and ensures line commands when only changes direction.
By ignoring the directions that a line command can make we were only having straight lines.
Testcases