Skip to content

Commit

Permalink
Set additional style properties to the wrapper container
Browse files Browse the repository at this point in the history
  • Loading branch information
nagix committed Nov 25, 2020
1 parent b61d4c6 commit 733da34
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.18/dist/js/bootstrap-select.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/mapbox-gl@1.13.0/dist/mapbox-gl.js"></script>
<script src="https://cdn.jsdelivr.net/npm/mapbox-gl-animated-popup@0.1.2"></script>
<script src="https://cdn.jsdelivr.net/npm/mapbox-gl-animated-popup@0.1.3"></script>
<style>
#map-title {
width: 840px;
Expand Down Expand Up @@ -190,7 +190,7 @@ <h2>An animated popup component for <a href="https://github.com/mapbox/mapbox-gl
&lt;title&gt;Attach a popup to a marker instance&lt;/title&gt;<br>
&lt;meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" /&gt;<br>
&lt;script src="https://api.mapbox.com/mapbox-gl-js/v1.13.0/mapbox-gl.js"&gt;&lt;/script&gt;<br>
&lt;script src="https://cdn.jsdelivr.net/npm/mapbox-gl-animated-popup@v0.1.2/dist/mapbox-gl-animated-popup.min.js"&gt;&lt;/script&gt;<br>
&lt;script src="https://cdn.jsdelivr.net/npm/mapbox-gl-animated-popup@v0.1.3/dist/mapbox-gl-animated-popup.min.js"&gt;&lt;/script&gt;<br>
&lt;link href="https://api.mapbox.com/mapbox-gl-js/v1.13.0/mapbox-gl.css" rel="stylesheet" /&gt;<br>
&lt;style&gt;<br>
&nbsp;&nbsp;body { margin: 0; padding: 0; }<br>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mapbox-gl-animated-popup",
"version": "0.1.2",
"version": "0.1.3",
"description": "An animated popup component for Mapbox GL JS",
"main": "dist/mapbox-gl-animated-popup.js",
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ export default class AnimatedPopup extends mapboxgl.Popup {
wrapperContainer = document.createElement('div');
wrapperContainer.className = 'mapboxgl-popup-wrapper';
wrapperContainer.style.position = 'absolute';
wrapperContainer.style.willChange = 'transform';
wrapperContainer.style.pointerEvents = 'none';
wrapperContainer.style.transform = this._container.style.transform;
this._container.style.position = 'relative';
this._container.style.transform = 'scale(0)';
Expand Down

0 comments on commit 733da34

Please sign in to comment.