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) {
722722proto . getView = function ( ) {
723723 var map = this . map ;
724724 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 } ;
726728
727729 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+
730733 return {
731734 center : center ,
732735 zoom : map . getZoom ( ) ,
You can’t perform that action at this time.
0 commit comments