[Commits] r287 - in core/trunk/geoext: examples lib lib/GeoExt/widgets resources resources/css resources/images resources/images/default resources/images/gray tests tests/lib/GeoExt/widgets

commits at geoext.org commits at geoext.org
Fri Mar 27 14:56:32 CET 2009


Author: ahocevar
Date: 2009-03-27 14:56:31 +0100 (Fri, 27 Mar 2009)
New Revision: 287

Added:
   core/trunk/geoext/examples/popup.html
   core/trunk/geoext/examples/popup.js
   core/trunk/geoext/lib/GeoExt/widgets/Popup.js
   core/trunk/geoext/resources/css/popup.css
   core/trunk/geoext/resources/images/
   core/trunk/geoext/resources/images/default/
   core/trunk/geoext/resources/images/default/anchor.png
   core/trunk/geoext/resources/images/gray/
   core/trunk/geoext/resources/images/gray/anchor.png
   core/trunk/geoext/tests/lib/GeoExt/widgets/Popup.html
Modified:
   core/trunk/geoext/lib/GeoExt.js
   core/trunk/geoext/resources/css/geoext-all-debug.css
   core/trunk/geoext/tests/list-tests.html
Log:
Popups for the GeoExt MapPanel. Thanks sbenthall for the hard work on 
this! The changeset has the following differences from the original 
patch (popup.patch):
 * calls super in beforeDestroy()
 * simplified this.on() in anchor()
 * added/modified some ND comments, especially a Constructor keyword
 * simplified map creation in the example
 * added link to the js file in the example
 * removed unneeded newlines
r=me (closes #21)


Added: core/trunk/geoext/examples/popup.html
===================================================================
--- core/trunk/geoext/examples/popup.html	                        (rev 0)
+++ core/trunk/geoext/examples/popup.html	2009-03-27 13:56:31 UTC (rev 287)
@@ -0,0 +1,34 @@
+<html>
+  <head>
+    <title>GeoExt Popup Example</title>
+
+    <link rel="stylesheet" type="text/css" href="../../ext/resources/css/ext-all.css"></link>
+    <link rel="stylesheet" type="text/css" href="../../ext/examples/shared/examples.css"></link>
+    <link rel="stylesheet" type="text/css" href="../resources/css/geoext-all-debug.css" />
+    <script type="text/javascript" src="../../openlayers/lib/OpenLayers.js"></script>
+    <script type="text/javascript" src="../../ext/adapter/ext/ext-base.js"></script>
+    <script type="text/javascript" src="../../ext/ext-all.js"></script>
+    <script>
+    window.scriptLocation = "../lib/";
+    </script>
+    <script type="text/javascript" src="../lib/GeoExt.js"></script>
+    <script type="text/javascript" src="popup.js"></script>
+
+    <style type="text/css">
+    
+    div#map {
+       width: 650px;
+       height: 400px;
+       position: relative;
+    }
+
+    </style>
+  </head>
+  <body>
+    <h1>Popup Example</h1>
+    <p>Click on the point in the map panel to open a popup.
+    The js is not minified so it is readable. See <a href="popup.js">popup.js</a>.</p>
+    <div id="container"></div>
+
+  </body>
+</html>


Property changes on: core/trunk/geoext/examples/popup.html
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + native

Added: core/trunk/geoext/examples/popup.js
===================================================================
--- core/trunk/geoext/examples/popup.js	                        (rev 0)
+++ core/trunk/geoext/examples/popup.js	2009-03-27 13:56:31 UTC (rev 287)
@@ -0,0 +1,77 @@
+    var mapwin, mapPanel, pop;
+    Ext.onReady(function() {
+
+        /* 
+         * Set up the vector layer.
+         *
+         * Will need a reference to the layer later when
+         * giving it to a SelectFeature control to trigger
+         * the popups.
+         *
+         */
+        var vector = new OpenLayers.Layer.Vector("Vector Layer",{
+            styleMap: new OpenLayers.StyleMap()
+        });
+
+        x = -45;
+        y = 5;
+
+        var point = new OpenLayers.Geometry.Point(x,y);
+        var feature = new OpenLayers.Feature.Vector(point, {
+            name : "MyFeature",
+            id : "42"
+        });
+        vector.addFeatures(feature);
+
+        mapwin = new Ext.Window({
+            layout: "fit",
+            title: "Map",
+            closeAction: "hide",
+            width: 650,
+            height: 356,
+            x: 50,
+            y: 100,
+            items: {
+                xtype: "gx_mappanel",
+                region: "center",
+                layers: [
+                    new OpenLayers.Layer.WMS( 
+                        "OpenLayers WMS",
+                        "http://labs.metacarta.com/wms/vmap0",
+                        {layers: 'basic'} ),
+                    vector
+                ]
+            }
+        });
+
+        mapwin.show();
+
+        mapPanel = mapwin.items.get(0);
+
+        var select = new OpenLayers.Control.SelectFeature(vector, {
+            onSelect : function(feature){
+                openPopup(feature);
+            }
+        });
+        
+        mapPanel.map.addControl(select);
+        select.activate();
+
+    });
+
+
+    function openPopup(feature){
+      pop = new GeoExt.Popup({
+        title: 'My Popup',
+        feature: feature,
+        width:200,
+        html: bogusMarkup,
+        collapsible: true
+      });
+      
+      pop.addToMapPanel(mapPanel);
+    }
+
+    var bogusMarkup = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
+
+


