tweaks to renderer instancing

This commit is contained in:
Vladimir Agafonkin 2013-12-13 23:53:00 -05:00
parent fdae94ce34
commit fe5cd4b127
2 changed files with 4 additions and 7 deletions

View File

@ -184,9 +184,8 @@ L.canvas = function () {
return L.Browser.canvas ? new L.Canvas() : null;
};
if (L.Browser.canvas) {
L.Canvas.instance = L.canvas();
}
L.Canvas.instance = L.canvas();
L.Polyline.prototype._containsPoint = function (p, closed) {
var i, j, k, len, len2, part,

View File

@ -164,9 +164,7 @@ L.extend(L.SVG, {
L.Browser.svg = !!(document.createElementNS && L.SVG.create('svg').createSVGRect);
L.svg = function () {
return new L.SVG();
return L.Browser.svg || L.Browser.vml ? new L.SVG() : null;
};
if (L.Browser.svg) {
L.SVG.instance = L.svg();
}
L.SVG.instance = L.svg();