NetLogo / Galapagos

NetLogo model simulation visualizer (Beak) and the netlogoweb.org website 🐢
https://netlogoweb.org/
Other
62 stars 42 forks source link

Error with Fetch and World Resize #418

Closed drocks13 closed 9 months ago

drocks13 commented 10 months ago

This is a pretty obscure error that I have come across.

Background: We have students work through a tutorial and as part of that they use the 'fetch' extension to get an image of the world that is used to color the patches of their world. At one point we have them replace this image https://raw.githubusercontent.com/SantaFeInstitute/ABMA/master/ch1/ch1_map.png with this image https://raw.githubusercontent.com/SantaFeInstitute/ABMA/master/ch4/ch4_veg.png and then resize the world. Which causes some massive problems with the world not resizing correctly and not working in general. error

To replicate:

  1. Open the attached html model export (also, included the nlogo file, in case you need to recreate it that way).

error examples.zip

  1. In the code, replace the current fetch url with a new one - https://raw.githubusercontent.com/SantaFeInstitute/ABMA/master/ch4/ch4_veg.png
  2. Recompile the code.
  3. Click setup - to be able to see the error better by populating the world with a map, but not needed.
  4. Go into authoring mode.
  5. Right click the view and go to the edit form.
  6. Change the world coords - in this case the x-max goes from 599 to 350 and the y-max from 350 to 180.
  7. Click ok to save the changes, magic - the world is off, it can't be resized and is basically broken with none of it working.

We can restructure the tutorial to avoid this problem so not a critical error for us but thought I would report it, in case it is a real problem for someone else.

LaCuneta commented 9 months ago

This issue is now fixed. It turns out the recompile was enough to trigger the issue, the front end code was losing the ability to see the updates from edits to the view widget.