Geometry.parse() issue

We have been trying to implement some custom icons/glyphs into our diagrams using svg paths and the Geometry.parse() function and ran into a weird error where putting a Shape on a node was making the links not touch the node:

image

We found that most of our icons were fine, but a few particular ones were causing this odd behavior.

Doing some investigation, we found that this occurred when two consecutive X values of two ‘C’ lines were identical. Example:

export const CheckGlyph = Geometry.parse(
  `F
  M5.795 10.875 
  L2.325 7.40501
  C2.13817 7.21776 1.88452 7.11252 1.62 7.11252

  C1.35548 7.11252 1.10183 7.21776 **0.914998** 7.40501  
  C0.524998 7.79501 0.524998 8.42501 **0.914998** 8.81501
  
  L5.095 12.995
  C5.485 13.385 6.115 13.385 6.505 12.995
  L17.085 2.41501
  
  C17.475 2.02501 17.475 1.39501 17.08501 1.00501
  C16.8982 0.817757 16.6445 0.712524 16.38 0.712524
  C16.1155 0.712524 15.8618 0.817757 15.675 1.00501
  L5.795 10.875
  Z`
);

If we changed one of those values to be even just .00001 different, everything started working fine. So I imagine this is potentially a divide by 0 error or something similar.

Thanks!

Thanks for the bug report – we’ll look into it.

Thanks again for the reproducible case. We have a beta release of 2.1.53, that should fix this issue, here: https://gojs.net/beta/release/go.js

Could you please substitute it into your app and see if it fixes all your cases?

@liz-codesee, have you had a chance to try the beta 2.1.53 library?