[fusion-commits] r2550 - in trunk: text widgets widgets/widgetinfo
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Jul 17 19:21:27 PDT 2012
Author: liuar
Date: 2012-07-17 19:21:27 -0700 (Tue, 17 Jul 2012)
New Revision: 2550
Modified:
trunk/text/en
trunk/widgets/QuickPlot.js
trunk/widgets/widgetinfo/quickplot.xml
Log:
On behalf of Ted Yang.
fix the ticket 2075: http://trac.osgeo.org/mapguide/ticket/2075
The submission is mainly implement the RFC 124:http://trac.osgeo.org/mapguide/wiki/MapGuideRfc124
Modified: trunk/text/en
===================================================================
--- trunk/text/en 2012-07-17 06:23:39 UTC (rev 2549)
+++ trunk/text/en 2012-07-18 02:21:27 UTC (rev 2550)
@@ -429,16 +429,17 @@
POWEREDBYICON = PoweredBy_en.gif
# Quick Plot UI
-QUICKPLOT_HEADER = Quick Plot
-QUICKPLOT_TITLE = Title
-QUICKPLOT_SUBTITLE = Sub title
-QUICKPLOT_PAPER_SIZE = Paper size
-QUICKPLOT_SCALING = Scaling
-QUICKPLOT_DPI = Print DPI
-QUICKPLOT_GENERATE = Generate
-QUICKPLOT_ADVANCED_OPTIONS = Advanced options
-QUICKPLOT_PRINT = Print
-QUICKPLOT_CANCEL = Cancel
-QUICKPLOT_PREVIEW_ERROR = The application resources required to generate the plot exceed the settings defined by the administrator
-QUICKPLOT_RESOLUTION_WARNING = The current settings exceed the map resolution. Zooming out or increasing the scaling will help create a more legible plot
-QUICKPLOT_SCALE_LABEL = Scale
+QUICKPLOT_HEADER = Quick Plot
+QUICKPLOT_TITLE = Title
+QUICKPLOT_SUBTITLE = Sub title
+QUICKPLOT_PAPER_SIZE = Paper size
+QUICKPLOT_SCALING = Scaling
+QUICKPLOT_DPI = Print DPI
+QUICKPLOT_ORIENTATION = Orientation
+QUICKPLOT_ORIENTATION_P = Portrait Orientation
+QUICKPLOT_ORIENTATION_L = Landscape Orientation
+QUICKPLOT_GENERATE = Generate
+QUICKPLOT_ADVANCED_OPTIONS = Advanced options
+QUICKPLOT_PREVIEW_ERROR = The application resources required to generate the plot exceed the settings defined by the administrator
+QUICKPLOT_RESOLUTION_WARNING = The current settings exceed the map resolution. Zooming out or increasing the scaling will help create a more legible plot
+QUICKPLOT_SCALE_LABEL = Scale
Modified: trunk/widgets/QuickPlot.js
===================================================================
--- trunk/widgets/QuickPlot.js 2012-07-17 06:23:39 UTC (rev 2549)
+++ trunk/widgets/QuickPlot.js 2012-07-18 02:21:27 UTC (rev 2550)
@@ -9,7 +9,6 @@
* **********************************************************************/
Fusion.require("widgets/QuickPlot/MapCapturer.js");
-Fusion.require("widgets/QuickPlot/PreviewDialog.js");
Fusion.Widget.QuickPlot = OpenLayers.Class(Fusion.Widget,
{
@@ -47,6 +46,24 @@
this.defaultDpi = parseInt(json.DefaultDpi[0]);
}
+ /******************************************************
+ *
+ *<DefaultMargin>25.4,12.7,12.7,12.7</DefaultMargin>
+ *top,buttom,left,right
+ ******************************************************/
+ if(json.DefaultMargin){
+ try{
+ this.margin = {};
+ var marginArray = json.DefaultMargin[0].split(",");
+ this.margin.top = parseFloat(marginArray[0]);
+ this.margin.buttom = parseFloat(marginArray[1]);
+ this.margin.left = parseFloat(marginArray[2]);
+ this.margin.right = parseFloat(marginArray[3]);
+ }catch(ex){
+ this.margin = null;
+ }
+ }
+
/*
<PaperListEntry>
<Name>Letter</Name>
@@ -187,57 +204,5 @@
}
}
}
- },
-
- /***************************************************************************************
- * The dialogContentLoadedCallback is used to submit the Quick Plot panel's parameters to the preview iframe
- ***************************************************************************************/
- preview: function(dialogConentLoadedCallback, printDpi)
- {
- var map = this.getMapLayer();
- var capture = this.mapCapturer.getCaptureBox();
- var normalizedCapture = this.mapCapturer.getNormalizedCapture();
- var vertices = capture.geometry.getVertices();
- this.options.printDpi = printDpi;
- this.options.showCoordinateLabels = this.showCoordinatesInPreview;
- this.options.showSubTitle = this.showSubTitle;
- var options = {mapInfo : {sessionID : map.getSessionID(), name : map.getMapName()},
- captureInfo : {topLeftCs : {x : vertices[3].x, y : vertices[3].y},
- bottomRightCs : {x : vertices[1].x, y : vertices[1].y},
- paperSize : {w : this.mapCapturer.paperSize.w, h : this.mapCapturer.paperSize.h},
- scaleDenominator : this.mapCapturer.scaleDenominator,
- rotation : this.mapCapturer.rotation,
- center : capture.geometry.getCentroid(),
- params1 : capture.params,
- params2 : normalizedCapture.params},
- params : this.options};
-
- if (!this.previewDialog)
- {
- this.previewDialog = new PreviewDialog(options);
- }
- else
- {
- this.previewDialog.mapInfo = options.mapInfo;
- this.previewDialog.captureInfo = options.captureInfo;
- this.previewDialog.params = options.params;
- }
-
- this.previewDialog.open(dialogConentLoadedCallback);
- },
-
- cancelPreview: function()
- {
- this.previewDialog.cancel();
- },
-
- printPreview: function()
- {
- this.previewDialog.print();
- },
-
- previewInnerLoaded: function()
- {
- this.previewDialog.previewInnerLoaded();
}
});
\ No newline at end of file
Modified: trunk/widgets/widgetinfo/quickplot.xml
===================================================================
--- trunk/widgets/widgetinfo/quickplot.xml 2012-07-17 06:23:39 UTC (rev 2549)
+++ trunk/widgets/widgetinfo/quickplot.xml 2012-07-18 02:21:27 UTC (rev 2550)
@@ -65,6 +65,14 @@
<IsMandatory>false</IsMandatory>
</Parameter>
<Parameter>
+ <Name>DefaultMargin</Name>
+ <Description>Indicates the default Margin to use for plotting. If specified, this will hide the Margin field in the QuickPlot UI and will override whatever Margin is used.</Description>
+ <Type>string</Type>
+ <Label>Margin</Label>
+ <DefaultValue>25.4,12.7,12.7,12.7</DefaultValue>
+ <IsMandatory>false</IsMandatory>
+ </Parameter>
+ <Parameter>
<Name>Disclaimer</Name>
<Description>The legal disclaimer text to show in the preview dialog and final printout</Description>
<Type>string</Type>
More information about the fusion-commits
mailing list