[fusion-commits] r2642 - in sandbox/adsk/2.3r.sce: layers/MapGuide/php widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Tue Feb 19 23:00:23 PST 2013


Author: liuar
Date: 2013-02-19 23:00:22 -0800 (Tue, 19 Feb 2013)
New Revision: 2642

Modified:
   sandbox/adsk/2.3r.sce/layers/MapGuide/php/Utilities.php
   sandbox/adsk/2.3r.sce/widgets/Legend.js
Log:
Submit on behalf of Andy Zhang.
This submission is for SCE project.
Remove context menu of Legend tree and limit selection panel 10,000 features. 

Modified: sandbox/adsk/2.3r.sce/layers/MapGuide/php/Utilities.php
===================================================================
--- sandbox/adsk/2.3r.sce/layers/MapGuide/php/Utilities.php	2013-02-19 06:33:33 UTC (rev 2641)
+++ sandbox/adsk/2.3r.sce/layers/MapGuide/php/Utilities.php	2013-02-20 07:00:22 UTC (rev 2642)
@@ -784,8 +784,10 @@
     $srsTarget = null;
     $srsXform = null;
 
-    while ($featureReader->ReadNext())
+    $featureCount = 0;
+    while ($featureReader->ReadNext() && $featureCount < 10000)
     {
+        $featureCount++;
         $properties->$layerName->values[$properties->$layerName->numelements] = array();
         $properties->$layerName->metadata[$properties->$layerName->numelements] = array();
 

Modified: sandbox/adsk/2.3r.sce/widgets/Legend.js
===================================================================
--- sandbox/adsk/2.3r.sce/widgets/Legend.js	2013-02-19 06:33:33 UTC (rev 2641)
+++ sandbox/adsk/2.3r.sce/widgets/Legend.js	2013-02-20 07:00:22 UTC (rev 2642)
@@ -256,21 +256,22 @@
                 label: OpenLayers.i18n('defaultMapTitle'),
                 open: true,
                 draw: this.renderFolderCheckbox,
-                contextMenu: this.getContextMenu(),
+                //contextMenu: this.getContextMenu(),
+                contextMenu: null,
                 'class':'fusionLegendFolder'
             };
             this.oRoot = new Jx.TreeFolder(opt);
             this.oTree.append(this.oRoot);
-            this.oRoot.options.contextMenu.add(
-                new Jx.Menu.Item({
-                    label: OpenLayers.i18n('collapse'),
-                    onClick: OpenLayers.Function.bind(this.collapseBranch, this, this.oRoot)
-                }),
-                new Jx.Menu.Item({
-                    label: OpenLayers.i18n('expand'),
-                    onClick: OpenLayers.Function.bind(this.expandBranch, this, this.oRoot)
-                })
-            );
+            //this.oRoot.options.contextMenu.add(
+            //    new Jx.Menu.Item({
+            //        label: OpenLayers.i18n('collapse'),
+            //        onClick: OpenLayers.Function.bind(this.collapseBranch, this, this.oRoot)
+            //    }),
+            //    new Jx.Menu.Item({
+            //        label: OpenLayers.i18n('expand'),
+            //        onClick: OpenLayers.Function.bind(this.expandBranch, this, this.oRoot)
+            //    })
+            //);
         }
 
         this.extentsChangedWatcher = this.update.bind(this);
@@ -448,21 +449,22 @@
                 label: group.legendLabel,
                 open: group.expandInLegend,
                 draw: this.renderFolderCheckbox,
-                contextMenu: this.getContextMenu(),
+                //contextMenu: this.getContextMenu(),
+                contextMenu: null,
                 'class':'fusionLegendFolder'
             };
             group.legend.treeItem = new Jx.TreeFolder(opt);
             group.legend.treeItem.domObj.store('data', group);
