hikerpig / pintora

An extensible text-to-diagrams library that works in both browser and node.js
https://pintorajs.vercel.app
MIT License
1.08k stars 22 forks source link

empty else case not handled. #284

Closed jomaway closed 4 weeks ago

jomaway commented 2 months ago

if i end in and if case with an empty else case i have a break in the diagram. See screenshot

Would expect to get a line from the gültig to the small diamond.

partition Noten_einlesen {
  start
      :read input string from user;
      :split string on ',';
      while (iter liste) is (next)
        :note in int umwandeln;
        :note überprüfen;
        if (gültig) then
            :print error;
            end
        else (no)
        endif
      endwhile (done)
      :return liste;

  end

}

Bildschirmfoto vom 2024-05-07 17-33-12

hikerpig commented 2 months ago

I'm not sure if it's a web app cache thing, you may try cmd+shift+R - on OSX , I'm sure windows browser has something similar - to force refresh the page. I do remember that I fixed this some months ago, raised in a similar issue.

Here's my screenshot on the live-editor , the else line does show. image

But hey! When I paste all your example code into the live-editor, an even more bizare layout bug strikes me , I need to fix this, thank you for the example. image

jomaway commented 1 month ago

I used the online live editor. And now i get the same weird connections as in your screenshot

hikerpig commented 4 weeks ago

The strange line corner is fixed in @pintora/diagrams@0.7.4 , the website live editor is also updated.