File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
3
## development
4
+ - Fix "Fit to data" zooming (#25 )
4
5
5
6
6
7
## v0.7.0
Original file line number Diff line number Diff line change @@ -337,6 +337,9 @@ export default class WorldMap {
337
337
}
338
338
339
339
panToMapCenter ( options ?: any ) {
340
+
341
+ console . log ( 'panToMapCenter' ) ;
342
+
340
343
// Get a bunch of metadata from settings and data which
341
344
// controls the map centering and zoom level.
342
345
const mapDimensions = this . ctrl . settings . center ;
Original file line number Diff line number Diff line change @@ -411,15 +411,16 @@ export default class WorldmapCtrl extends MetricsPanelCtrl {
411
411
412
412
ctrl . map . resize ( ) ;
413
413
414
- if ( ctrl . mapCenterMoved ) {
415
- ctrl . map . panToMapCenter ( ) ;
416
- }
417
-
418
414
if ( ! ctrl . map . legend && ctrl . panel . showLegend ) {
419
415
ctrl . map . createLegend ( ) ;
420
416
}
421
417
422
418
ctrl . map . drawCircles ( ) ;
419
+
420
+ if ( ctrl . mapCenterMoved ) {
421
+ ctrl . map . panToMapCenter ( ) ;
422
+ }
423
+
423
424
}
424
425
}
425
426
You can’t perform that action at this time.
0 commit comments