Property changes on: core/trunk/geoext/examples/popup.js
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + native

Added: core/trunk/geoext/lib/GeoExt/widgets/Popup.js
===================================================================
--- core/trunk/geoext/lib/GeoExt/widgets/Popup.js	                        (rev 0)
+++ core/trunk/geoext/lib/GeoExt/widgets/Popup.js	2009-03-27 13:56:31 UTC (rev 287)
@@ -0,0 +1,392 @@
+Ext.namespace("GeoExt.popup");
+/**
+ * Class: GeoExt.Popup
+ * Popups are a specialized Window that supports anchoring
+ *     to a particular feature in a MapPanel.  When a popup
+ *     is anchored to a feature, that means that the popup
+ *     will visibly point to the feature on the map, and move
+ *     accordingly when the map is panned or zoomed.
+ *
+ * Usage example:
+ * (start code)
+ *
+ * var popup = new GeoExt.Popup({
+ *   title: 'My Popup',
+ *   feature: feature,
+ *   width: 200,
+ *   html: "<div>Popup content</div>",
+ *   collapsible: true
+ * })
+ *
+ * (end)
+ *
+ * Inherits from:
+ * - {Ext.Window}
+ */
+
+/**
+ * Constructor: GeoExt.Popup
+ * 
+ * Parameters:
+ * config - {Object} A config object. In addition to the config options
+ *     of its parent class, this object can receive specific options,
+ *     see the API properties to know about these specific options.
+ */
+GeoExt.Popup = Ext.extend(Ext.Window, {
+
+    /**
+     * APIProperty: anchored
+     * {Boolean} True if this popup begins anchored to
+     * its feature.  Defaults to true.
+     */
+    anchored: true,
+
+    /**
+     * APIProperty: panIn
+     * {Boolean} True if the popup should pan the map so
+     * that the popup is fully in view when it is rendered.  Default is true.
+     */
+    panIn: true,
+
+    /**
+     * APIProperty: unpinnable
+     * {Boolean} True if the popup should have a
+     * "unpin" tool that unanchors it from its feature.
+     * Default is true.
+     */
+    unpinnable: true,
+
+    /**
+     * APIProperty: feature
+     * {OpenLayers.Feature} An OpenLayers feature that is this
+     * popup's anchor. Either this or <lonlat> has to be provided.
+     */
+    feature: null,
+
+    /**
+     * APIProperty: lonlat
+     * {OpenLayers.LonLat} An OpenLayers lonlat from which an
+     * anchor feature's geometry is made if no feature is provided.
+     */
+    lonlat: null,
+
+    /*
+     * Some Ext.Window defaults need to be overriden here
+     * because some Ext.Window behavior is not currently supported.
+     */    
+
+    /**
+     * Property: animCollapse
+     * {Boolean} True to animate the transition when the panel is 
+     * collapsed, false to skip the animation.
+     * Collapsing animation is not supported yet for popups.
+     */
+    animCollapse: false,
+
+    /**
+     * Property: draggable
+     * {Boolean} True to enable dragging of this Panel.
+     * Defaults to false because the popup defaults to being
+     * anchored, and anchored popups should not be draggable.
+     */
+    draggable: false,
+
+    /**
+     * Property: shadow
+     * {Boolean} True to give the popup window a shadow.
+     * Defaults to false because shadows are not supported 
+     * yet for popups (the shadow does not look good with 
+     * the anchor).
+     */
+    shadow: false,
+
+    /**
+     * Property: popupCls
+     * {String} CSS class name for the popup DOM elements.
+     */
+    popupCls: "gx-popup",
+
+    /**
+     * Property: ancCls
+     * {String} CSS class name for the popup's anchor.
+     */
+    ancCls: null,
+
+    /**
+     * Method: initComponent
+     *     Initializes the popup.
+     */
+    initComponent: function() {        
+        if (!this.feature && this.lonlat) {
+            this.feature = new OpenLayers.Feature.Vector(
+                new OpenLayers.Geometry.Point(this.lonlat.lon, this.lonlat.lat)
+            );
+        }
+
+        this.baseCls = this.popupCls + " " + this.baseCls;
+
+        this.elements += ',anc';
+
+        GeoExt.Popup.superclass.initComponent.call(this);
+
+    },
+
+    /**
+     * Method: onRender
+     *     Executes when the popup is rendered.
+     */
+    onRender: function(ct, position) {
+        GeoExt.Popup.superclass.onRender.call(this, ct, position);
+        
+        this.ancCls = this.popupCls + "-anc";
+
+        //create anchor dom element.
+        this.createElement("anc", this.el);
+    },
+
+    /**
+     * Method: initTools
+     *     Initializes the tools on the popup.  In particular,
+     *     it adds the 'unpin' tool if the popup is unpinnable.
+     */
+    initTools : function() {
+        if(this.unpinnable) {
+            this.addTool({
+                id: 'unpin',
+                handler: this.unanchor.createDelegate(this, [])
+            });
+        }
+
+        GeoExt.Popup.superclass.initTools.call(this);
+    },
+
+    /**
+     * APIMethod: addToMapPanel
+     *      Adds this popup to a MapPanel.  Assumes that the
+     *      MapPanel's map is already initialized and that the
+     *      Popup's feature is on the map.
+     * 
+     * Parameters:
+     * mapPanel - {<GeoExt.MapPanel>} a MapPanel to which to
+     *     add this popup.
+     */
+    addToMapPanel: function(mapPanel) {
+        this.mapPanel = mapPanel;
+        this.map = this.mapPanel.map;
+
+        mapPanel.add(this);
+        mapPanel.doLayout();
+
+        this.position();
+
+        /* Anchoring */
+        if(this.anchored) {
+            this.anchor();
+        }
+
+        this.show();
+
+        /* Panning */
+        if(this.panIn) {
+            this.panIntoView();
+        }
+    },
+
+    /**
+     * Method: setSize
+     *     Sets the size of the popup, taking into account
+     *     the size of the anchor.
+     *     
+     * Parameters:
+     * w - {Integer}
+     * h - {Integer}
+     */
+    setSize: function(w, h) {
+        if(this.anc) {
+            var ancSize = this.getAnchorElement().getSize();
+            
+            if(typeof w == 'object') {
+                h = w.height - ancSize.height;
+                w = w.width;
+            } else {
+                h = h - ancSize.height;
+            }
+        }
+        GeoExt.Popup.superclass.setSize.call(this, w, h);
+    },
+
+    /**
+     * Method: position
+     *     Positions the popup relative to its feature
+     */
+    position: function() {
+        var centerLonLat = this.feature.geometry.getBounds().getCenterLonLat();
+        var centerPx = this.map.getViewPortPxFromLonLat(centerLonLat);
+
+        //This works for positioning with the anchor on the bottom.
+        
+        //Will have to functionalize this out later and allow
+        //for other positions relative to the feature.
+        var anchorSelector = "div." + this.ancCls;
+
+        var dx = this.anc.down(anchorSelector).getLeft(true) +
+                            this.anc.down(anchorSelector).getWidth() / 2;
+        var dy = this.el.getHeight();
+
+        //Assuming for now that the map viewport takes up
+        //the entire area of the MapPanel
+        this.setPosition(centerPx.x - dx, centerPx.y - dy);
+    },
+
+    /**
+     * Method: getAnchorElement
+     *     Returns the anchor element of the popup
+     *
+     * Returns:
+     * {Ext.Element}
+     */
+    getAnchorElement: function() {
+        var anchorSelector = "div." + this.ancCls;
+        var anc = Ext.get(this.el.child(anchorSelector));
+        return anc;
+    },
+
+    /**
+     * Method: position
+     *     Anchors a popup to its feature
+     *     by registering listeners that reposition the popup
+     *     when the map is moved.
+     */
+    anchor: function() {
+        this.map.events.on({
+            "move" : this.position,
+            scope : this            
+        });
+
+        this.on({
+            "resize": this.position,
+            "collapse": this.position,
+            "expand": this.position,
+            scope: this
+        });
+    },
+
+    /**
+     * APIMethod: unanchor
+     *     Unanchors a popup from its feature.
+     *     Currently, this removes the popup from its MapPanel
+     *     and adds it to the page body.
+     */
+    unanchor: function() {
+        this.unbindFromMapPanel();
+
+        //make the window draggable
+        this.draggable = true;
+        this.header.addClass("x-window-draggable");
+        this.dd = new Ext.Window.DD(this);
+
+        //remove anchor
+        this.getAnchorElement().remove();
+        this.anc = null;
+
+        //hide unpin tool
+        this.tools.unpin.hide();
+
+        //keep track of whether the popup has been collapsed
+        var collapsed = this.collapsed;
+
+        //Steps to move this window out to the body
+        //TODO: Make 'unpinned' container configurable
+        this.mapPanel.remove(this, false);
+
+        this.container = Ext.getBody()
+        
+        var xy = this.getPosition();
+        this.hide();
+        this.el.appendTo(Ext.getBody());
+        this.setPagePosition(xy[0],xy[1]);
+        this.show();
+
+        //recollapse if it was collapsed before
+        if(collapsed) {
+            this.collapse();
+        }
+    },
+
+    /** Method: unbindFromMapPanel
+     *      Utility method for unbinding events that call for
+     *      popup repositioning.
+     */
+    unbindFromMapPanel: function() {
+        //stop position with feature
+        this.map.events.un({
+            "move" : this.position,
+            scope : this
+        });
+
+        this.un("resize", this.position);
+        this.un("collapse", this.position);
+        this.un("expand", this.position);
+    },
+
+    /**
+     *  APIMethod: panIntoView
+     *      Pans the MapPanel's map so that an anchored popup
+     *      can come entirely into view, with padding specified
+     *      as per normal OpenLayers.Map popup padding.
+     */ 
+    panIntoView: function() {
+        if(!this.anchored) {
+            /*
+             * If it's not anchored, panning the map won't put popup into view
+             */
+            return;
+        }
+        this.position();
+        
+        var centerLonLat = this.feature.geometry.getBounds().getCenterLonLat(); 
+        var centerPx = this.map.getViewPortPxFromLonLat(centerLonLat);
+
+        //assumed viewport takes up whole body element of map panel
+        var popupPos =  this.getPosition(true);
+       
+        var panelSize = [this.mapPanel.getInnerWidth(), this.mapPanel.getInnerHeight()]; // [X,Y]
+
+        var popupSize = this.getSize();
+
+        var newPos = [popupPos[0], popupPos[1]];
+
+        //For now, using native OpenLayers popup padding.  This may not be ideal.
+        var padding = this.map.paddingForPopups;
+
+        // X
+        if(popupPos[0] < padding.left) {
+            newPos[0] = padding.left;
+        } else if(popupPos[0] + popupSize.width > panelSize[0] - padding.right) {
+            newPos[0] = panelSize[0] - padding.right - popupSize.width;
+        }
+
+        // Y
+        if(popupPos[1] < padding.top) {
+            newPos[1] = padding.top;
+        } else if(popupPos[1] + popupSize.height > panelSize[1] - padding.bottom) {
+            newPos[1] = panelSize[1] - padding.bottom - popupSize.height;
+        }
+
+        var dx = popupPos[0] - newPos[0];
+        var dy = popupPos[1] - newPos[1];
+
+        this.map.pan(dx, dy);
+    },
+
+    /**
+     * Method: beforeDestroy
+     *     Cleanup events before destroying the popup.
+     */
+    beforeDestroy: function() {
+        this.unbindFromMapPanel();
+        GeoExt.Popup.superclass.beforeDestroy.call(this);
+    }
+});
+
+Ext.reg('gx_popup', GeoExt.Popup); 


