Skip to content

Commit

Permalink
Fix expand mask region for ie and edge
Browse files Browse the repository at this point in the history
  • Loading branch information
frogcat committed Jul 6, 2018
1 parent 26a8ff2 commit f8b1994
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion leaflet-tilelayer-mask.js
Expand Up @@ -60,10 +60,14 @@
var image = mask.appendChild(L.SVG.create("image"));
var size = this.getMaskSize();
mask.setAttribute("id", "leaflet-tilelayer-mask-" + L.stamp(this));
mask.setAttribute("x","-100%");
mask.setAttribute("y","-100%");
mask.setAttribute("width","300%");
mask.setAttribute("height","300%");
image.setAttribute("width", size.x);
image.setAttribute("height", size.y);
image.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", this.options.maskUrl);
rootGroup.setAttribute("mask", "url(#" + mask.getAttribute("id") + ")");
container.setAttribute("mask", "url(#" + mask.getAttribute("id") + ")");
this._container = container;
this._image = image;
this.setCenter(this._map.getSize().divideBy(2));
Expand Down Expand Up @@ -91,6 +95,7 @@
zoom: zoom
};
this._setZoomTransform(level, map.getCenter(), map.getZoom());
L.Util.falseFn(level.el.offsetWidth);
this._levels[zoom] = level;
}
this._level = level;
Expand Down

0 comments on commit f8b1994

Please sign in to comment.