Azgaar / Fantasy-Map-Generator

Web application generating interactive and highly customizable maps

Home Page:https://azgaar.github.io/Fantasy-Map-Generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error moving cursor while editor is still loading

yldrefruz opened this issue · comments

While moving cursor when generator is still loading(espicially when pack.cells is not ready) there will be an TypeError which is uncaught. Function onMouseMove(modules/ui/general.js:77) must only be executed if the generator is completely loaded.

Steps to reproduce

  1. Reload or open generator.
  2. Move your cursor while generator is still loading.
  3. Look for console.
  4. You should see the error message

Expected behavior
Ideally there shouldn't be any thrown errors.

.map file
There isn't any spesific map file since this happens on all maps.

Screenshots
There isn't any screenshots since this happens when generator is still loading and all we see is loading widget.

Console Log

graphUtils.js?v=1.88.02:140 Uncaught TypeError: Cannot read properties of undefined (reading 'q')
    at findCell (graphUtils.js?v=1.88.02:140:28)
    at SVGGElement.handleMouseMove (general.js?v=1.87.03:80:13)
    at SVGGElement.<anonymous> (commonUtils.js?v=1.89.29:59:10)
    at SVGGElement.<anonymous> (d3.min.js:2:10855)

System

  • Version: 1.89.37
  • Browser: Chrome(Probably all browsers)
  • OS: Windows 11 x64
commented

Yes, saw it, should be checked before trying to execute the code that is not yet loaded