[Commits] r2283 - extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux

commits at geoext.org commits at geoext.org
Thu Aug 26 14:52:17 CEST 2010


Author: ahocevar
Date: 2010-08-26 14:52:17 +0200 (Thu, 26 Aug 2010)
New Revision: 2283

Modified:
   extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js
Log:
 * Better resizing - now also supports width changes
 * Respect the component's minWidth and use it for the toolbar


Modified: extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js
===================================================================
--- extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js	2010-08-25 08:38:09 UTC (rev 2282)
+++ extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js	2010-08-26 12:52:17 UTC (rev 2283)
@@ -269,6 +269,7 @@
             emptyText: this.emptyTitleText,
             margins: "0 5 0 0",
             flex: 1,
+            anchor: "100%",
             hideLabel: true,
             plugins: new GeoExt.plugins.PrintProviderField({
                 printProvider: this.printProvider
@@ -385,13 +386,15 @@
         var mapWidth = this.printMapPanel.getWidth();
         // sync form and toolbar width with map width
         this.form.setWidth(mapWidth);
+        // the line with title and legend needs an extra invitation
+        this.form.items.get(0).setWidth(mapWidth);
+        var minWidth = this.initialConfig.minWidth || 0;
         this.items.get(0).setWidth(
-            this.form.ownerCt.el.getPadding("lr") + mapWidth
+            this.form.ownerCt.el.getPadding("lr") + Math.max(mapWidth, minWidth)
         );
-        this.doLayout();
         // shadow does not sync, so do it manually
         var parent = this.ownerCt;
-        if (parent && typeof parent.syncShadow == "function") {
+        if (parent && parent instanceof Ext.Window) {
             this.ownerCt.syncShadow();
         }
         this.resumeEvents();



More information about the Commits mailing list