[fusion-commits] r3010 - in sandbox/adsk/3.1n: layers/MapGuide lib/jxLib widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Mon Oct 23 18:42:22 PDT 2017
Author: zhanga
Date: 2017-10-23 18:42:22 -0700 (Mon, 23 Oct 2017)
New Revision: 3010
Modified:
sandbox/adsk/3.1n/layers/MapGuide/MapGuide.js
sandbox/adsk/3.1n/lib/jxLib/jxlib.uncompressed.js
sandbox/adsk/3.1n/widgets/Maptip.js
Log:
This submission made 3 changes:
1. Suppress Fusion error in client when query features/get map tip
2. Turn off map tip by default
3. Fix a typo
Modified: sandbox/adsk/3.1n/layers/MapGuide/MapGuide.js
===================================================================
--- sandbox/adsk/3.1n/layers/MapGuide/MapGuide.js 2017-10-12 11:43:50 UTC (rev 3009)
+++ sandbox/adsk/3.1n/layers/MapGuide/MapGuide.js 2017-10-24 01:42:22 UTC (rev 3010)
@@ -1844,8 +1844,14 @@
},
parseMapTip: function(xhr) {
- var o;
- var tooltip = Fusion.parseJSON(xhr.responseText);
+ var tooltip;
+ // Don't show error window, just return if the response is invalid.
+ try {
+ tooltip = Fusion.parseJSON(xhr.responseText);
+ }
+ catch (err) {
+ return;
+ }
this.oMaptip = {t:"",h:""};
var t = tooltip['FeatureInformation']['Tooltip'];
if (t) {
@@ -2055,7 +2061,15 @@
},
processSelectedExtendedFeatureInfo: function(r, mergeSelection) {
- var o = Fusion.parseJSON(r.responseText);
+ var o;
+ // Don't show error window, just return if the response is invalid.
+ try {
+ o = Fusion.parseJSON(r.responseText);
+ }
+ catch (err) {
+ this.mapWidget._removeWorker();
+ return;
+ }
var sel = new Fusion.SimpleSelectionObject(o);
var attributes = this.convertExtendedFeatureInfo(o);
if (mergeSelection == true)
@@ -2094,7 +2108,15 @@
},
processSelectedFeatureInfo: function (r, mergeSelection) {
- var o = Fusion.parseJSON(r.responseText);
+ var o;
+ // Don't show error window, just return if the response is invalid.
+ try {
+ o = Fusion.parseJSON(r.responseText);
+ }
+ catch (err) {
+ this.mapWidget._removeWorker();
+ return;
+ }
var newSelection = new Fusion.SimpleSelectionObject(o);
if(mergeSelection == true)
Modified: sandbox/adsk/3.1n/lib/jxLib/jxlib.uncompressed.js
===================================================================
--- sandbox/adsk/3.1n/lib/jxLib/jxlib.uncompressed.js 2017-10-12 11:43:50 UTC (rev 3009)
+++ sandbox/adsk/3.1n/lib/jxLib/jxlib.uncompressed.js 2017-10-24 01:42:22 UTC (rev 3010)
@@ -16972,7 +16972,7 @@
scroll,
size,
left,
- rigbht,
+ right,
top,
bottom,
n,
Modified: sandbox/adsk/3.1n/widgets/Maptip.js
===================================================================
--- sandbox/adsk/3.1n/widgets/Maptip.js 2017-10-12 11:43:50 UTC (rev 3009)
+++ sandbox/adsk/3.1n/widgets/Maptip.js 2017-10-24 01:42:22 UTC (rev 3010)
@@ -180,11 +180,10 @@
if (this.widgetTag.tooltip) {
this.mapTipBtn.setTooltip(this.widgetTag.tooltip);
}
- if (uiObj.options.active) {
- this.mapTipBtn.setActive(true);
- }
+ // turn off map tip by default
+ this.mapTipBtn.setActive(false);
- this.uiObj = uiObj;
+ this.uiObj = uiObj;
},
activate : function() {
More information about the fusion-commits
mailing list