umm... now with attachement.

Index: geoext/lib/GeoExt/plugins/PrintExtent.js
===================================================================
--- geoext/lib/GeoExt/plugins/PrintExtent.js	(revision 2243)
+++ geoext/lib/GeoExt/plugins/PrintExtent.js	(working copy)
@@ -56,6 +56,12 @@
      */
     initialConfig: null,
 
+    /** private: showOnInit
+     *  ``Boolean`` Shall the printpage-rectangle be shown when 
+     *  the plugin is initialized?
+     */
+    showOnInit: true,
+
     /** api: config[printProvider]
      *  :class:`GeoExt.data.PrintProvider` The print provider this form
      *  is connected to. Optional if pages are provided.
@@ -165,7 +171,10 @@
         for(var i=0, len=this.pages.length; i<len; ++i) {
             this.addPage(this.pages[i]);
         }
-        this.setUp();
+		
+		if (this.showOnInit) {
+		    this.show();	
+		}
     },
 
     /** api: method[addPage]
@@ -224,25 +233,25 @@
         // FIXME raise the feature up so that it is on top
     },
 
-    /** api: method[setUp]
+    /** api: method[show]
      * 
      *  Sets up the plugin, initializing the ``OpenLayers.Layer.Vector``
      *  layer and ``OpenLayers.Control.TransformFeature``, and centering
      *  the first page if no pages were specified in the configuration.
      */
-    setUp: function() {
+    show: function() {
         this.map.addLayer(this.layer);
         this.map.addControl(this.control);
         this.control.activate();
     },
 
-    /** private: method[tearDown]
+    /** api: method[hide]
      * 
      *  Tear downs the plugin, removing the
      *  ``OpenLayers.Control.TransformFeature`` control and
      *  the ``OpenLayers.Layer.Vector`` layer.
      */
-    tearDown: function() {
+    hide: function() {
         // note: we need to be extra cautious when destroying OpenLayers
         // objects here (the tests will fail if we're not cautious anyway).
         // We use obj.events to test whether an OpenLayers object is
@@ -277,7 +286,7 @@
             this.removePage(this.pages[i]);
         }
 
-        this.tearDown();
+        this.hide();
 
         var control = this.control;
         if(map && map.events &&
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to