Property changes on: core/trunk/geoext/lib/GeoExt/widgets/Popup.js
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + native

Modified: core/trunk/geoext/lib/GeoExt.js
===================================================================
--- core/trunk/geoext/lib/GeoExt.js	2009-03-26 22:06:12 UTC (rev 286)
+++ core/trunk/geoext/lib/GeoExt.js	2009-03-27 13:56:31 UTC (rev 287)
@@ -66,7 +66,8 @@
             "GeoExt/data/LayerStore.js",
             "GeoExt/data/LayerStoreMediator.js",
             "GeoExt/data/ProtocolProxy.js",
-            "GeoExt/widgets/MapPanel.js"
+            "GeoExt/widgets/MapPanel.js",
+            "GeoExt/widgets/Popup.js"
         );
 
         var agent = navigator.userAgent;

Modified: core/trunk/geoext/resources/css/geoext-all-debug.css
===================================================================
--- core/trunk/geoext/resources/css/geoext-all-debug.css	2009-03-26 22:06:12 UTC (rev 286)
+++ core/trunk/geoext/resources/css/geoext-all-debug.css	2009-03-27 13:56:31 UTC (rev 287)
@@ -1,2 +1,2 @@
 @import "example.css";
-
+ at import "popup.css";

Added: core/trunk/geoext/resources/css/popup.css
===================================================================
--- core/trunk/geoext/resources/css/popup.css	                        (rev 0)
+++ core/trunk/geoext/resources/css/popup.css	2009-03-27 13:56:31 UTC (rev 287)
@@ -0,0 +1,21 @@
+
+.gx-popup-anc {
+	background: transparent url(../images/default/anchor.png) no-repeat 0 0;
+        position: relative;
+        top:-1px;
+        left:5px;
+        z-index:2;
+        height:16px;
+        width:31px;
+}
+
+
+.xtheme-gray .gx-popup-anc {
+	background: transparent url(../images/gray/anchor.png) no-repeat 0 0;
+        position: relative;
+        top:-1px;
+        left:5px;
+        z-index:2;
+        height:16px;
+        width:31px;
+}
\ No newline at end of file


