pigeon-maps
Advanced tools
Comparing version 0.19.3 to 0.19.4
@@ -10,2 +10,6 @@ # Change Log | ||
## 0.19.4 - 2021-03-20 | ||
### Changes | ||
- Center align the tiles and overlays when the pre-rendered map is not the same size as on the final rendered page. | ||
## 0.19.3 - 2021-03-20 | ||
@@ -12,0 +16,0 @@ ### Changes |
@@ -1200,3 +1200,6 @@ 'use strict'; | ||
var oldTiles = this.state.oldTiles; | ||
var _this$state11 = this.state, | ||
oldTiles = _this$state11.oldTiles, | ||
width = _this$state11.width, | ||
height = _this$state11.height; | ||
var dprs = this.props.dprs; | ||
@@ -1279,4 +1282,4 @@ var mapUrl = this.props.provider || osm; | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
top: "calc((100% - " + height + "px) / 2)", | ||
left: "calc((100% - " + width + "px) / 2)", | ||
overflow: 'hidden', | ||
@@ -1330,6 +1333,6 @@ willChange: 'transform', | ||
var _this$state11 = this.state, | ||
width = _this$state11.width, | ||
height = _this$state11.height, | ||
center = _this$state11.center; | ||
var _this$state12 = this.state, | ||
width = _this$state12.width, | ||
height = _this$state12.height, | ||
center = _this$state12.center; | ||
var mapState = { | ||
@@ -1372,4 +1375,4 @@ bounds: this.getBounds(), | ||
height: height, | ||
top: 0, | ||
left: 0 | ||
top: "calc((100% - " + height + "px) / 2)", | ||
left: "calc((100% - " + width + "px) / 2)" | ||
}; | ||
@@ -1429,7 +1432,7 @@ return /*#__PURE__*/React__default.createElement("div", { | ||
warningZIndex = _this$props5.warningZIndex; | ||
var _this$state12 = this.state, | ||
showWarning = _this$state12.showWarning, | ||
warningType = _this$state12.warningType, | ||
width = _this$state12.width, | ||
height = _this$state12.height; | ||
var _this$state13 = this.state, | ||
showWarning = _this$state13.showWarning, | ||
warningType = _this$state13.warningType, | ||
width = _this$state13.width, | ||
height = _this$state13.height; | ||
@@ -1472,5 +1475,5 @@ if (metaWheelZoom && metaWheelZoomWarning || twoFingerDrag && twoFingerDragWarning) { | ||
twoFingerDrag = _this$props6.twoFingerDrag; | ||
var _this$state13 = this.state, | ||
width = _this$state13.width, | ||
height = _this$state13.height; | ||
var _this$state14 = this.state, | ||
width = _this$state14.width, | ||
height = _this$state14.height; | ||
var containerStyle = { | ||
@@ -1477,0 +1480,0 @@ width: this.props.width ? width : '100%', |
@@ -1193,3 +1193,6 @@ import React, { Component, useState, useRef, useEffect } from 'react'; | ||
var oldTiles = this.state.oldTiles; | ||
var _this$state11 = this.state, | ||
oldTiles = _this$state11.oldTiles, | ||
width = _this$state11.width, | ||
height = _this$state11.height; | ||
var dprs = this.props.dprs; | ||
@@ -1272,4 +1275,4 @@ var mapUrl = this.props.provider || osm; | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
top: "calc((100% - " + height + "px) / 2)", | ||
left: "calc((100% - " + width + "px) / 2)", | ||
overflow: 'hidden', | ||
@@ -1323,6 +1326,6 @@ willChange: 'transform', | ||
var _this$state11 = this.state, | ||
width = _this$state11.width, | ||
height = _this$state11.height, | ||
center = _this$state11.center; | ||
var _this$state12 = this.state, | ||
width = _this$state12.width, | ||
height = _this$state12.height, | ||
center = _this$state12.center; | ||
var mapState = { | ||
@@ -1365,4 +1368,4 @@ bounds: this.getBounds(), | ||
height: height, | ||
top: 0, | ||
left: 0 | ||
top: "calc((100% - " + height + "px) / 2)", | ||
left: "calc((100% - " + width + "px) / 2)" | ||
}; | ||
@@ -1422,7 +1425,7 @@ return /*#__PURE__*/React.createElement("div", { | ||
warningZIndex = _this$props5.warningZIndex; | ||
var _this$state12 = this.state, | ||
showWarning = _this$state12.showWarning, | ||
warningType = _this$state12.warningType, | ||
width = _this$state12.width, | ||
height = _this$state12.height; | ||
var _this$state13 = this.state, | ||
showWarning = _this$state13.showWarning, | ||
warningType = _this$state13.warningType, | ||
width = _this$state13.width, | ||
height = _this$state13.height; | ||
@@ -1465,5 +1468,5 @@ if (metaWheelZoom && metaWheelZoomWarning || twoFingerDrag && twoFingerDragWarning) { | ||
twoFingerDrag = _this$props6.twoFingerDrag; | ||
var _this$state13 = this.state, | ||
width = _this$state13.width, | ||
height = _this$state13.height; | ||
var _this$state14 = this.state, | ||
width = _this$state14.width, | ||
height = _this$state14.height; | ||
var containerStyle = { | ||
@@ -1470,0 +1473,0 @@ width: this.props.width ? width : '100%', |
{ | ||
"name": "pigeon-maps", | ||
"version": "0.19.3", | ||
"version": "0.19.4", | ||
"description": "ReactJS maps without external dependencies", | ||
@@ -5,0 +5,0 @@ "author": "Marius Andra", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
211866
4945