Changeset 9405 for src/django_gheat
- Timestamp:
- Jul 16, 2011, 5:42:35 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/wlheatmap/static/heatmap_extensions.js
r9358 r9405 77 77 */ 78 78 $("#togglelayer").live('click', function(){ 79 status = $(this).attr("checked");80 79 layername = $(this).parents('span').attr('id'); 81 80 layer = map.getLayersByName(layername); 82 layer[0].setVisibility(status); 81 if(this.checked){ 82 layer[0].setVisibility(true); 83 } 84 else{ 85 layer[0].setVisibility(false); 86 } 83 87 }); 84 88 … … 87 91 */ 88 92 $("#togglecat").live("click", function(){ 89 if($(this).attr("checked")){90 status = true;91 }92 else{93 status = false;94 }95 93 layertype = $(this).attr('class'); 96 94 layers = new Array(); 97 95 layers = $('#' + layertype).children('span'); 98 $.each(layers, function(l, layer){ 99 layer = map.getLayersByName(layer.id); 100 layer[0].setVisibility(status); 101 $(this).children('input').attr('checked', status); 102 }); 96 if(this.checked){ 97 $.each(layers, function(l, layer){ 98 layer = map.getLayersByName(layer.id); 99 layer[0].setVisibility(true); 100 $(this).children('input').attr('checked', true); 101 }); 102 } 103 else{ 104 $.each(layers, function(l, layer){ 105 layer = map.getLayersByName(layer.id); 106 layer[0].setVisibility(false); 107 $(this).children('input').attr('checked', false); 108 }); 109 } 103 110 }); 104 111
Note:
See TracChangeset
for help on using the changeset viewer.