Skip to content

Commit cacf1e9

Browse files
committed
Inline coordinates rather than introduce awkward var names
1 parent 4b2623f commit cacf1e9

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/plots/mapbox/mapbox.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -755,19 +755,18 @@ proto.getView = function() {
755755
var canvas = map.getCanvas();
756756
var w = canvas.width;
757757
var h = canvas.height;
758-
var cUL = map.unproject([0, 0]).toArray();
759-
var cUR = map.unproject([w, 0]).toArray();
760-
var cLR = map.unproject([w, h]).toArray();
761-
var cLL = map.unproject([0, h]).toArray();
762-
var coordinates = [cUL, cUR, cLR, cLL];
763-
764758
return {
765759
center: center,
766760
zoom: map.getZoom(),
767761
bearing: map.getBearing(),
768762
pitch: map.getPitch(),
769763
_derived: {
770-
coordinates: coordinates
764+
coordinates: [
765+
map.unproject([0, 0]).toArray(),
766+
map.unproject([w, 0]).toArray(),
767+
map.unproject([w, h]).toArray(),
768+
map.unproject([0, h]).toArray()
769+
]
771770
}
772771
};
773772
};

0 commit comments

Comments
 (0)