[fusion-commits] r1862 - trunk/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed May 20 15:55:01 EDT 2009
Author: pagameba
Date: 2009-05-20 15:55:01 -0400 (Wed, 20 May 2009)
New Revision: 1862
Modified:
trunk/widgets/Redline.js
Log:
change to setTimeout as setInterval never seems to clear.
Modified: trunk/widgets/Redline.js
===================================================================
--- trunk/widgets/Redline.js 2009-05-20 19:54:28 UTC (rev 1861)
+++ trunk/widgets/Redline.js 2009-05-20 19:55:01 UTC (rev 1862)
@@ -329,7 +329,7 @@
var url = Fusion.getFusionURL() + this.panelUrl;
var taskPaneTarget = Fusion.getWidgetById(this.widget.sTarget);
- var outpuWin = window;
+ var outputWin = window;
if ( taskPaneTarget ) {
taskPaneTarget.setContent(url);
@@ -337,19 +337,20 @@
} else {
outputWin = window.open(url, this.widget.sTarget, this.widget.sWinFeatures);
}
- outputWin.parent = window;
+ //outputWin.parent = window;
this.taskPaneWin = outputWin;
var initFunction = OpenLayers.Function.bind(this.initPanel, this);
- this.intervalID = setInterval(initFunction,300);
+ setTimeout(initFunction,300);
},
// when the panel is loaded....
initPanel: function() {
- if (!this.taskPaneWin.document.getElementById("panelIsLoaded"))
- return;
- clearInterval(this.intervalID);
- this.intervalID = null;
-
+ if (!this.taskPaneWin.document.getElementById("panelIsLoaded")) {
+ var initFunction = OpenLayers.Function.bind(this.initPanel, this);
+ setTimeout(initFunction,300);
+ return;
+ }
+
// select the default control
var radioName = this.widget.defaultControl.charAt(0).toUpperCase() + this.widget.defaultControl.substr(1);
this.taskPaneWin.document.getElementById("RedlineWidget"+radioName+"Radio").checked = true;
@@ -427,7 +428,7 @@
uploadFile: function() {
this.widget.uploadForm.submit();
var initFunction = OpenLayers.Function.bind(this.initPanel, this);
- this.intervalID = setInterval(initFunction,300);
+ setTimeout(initFunction,300);
},
updateLayerList: function() {
More information about the fusion-commits
mailing list