[OpenLayers-Commits] r11791 - in sandbox/cmoullet/openlayers: . build examples lib/OpenLayers tests

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Wed Mar 30 10:25:38 EDT 2011


Author: cmoullet
Date: 2011-03-30 07:25:37 -0700 (Wed, 30 Mar 2011)
New Revision: 11791

Modified:
   sandbox/cmoullet/openlayers/
   sandbox/cmoullet/openlayers/build/mobile.cfg
   sandbox/cmoullet/openlayers/examples/mobile-drawing.html
   sandbox/cmoullet/openlayers/examples/mobile-navigation.html
   sandbox/cmoullet/openlayers/examples/mobile.html
   sandbox/cmoullet/openlayers/lib/OpenLayers/Feature.js
   sandbox/cmoullet/openlayers/tests/Feature.html
Log:
Merge with trunk



Property changes on: sandbox/cmoullet/openlayers
___________________________________________________________________
Modified: svn:mergeinfo
   - /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:11161-11775,11777-11787
   + /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:11161-11775,11777-11790

Modified: sandbox/cmoullet/openlayers/build/mobile.cfg
===================================================================
--- sandbox/cmoullet/openlayers/build/mobile.cfg	2011-03-30 14:17:13 UTC (rev 11790)
+++ sandbox/cmoullet/openlayers/build/mobile.cfg	2011-03-30 14:25:37 UTC (rev 11791)
@@ -14,6 +14,11 @@
 OpenLayers/Control/ZoomPanel.js
 OpenLayers/Control/Attribution.js
 OpenLayers/Control/SelectFeature.js
+OpenLayers/Control/DrawFeature.js
+OpenLayers/Control/Panel.js
+OpenLayers/Handler/Point.js
+OpenLayers/Handler/Path.js
+OpenLayers/Handler/Polygon.js
 OpenLayers/Layer/Vector.js
 OpenLayers/Renderer/SVG.js
 OpenLayers/Renderer/Canvas.js

Modified: sandbox/cmoullet/openlayers/examples/mobile-drawing.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/mobile-drawing.html	2011-03-30 14:17:13 UTC (rev 11790)
+++ sandbox/cmoullet/openlayers/examples/mobile-drawing.html	2011-03-30 14:25:37 UTC (rev 11791)
@@ -6,7 +6,7 @@
         <meta name="apple-mobile-web-app-capable" content="yes">
         <link rel="stylesheet" href="style.mobile.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
