fix: [widgets] worldmap fixed

pull/5705/head
iglocska 2020-03-09 00:32:21 +01:00
parent bebc70a012
commit 584d2c1fdf
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 7 additions and 7 deletions

View File

@ -32,14 +32,14 @@
});
var container_<?= $randomNumber ?> = $('#world-map-<?= $randomNumber ?>').parent().parent();
function resizeDashboardWorldMap() {
var width = container_<?= $randomNumber ?>.width();
var height = container_<?= $randomNumber ?>.height() - 60;
$('#world-map-<?= $randomNumber ?>').css('width', width + 'px');
$('#world-map-<?= $randomNumber ?>').css('height', height + 'px');
$('#world-map-<?= $randomNumber ?>').vectorMap('get','mapObject').updateSize();
function resizeDashboardWorldMap(id) {
var width = eval('container_' + id + '.width()');
var height = eval('container_' + id + '.height() - 60');
$('#world-map-' + id).css('width', width + 'px');
$('#world-map-' + id).css('height', height + 'px');
$('#world-map-' + id).vectorMap('get','mapObject').updateSize();
}
$(document).ready(function() {
resizeDashboardWorldMap();
resizeDashboardWorldMap(<?= $randomNumber ?>);
});
</script>