Given the following demo website:
http://labs.shifthappens.nl/vagabond/pilot/ . How do I make sure that the infoboxes that are opened, are always panned next to the sidebar element with all the widgets?
I already calculate the distance between the edge of the map and the X offset of the sidebar element + 20px. That is the amount of pixels the infobox needs to move to the left, coming from the right. However, InfoBox does this clearance also on the left side of the map, so when you click the same, open marker again, the map pans some pixels to the other direction again because there is not enough room on the left side of the infobox.
How do I stop the infobox from bouncing the panning from left to right on every click? I have to somehow prevent the infobox to fall behind the sidebar and at the same time make sure there is enough distance between an infobox and the left side of the map when a marker is opened there, too.
I've been trying to wrap my head around this one for quite some time now, please can someone help?