I've been struggling for the last few days with a weird behavior, which is certainly ruining my humour.
I sincerely hope that after I've explained my problem here, I will suddenly find the solution myself (as has happened before). So, here it comes.
My purpose is to show a whole house. So initially, krpano opens on a specific floor and room (full panorama). On the top left, it shows the floorplan of that floor, and on the left bottom, it shows a little map of the whole house, which I'll call the house map.
On the floorplan one can select different rooms on the same floor. If one clicks on a pano icon on the floorplan, that pano opens. So far, so good.
On the house map, one can select a different floor, with a new set of panos. When one clicks on another floor in the house map, then the default pano for that floor loads, and the new floorplan appears on the left top. BUT! Now the pano icons are no longer displayed on top of the floorplan, but apparently behind it (semi-visible because of alpha value 0.90 of floorplan)!
I have not been able to find any bug in my code. The very same code that is used to show the pano icons (image plugins) initially, is also used to display them again after changing the floorplan. They are created on the fly, using "addplugin".
The zorder values (which are about the only things I could think of that could make the icons appear behind the floorplan instead of on top) of both the parent plugin (floorplan) and its children (pano icons) are correct. I can see this when I open the xml in the editor plugin: all the properties of the plugins look perfectly alright, there is no difference between the values as they are when the icons show properly, and the values as they are when the icons don't show. Then, when I click "Load this xml" (without having changed a thing), suddenly the icons are there, as if nothing was ever wrong.
Does anyone have any clue about this spooky behavior?
I tried saving the whole xml to a file, both when the icons show, and when they don't show, and then sorted the contents of both files alphabetically (because not all plugins are shown in the same order each time), and then did a file compare of the sorted files. The only difference was the amount of empty lines.
The xml editor unfortunately only includes the things it knows, so it does not include any of the user data which is inside the original xml (the data that defines the contents of my floors, list of my panos, etc.). But still I'm at a loss what the contents of that data could have to do with my icons showing behind the floorplan instead of in front.
How to reproduce the problem:
- Go here. You will see that the pano icons are present, on the top left.
- click on "penthouse" on the left bottom, so that its floor loads
- click again on the garden (little tree), so that the garden loads
- now you are back at the first place, but you will see that the pano icons are absent on the top left.
- Feel free to compare the plugin values in the xml editor. Feel free to press "load this xml" and stuff like that.
PS. Already on "penthouse", the icons are missing, but it is easier to compare behavior on the same pano.
This is a copy of my project and will stay untouched until a solution is found.
Thanks very much in advance.