File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change
1
+ - Fix mapbox derived coordinate for Retina displays [[ #6039 ] ( https://github.com/plotly/plotly.js/pull/6039 )]
Original file line number Diff line number Diff line change @@ -722,11 +722,14 @@ proto.project = function(v) {
722
722
proto . getView = function ( ) {
723
723
var map = this . map ;
724
724
var mapCenter = map . getCenter ( ) ;
725
- var center = { lon : mapCenter . lng , lat : mapCenter . lat } ;
725
+ var lon = mapCenter . lng ;
726
+ var lat = mapCenter . lat ;
727
+ var center = { lon : lon , lat : lat } ;
726
728
727
729
var canvas = map . getCanvas ( ) ;
728
- var w = canvas . width ;
729
- var h = canvas . height ;
730
+ var w = parseInt ( canvas . style . width ) ;
731
+ var h = parseInt ( canvas . style . height ) ;
732
+
730
733
return {
731
734
center : center ,
732
735
zoom : map . getZoom ( ) ,
You can’t perform that action at this time.
0 commit comments