-        <script src="../lib/OpenLayers.js"></script>
+        <script src="../lib/OpenLayers.js?mobile"></script>
         <script src="mobile-drawing.js"></script>
         <style>
             html, body {

Modified: sandbox/cmoullet/openlayers/examples/mobile-navigation.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/mobile-navigation.html	2011-03-30 14:17:13 UTC (rev 11790)
+++ sandbox/cmoullet/openlayers/examples/mobile-navigation.html	2011-03-30 14:25:37 UTC (rev 11791)
@@ -7,7 +7,7 @@
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.mobile.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
-    <script type="text/javascript" src="../lib/OpenLayers.js"></script>
+    <script type="text/javascript" src="../lib/OpenLayers.js?mobile"></script>
     <script type="text/javascript" src="mobile-navigation.js"></script>
   </head>
   <body onload="init()">

Modified: sandbox/cmoullet/openlayers/examples/mobile.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/mobile.html	2011-03-30 14:17:13 UTC (rev 11790)
+++ sandbox/cmoullet/openlayers/examples/mobile.html	2011-03-30 14:25:37 UTC (rev 11791)
@@ -6,7 +6,7 @@
         <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0;">
         <meta name="apple-mobile-web-app-capable" content="yes">
         <link rel="stylesheet" href="style.mobile.css" type="text/css">
-        <script src="../lib/OpenLayers.js"></script>
+        <script src="../lib/OpenLayers.js?mobile"></script>
         <script src="mobile.js"></script>
         <style>
             html, body {

Modified: sandbox/cmoullet/openlayers/lib/OpenLayers/Feature.js
===================================================================
--- sandbox/cmoullet/openlayers/lib/OpenLayers/Feature.js	2011-03-30 14:17:13 UTC (rev 11790)
+++ sandbox/cmoullet/openlayers/lib/OpenLayers/Feature.js	2011-03-30 14:25:37 UTC (rev 11791)
@@ -7,8 +7,6 @@
 /**
  * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
- * @requires OpenLayers/Marker.js
- * @requires OpenLayers/Popup/AnchoredBubble.js
  */
 
 /**
@@ -53,7 +51,7 @@
      * {<OpenLayers.Class>} The class which will be used to instantiate
      *     a new Popup. Default is <OpenLayers.Popup.AnchoredBubble>.
      */
-    popupClass: OpenLayers.Popup.AnchoredBubble,
+    popupClass: null,
 
     /** 
      * Property: popup 
@@ -187,17 +185,16 @@
     createPopup: function(closeBox) {
 
         if (this.lonlat != null) {
-            
-            var id = this.id + "_popup";
-            var anchor = (this.marker) ? this.marker.icon : null;
-
             if (!this.popup) {
-                this.popup = new this.popupClass(id, 
-                                                 this.lonlat,
-                                                 this.data.popupSize,
-                                                 this.data.popupContentHTML,
-                                                 anchor, 
-                                                 closeBox); 
+                var anchor = (this.marker) ? this.marker.icon : null;
+                var popupClass = this.popupClass ? 
+                    this.popupClass : OpenLayers.Popup.AnchoredBubble;
+                this.popup = new popupClass(this.id + "_popup", 
+                                            this.lonlat,
+                                            this.data.popupSize,
+                                            this.data.popupContentHTML,
+                                            anchor, 
+                                            closeBox); 
             }    
             if (this.data.overflow != null) {
                 this.popup.contentDiv.style.overflow = this.data.overflow;

Modified: sandbox/cmoullet/openlayers/tests/Feature.html
===================================================================
--- sandbox/cmoullet/openlayers/tests/Feature.html	2011-03-30 14:17:13 UTC (rev 11790)
+++ sandbox/cmoullet/openlayers/tests/Feature.html	2011-03-30 14:25:37 UTC (rev 11791)
@@ -7,7 +7,7 @@
     var feature, layer; 
     
     function test_Feature_constructor (t) {
-        t.plan( 7 );
+        t.plan( 6 );
 
         var layer = {};
         var lonlat = new OpenLayers.LonLat(2,1);
@@ -26,11 +26,10 @@
         t.ok( feature.lonlat.equals(lonlat), "feature.lonlat set correctly" );
         t.eq( feature.data.iconURL, iconURL, "feature.data.iconURL set correctly" );
         t.ok( feature.data.iconSize.equals(iconSize), "feature.data.iconSize set correctly" );
-        t.ok( feature.popupClass == OpenLayers.Popup.AnchoredBubble, "default popupClass is AnchoredBubble");
     }
     
     function test_Feature_createPopup (t) {
-        t.plan(1);
+        t.plan(3);
         var layer = {};
         var lonlat = new OpenLayers.LonLat(2,1);
         var iconURL = 'http://boston.openguides.org/features/ORANGE.png';
@@ -45,6 +44,12 @@
         //Safari 3 separates style overflow into overflow-x and overflow-y
         var prop = (OpenLayers.BROWSER_NAME == 'safari') ? 'overflowX' : 'overflow';
         t.eq(popup.contentDiv.style[prop], "auto", 'overflow on popup is correct');
+        t.ok( popup instanceof OpenLayers.Popup.AnchoredBubble, "popup is an AnchoredBubble by defaults");
+        feature.destroyPopup();
+        
+        feature.popupClass = OpenLayers.Popup.FramedCloud;
+        popup = feature.createPopup(); 
+        t.ok( popup instanceof OpenLayers.Popup.FramedCloud, "setting feature.popupClass works");
     }    
     function test_Feature_createMarker (t) {
         t.plan(1);



More information about the Commits mailing list