0001-forms-don-t-let-readonly-maps-be-moved-26036.patch
wcs/qommon/static/js/qommon.map.js | ||
---|---|---|
29 | 29 |
new L.Control.Zoom({position: map_controls_position}).addTo(map); |
30 | 30 |
$map_widget[0].leaflet_map = map; |
31 | 31 |
var gps_control = new L.Control.Gps({position: map_controls_position}); |
32 |
map.addControl(gps_control); |
|
33 | 32 |
var hidden = $(this).prev(); |
34 | 33 |
map.marker = null; |
35 | 34 |
var latlng; |
... | ... | |
47 | 46 |
attribution: map_attribution, |
48 | 47 |
maxZoom: map_options.maxZoom |
49 | 48 |
}).addTo(map); |
50 |
if (! $map_widget.data('readonly')) { |
|
49 |
if ($map_widget.data('readonly')) { |
|
50 |
map.dragging.disable(); |
|
51 |
} else { |
|
52 |
map.addControl(gps_control); |
|
51 | 53 |
map.on('click', function(e) { |
52 | 54 |
$map_widget.trigger('set-geolocation', e.latlng); |
53 | 55 |
}); |
54 |
- |