Added a minimum width to the sledrun info popup so that hopefully ticket #89 (size...
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sat, 28 Dec 2013 17:41:00 +0000 (17:41 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sat, 28 Dec 2013 17:41:00 +0000 (17:41 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrmap/trunk@1850 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wrmap.js

index 1cf1fbed94b54d6ba9767ff64c3f712fe9f433f3..5bbdcabc5ccfc16b47cbb38bc5f8b2604de4d73b 100644 (file)
--- a/wrmap.js
+++ b/wrmap.js
@@ -1,5 +1,18 @@
 "use strict";
 
 "use strict";
 
+// "User defined" popup class to be able to specify a minimum size for the popup,
+// so that Safari 7.0 displays it correctly (see ticket #89).
+OpenLayers.Popup.WrInfo = OpenLayers.Class(OpenLayers.Popup.FramedCloud, {
+       minSize: new OpenLayers.Size(180, 260),
+
+       initialize: function(id, lonlat, contentSize, contentHTML, anchor, closeBox, closeCallback) {
+               OpenLayers.Popup.FramedCloud.prototype.initialize.apply(this, arguments);
+       },
+
+       CLASS_NAME: "OpenLayers.Popup.WrInfo"
+});
+
+
 function init_wrmap(i, jq_map) {
        // define constants
        var EPSG4326 = new OpenLayers.Projection("EPSG:4326"); // lon/lat
 function init_wrmap(i, jq_map) {
        // define constants
        var EPSG4326 = new OpenLayers.Projection("EPSG:4326"); // lon/lat
@@ -298,7 +311,7 @@ function init_wrmap(i, jq_map) {
 
                        // Open popup
                        var selectFeatureControl = this;
 
                        // Open popup
                        var selectFeatureControl = this;
-                       var popup = new OpenLayers.Popup.FramedCloud('sledruninfopopup_' + attr.wiki,
+                       var popup = new OpenLayers.Popup.WrInfo('sledruninfopopup_' + attr.wiki,
                        feature.geometry.getBounds().getCenterLonLat(),
                        null,
                        popup_div.html(),
                        feature.geometry.getBounds().getCenterLonLat(),
                        null,
                        popup_div.html(),