[mapguide-trac] #1136: PATCH: Layer checkbox is not accessed
properly in show function: /www/fusion/layers/Layers.js
MapGuide Open Source
trac_mapguide at osgeo.org
Tue Nov 3 07:32:54 EST 2009
#1136: PATCH: Layer checkbox is not accessed properly in show function:
/www/fusion/layers/Layers.js
--------------------------+-------------------------------------------------
Reporter: poulet1212 | Owner:
Type: defect | Status: new
Priority: medium | Milestone: 2.1
Component: Fusion | Version: 2.1.0
Severity: minor | Keywords:
External_id: |
--------------------------+-------------------------------------------------
In the file: /www/fusion/layers/Layers.js
At line 322, the function:
show: function(noDraw) {
if (this.visible) {
return;
}
this.oMap.showGroup(this, noDraw ? true : false);
this.visible = true;
if (this.legend && this.legend.checkBox) {
this.legend.checkBox.checked = true;
}
},
Should be changed like this to access correctly the legend's checkbox
object of the group:
show: function(noDraw) {
if (this.visible) {
return;
}
this.oMap.showGroup(this, noDraw ? true : false);
this.set('visible', true);
if (this.legend && this.legend.treeItem &&
this.legend.treeItem.checkBox) {
this.legend.treeItem.checkBox.checked = true;
}
},
The same for a layer at line: 469:
show: function(noDraw) {
if (this.visible) {
return;
}
this.set('visible', true);
this.oMap.showLayer(this, noDraw ? true : false);
if (this.legend && this.legend.checkBox) {
this.legend.checkBox.checked = true;
}
},
should be changed like this:
show: function(noDraw) {
if (this.visible) {
return;
}
this.set('visible', true);
this.oMap.showLayer(this, noDraw ? true : false);
if (this.legend && this.legend.treeItem &&
this.legend.treeItem.checkBox) {
this.legend.treeItem.checkBox.checked = true;
}
},
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/1136>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list