fergaldoyle / image-masonry

A responsive justified image layout grid
MIT License
19 stars 4 forks source link

Uncaught exception in Dijsktra algorithm #10

Open PlkMarudny opened 3 years ago

PlkMarudny commented 3 years ago

Occasionally the following error is thrown when targetRowHeight is increased for the first time (by changing a bound variable)

Uncaught (in promise) Error: Could not find a path from 0 to 30.
    at Object.single_source_shortest_paths (dijkstra.js:86)
    at Object.find_path (dijkstra.js:106)
    at default (justified-layout.js:60)
    at Object.$$self.$$.update (ImageMasonry.svelte.js:437)
    at update (internal.js:760)
    at flush (internal.js:732)

It is a Svelte version.

fergaldoyle commented 3 years ago

Hello,

I haven't been able to replicate this.

Do you have an example (on codepen, jsfiddle, etc) which throws this error?

PlkMarudny commented 3 years ago

I will try, the problem is it appeared in the bigger app, will try to extract; it is reproducible 100%, thanks