[fusion-trac] #369: Buffer: Cancel buffer without object
selected invokes a script error.
Fusion
trac_fusion at osgeo.org
Wed Mar 10 04:34:43 EST 2010
#369: Buffer: Cancel buffer without object selected invokes a script error.
---------------------+------------------------------------------------------
Reporter: liuar | Owner: madair
Type: defect | Status: new
Priority: P2 | Milestone: 2.0
Component: Widgets | Version: 2.0 - beta
Severity: Major | Resolution:
Keywords: | External_id: 1308351
State: New | Browser: All
Os: All |
---------------------+------------------------------------------------------
Comment (by liuar):
mapName is a local variable defined in function FillLayerList(). If
there's no object selected, there will be a error like mapName is
undefined in
{{{
function OnCancel()
{
var map = GetParent().Fusion.getMapByName(mapName);
map.clearSelection();
//mf.GotoHomePage();
}
}}}
so, the solution is make the mapName a global variable and check the value
of mapName before getting the map.[[BR]]
{{{
function OnCancel()
{
if(mapName == "undefined")
return;
var map = GetParent().Fusion.getMapByName(mapName);
map.clearSelection();
//mf.GotoHomePage();
}
}}}
--
Ticket URL: <http://trac.osgeo.org/fusion/ticket/369#comment:1>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.
More information about the fusion-trac
mailing list