Property changes on: core/trunk/geoext/resources/css/popup.css
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + native

Added: core/trunk/geoext/resources/images/default/anchor.png
===================================================================
(Binary files differ)


Property changes on: core/trunk/geoext/resources/images/default/anchor.png
___________________________________________________________________
Name: svn:mime-type
   + image/png

Added: core/trunk/geoext/resources/images/gray/anchor.png
===================================================================
(Binary files differ)


Property changes on: core/trunk/geoext/resources/images/gray/anchor.png
___________________________________________________________________
Name: svn:mime-type
   + image/png

Added: core/trunk/geoext/tests/lib/GeoExt/widgets/Popup.html
===================================================================
--- core/trunk/geoext/tests/lib/GeoExt/widgets/Popup.html	                        (rev 0)
+++ core/trunk/geoext/tests/lib/GeoExt/widgets/Popup.html	2009-03-27 13:56:31 UTC (rev 287)
@@ -0,0 +1,188 @@
+<!DOCTYPE html>
+<html debug="true">
+  <head>
+    <script type="text/javascript" src="../../../../../openlayers/lib/OpenLayers.js"></script>
+    <script type="text/javascript" src="../../../../../ext/adapter/ext/ext-base.js"></script>
+    <script type="text/javascript" src="../../../../../ext/ext-all-debug.js"></script>
+    <script type="text/javascript" src="../../../../lib/GeoExt.js"></script>
+
+
+    <script type="text/javascript">
+
+        function makeFeature() {
+           return new OpenLayers.Feature.Vector(
+              new OpenLayers.Geometry.Point(100,50),
+              {
+                  name : "My Feature"
+              }
+           )
+        }
+
+        function setupContext() {
+            var map = new OpenLayers.Map({
+                projection: new OpenLayers.Projection("EPSG:4326"),                 
+            })
+
+            var vector = new OpenLayers.Layer.Vector("Vector Layer",{
+                styleMap: new OpenLayers.StyleMap()
+            });
+
+            var feature = makeFeature();
+        
+            vector.addFeatures(feature);
+            map.addLayers([
+               new OpenLayers.Layer.WMS( 
+                   "OpenLayers WMS",
+                   "http://labs.metacarta.com/wms/vmap0",
+                   {layers: 'basic'} ),
+               vector
+            ]);
+
+            var view = new Ext.Viewport({
+                layout : "border",
+                items : [{
+                    xtype: "gx_mappanel",
+                    region: "center",
+                    map : map
+                }]
+            });
+
+            return {
+               feature : feature,
+               vector : vector,
+               map : map,
+               mapPanel : view.items.items[0],
+               view : view
+            };
+           
+        }
+
+        function popup(feature){
+          pop = new GeoExt.Popup({
+            title: 'My Popup',
+            feature: feature,
+            width:200,
+            html: bogusMarkup,
+            collapsible: true
+          });
+
+          return pop;
+        }
+
+        var bogusMarkup = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit."
+
+        function test_addtomappanel(t) {
+            t.plan(1);
+
+            var context = setupContext();
+
+            var pop = popup(context.feature, context.mapPanel);
+
+            pop.addToMapPanel(context.mapPanel);
+
+            t.ok(context.mapPanel.el.child("div." + pop.popupCls),"Map panel contains popup");
+        }
+
+        function test_anchor(t) {
+            t.plan(4);
+
+            var context = setupContext();
+
+            var pop = popup(context.feature, context.mapPanel);
+
+            pop.addToMapPanel(context.mapPanel);
+
+            pop.on({
+                'move' : function(c,x,y){
+                    t.ok(true,"Move event fired on " + action); //should happen twice, on call to position()
+                },
+                scope : this
+            });
+
+            t.ok(pop.getAnchorElement(), "Popup has anchor element");
+
+            var action = "map move";
+            context.map.events.triggerEvent("move");
+            
+            action = "popup collapse";
+            pop.collapse();
+
+            action = "popup expand"
+            pop.expand();
+        }
+
+
+        function test_unanchor(t) {
+            t.plan(6);
+
+            var context = setupContext();
+
+            var pop = popup(context.feature, context.mapPanel);
+
+            pop.addToMapPanel(context.mapPanel);
+        
+            pop.collapse();
+
+            var origPos = pop.getPosition();
+
+            pop.unanchor();
+
+            var newPos = pop.getPosition();
+
+            t.ok(!pop.getAnchorElement(),"Anchor element removed");
+            t.ok(!this.collapsed, "Preserved collapsed state");
+            t.ok(!context.mapPanel.el.child("div." + pop.popupCls),"Map panel does not contain popup");
+            t.ok(Ext.getBody().child("div." + pop.popupCls),"Document body contains popup element");
+            t.eq(origPos[0],newPos[0],"Popup remains in same position (X)");
+            t.eq(origPos[1],newPos[1],"Popup remains in same position (Y)");
+
+            pop.on({
+                'move' : function(c,x,y){
+                    t.ok(false,"Move event fired improperly on " + action); //should happen twice, on call to position()
+                },
+                scope : this
+            });
+
+            var action = "map move";
+            context.map.events.triggerEvent("move");
+
+            action = "popup expand"
+            pop.expand();
+            
+            action = "popup collapse";
+            pop.collapse();
+
+        }
+
+        function test_Popup_beforeDestroy(t){
+
+            t.plan(0);
+
+            var context = setupContext();
+            var pop = popup(context.feature, context.mapPanel);
+            pop.addToMapPanel(context.mapPanel);
+
+            pop.on({
+                'move' : function(c,x,y){
+                    t.ok(false,"Move event fired improperly on " + action); //should happen twice, on call to position()
+                },
+                scope : this
+            });
+
+            pop.beforeDestroy();
+
+            var action = "map move";
+            context.map.events.triggerEvent("move");
+
+            action = "popup expand"
+            pop.expand();
+            
+            action = "popup collapse";
+            pop.collapse();
+        }
+
+    </script>
+  <body>
+    <div id="map"></div>
+  </body>
+</html>


Property changes on: core/trunk/geoext/tests/lib/GeoExt/widgets/Popup.html
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + native

Modified: core/trunk/geoext/tests/list-tests.html
===================================================================
--- core/trunk/geoext/tests/list-tests.html	2009-03-26 22:06:12 UTC (rev 286)
+++ core/trunk/geoext/tests/list-tests.html	2009-03-27 13:56:31 UTC (rev 287)
@@ -8,4 +8,5 @@
   <li>lib/GeoExt/data/LayerStoreMediator.html</li>
   <li>lib/GeoExt/data/ProtocolProxy.html</li>
   <li>lib/GeoExt/widgets/MapPanel.html</li>
+  <li>lib/GeoExt/widgets/Popup.html</li>
 </ul>



More information about the Commits mailing list