Resolve "Enqueue Room image disappears"
Compare changes
@@ -17,7 +17,9 @@
@@ -26,19 +28,21 @@ function updateRoomInfo(roomId) {
This merge request solves the issue that if someone switches either from submission to question or chooses a different question, the map associated with the currently selected room disappears.
The bug happened by whenever a select option got changed, it took the index of the recently changed to select an image. E.g. option 1 = Submission, option 2 = Question. You switched from submission to question, the map of room with index 2 would be shown, regardless which one was selected. If only the first room had a map, the map would disappear if any option with another index of 1 was chosen.
Changed map_loader.js by checking the currently selected room instead of the most recently changed select option. Also introduced an error function such that there is a fallback if the get request doesn't return anything. Finally did some minor 6refactoring in the lab/enqueue.html such that there is consistency when selecting any of the options.