zesage / panorama

Panorama - Flutter Widget
Apache License 2.0
114 stars 71 forks source link

Update hotspot stream controller when view is updated #22

Closed martintan closed 3 years ago

martintan commented 3 years ago

The hotspots in my Panorama widget are not showing when first starting the app, but only after doing a hot reload. I found out this is because on line 361 of panorama.dart there is a check for scene != null, and so at the start of the app the scene was not yet created for me and therefore no hotspots are created (when I do a hot reload the scene already exists so the hotspots are created).

Another problem I found is that the hotspots do not update their position when the camera view changes (when the user moves the camera around). This line of code solves both problems for me (i.e. hotspot is not showing at beginning, and hotspots do not update position).