ivanceras / svgbob

Convert your ascii diagram scribbles into happy little SVG
http://ivanceras.github.io/svgbob-editor/
Apache License 2.0
3.91k stars 112 forks source link

Arrows appearing where they shouldn't #60

Closed Kimbatt closed 3 years ago

Kimbatt commented 4 years ago

When editing, arrowheads sometimes appear at the end of lines. (I encountered this issue with the online editor)

Steps to reproduce:

Start with an empty editor, paste this:

      |
      |
---------------->
      |
      |

Correct result: image

Change to this (edit that one character):

      |
      v
---------------->
      |
      |

The result is still correct: image

Undo it, or change that one character back:

      |
      |
---------------->
      |
      |

The image is incorrect: image

After this, type a letter here:

      |
      |a
---------------->
      |
      |

Image: image

Then erase/undo it:

      |
      |
---------------->
      |
      |

An arrow appeared at the bottom: image

After refreshing the page and pasting the same text back again, it works.

ivanceras commented 4 years ago

This seems like delayed rendering bug. The debounce implementation is quite crude at the moment, therefore you are seeing a render from the previous text.

ivanceras commented 4 years ago

I just pushed out several updates. Please check if this is still an issue.