OpenLayers.Popup.SideAnchored

For an internal project, I needed some OpenLayers pop-ups which had to look like the Leaflet (or OL3) pop-ups: one of their sides should be anchored at its middlepoint to the marker is spawns from, and visually it has to look like a triangle is at the middlepoint of that side.

So the easiest way was to subclass OpenLayers.Popup into OpenLayers.Popup.SideAnchored. Internally, the behaviour is similar to Anchored, but the pop-up is anchored from one side, and not from one corner. I added some CSS, re-did the background image for the popupMatrix example and actually refactored the popupMatrix example into something more readable.

Please do let me know what you think of this.