-            group.legend.treeItem.options.contextMenu.add(
-                new Jx.Menu.Item({
-                    label: OpenLayers.i18n('collapse'),
-                    onClick: OpenLayers.Function.bind(this.collapseBranch, this, group.legend.treeItem)
-                }),
-                new Jx.Menu.Item({
-                    label: OpenLayers.i18n('expand'),
-                    onClick: OpenLayers.Function.bind(this.expandBranch, this, group.legend.treeItem)
-                })
-            );
+            //group.legend.treeItem.options.contextMenu.add(
+            //    new Jx.Menu.Item({
+            //        label: OpenLayers.i18n('collapse'),
+            //        onClick: OpenLayers.Function.bind(this.collapseBranch, this, group.legend.treeItem)
+            //    }),
+            //    new Jx.Menu.Item({
+            //        label: OpenLayers.i18n('expand'),
+            //        onClick: OpenLayers.Function.bind(this.expandBranch, this, group.legend.treeItem)
+            //    })
+            //);
 
             folder.append(group.legend.treeItem);
             if(group.legend.treeItem.checkBox)
@@ -710,21 +712,22 @@
             open: layer.expandInLegend,
             draw: hasCheckbox ? this.renderFolderCheckbox : this.renderFolder,
             'class':'fusionLegendItemCheckbox',
-            contextMenu: this.getContextMenu(),
+            //contextMenu: this.getContextMenu(),
+            contextMenu: null,
             // image overrides
             image: this.imgLayerThemeIcon
         };
         var folder = new Jx.TreeFolder(opt);
-        folder.options.contextMenu.add(
-            new Jx.Menu.Item({
-                label: OpenLayers.i18n('collapse'),
-                onClick: OpenLayers.Function.bind(this.collapseBranch, this, folder)
-            }),
-            new Jx.Menu.Item({
-                label: OpenLayers.i18n('expand'),
-                onClick: OpenLayers.Function.bind(this.expandBranch, this, folder)
-            })
-        );
+        //folder.options.contextMenu.add(
+        //    new Jx.Menu.Item({
+        //        label: OpenLayers.i18n('collapse'),
+        //        onClick: OpenLayers.Function.bind(this.collapseBranch, this, folder)
+        //    }),
+        //    new Jx.Menu.Item({
+        //        label: OpenLayers.i18n('expand'),
+        //        onClick: OpenLayers.Function.bind(this.expandBranch, this, folder)
+        //    })
+        //);
 
 
         var layerInfo = layer.oMap.getLayerInfoUrl(layer.layerName);
@@ -781,7 +784,8 @@
             opt.image = this.imgLayerDWFIcon;
             opt.enabled = true;
         }
-        opt.contextMenu = this.getContextMenu();
+        //opt.contextMenu = this.getContextMenu();
+        opt.contextMenu = null;
 
         var item = new Jx.TreeItem(opt);
         if (style && style.iconOpt && style.iconX >= 0 && style.iconY >= 0) {
@@ -848,7 +852,8 @@
             events: {
                 click: this.selected.bindWithEvent(this),
                 dblclick: this.selected.bindWithEvent(this),
-                contextmenu: this.options.contextMenu.show.bindWithEvent(this.options.contextMenu)
+                //contextmenu: this.options.contextMenu.show.bindWithEvent(this.options.contextMenu)
+                contextMenu: null
             }
         });
 
@@ -882,7 +887,8 @@
             events: {
                 click: this.selected.bindWithEvent(this),
                 dblclick: this.selected.bindWithEvent(this),
-                contextmenu: this.options.contextMenu.show.bindWithEvent(this.options.contextMenu)
+                //contextmenu: this.options.contextMenu.show.bindWithEvent(this.options.contextMenu)
+                contextMenu: null
             }
         });
 
@@ -920,7 +926,8 @@
             events: {
                 click: this.selected.bindWithEvent(this),
                 dblclick: this.selected.bindWithEvent(this),
-                contextmenu: this.options.contextMenu.show.bindWithEvent(this.options.contextMenu)
+                //contextmenu: this.options.contextMenu.show.bindWithEvent(this.options.contextMenu)
+                contextMenu: null
             }
         });
 
@@ -952,7 +959,8 @@
             events: {
                 click: this.selected.bindWithEvent(this),
                 dblclick: this.selected.bindWithEvent(this),
-                contextmenu: this.options.contextMenu.show.bindWithEvent(this.options.contextMenu)
+                //contextmenu: this.options.contextMenu.show.bindWithEvent(this.options.contextMenu)
+                contextMenu: null
             }
         });
 



More information about the fusion-commits mailing list