0001-js-invalidate-leaflet-map-when-container-is-displaye.patch
wcs/qommon/static/js/qommon.admin.js | ||
---|---|---|
12 | 12 |
}); |
13 | 13 |
$('.foldable').click(function() { |
14 | 14 |
$(this).toggleClass('folded').next().toggle(); |
15 |
$(this).next().find('.qommon-map').trigger('qommon:invalidate'); |
|
15 | 16 |
}); |
16 | 17 |
$('.foldable.folded').next().hide(); |
17 | 18 |
wcs/qommon/static/js/qommon.map.js | ||
---|---|---|
44 | 44 |
map.marker.setLatLng(coords); |
45 | 45 |
hidden.val(coords.lat + ';' + coords.lng); |
46 | 46 |
}); |
47 |
$map_widget.on('qommon:invalidate', function() { |
|
48 |
map.invalidateSize(); |
|
49 |
}); |
|
47 | 50 |
var is_backoffice = ($map_widget.parents('form').data('is-backoffice') == true); |
48 | 51 |
position_prefil = $map_widget.parent().parent().data('geolocation') == 'position'; |
49 | 52 |
if (! ($map_widget.data('readonly') || is_backoffice) && ($map_widget.data('init-with-geoloc') || position_prefil)) { |
50 |
- |