Ticket #80 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

(Un-)Checking Group in Legend (Un-)Checks All Contained Layers

Reported by: schneiderei Owned by: madair
Priority: P2 Milestone: 2.0
Component: Widgets Version: 1.0.6
Severity: Major Keywords:
Cc: External ID:
state: New Browser: All
Operating System: All

Description

When a group layer is checked (or unchecked) in the legend, all map layers the group contains are checked (or unchecked, respectively). This behaviour is not what the user expects. If the user, for instance, unchecks a group, all layer it contains should be hidden from the map. If the user checks the group again, the layers that were visible before unchecking -- and only these -- should become visible on the map again. Checking and unchecking a group should not change the visibility status of the layers it contains. Instead, the visibility status of the group should simply override the status of the layers.

I suspect that the problem only occurs when using MapServer. In the functions showGroup() and hideGroup() in MapServer/MapServer?.js, there are the following lines:

-- in showGroup():

for (var i=0; i<group.layers.length; ++i) {

group.layers[i].show();

}

-- in hideGroup();

for (var i=0; i<group.layers.length; ++i) {

group.layers[i].hide();

}

I believe that these lines can be deleted.

Change History

Changed 3 years ago by pagameba

  • type changed from enhancement to defect
  • component changed from MapServer to Widgets
  • milestone changed from 1.1 to 2.0

this should be looked at in conjunction with #98

Changed 3 years ago by madair

  • status changed from new to closed
  • resolution set to fixed

closing; this was fixed as part of another ticket

Note: See TracTickets for help on using tickets.