Merge pull request #2418 from danzel/ie8-fixes

IE8 fixes.
This commit is contained in:
Vladimir Agafonkin 2014-02-27 17:27:44 +02:00
commit 860fb92461
2 changed files with 10 additions and 7 deletions

View File

@ -23,6 +23,9 @@ L.SVG.include(!L.Browser.vml ? {} : {
_initContainer: function () {
this._container = L.DomUtil.create('div', 'leaflet-vml-container');
this._paths = {};
this._initEvents();
},
_update: function () {
@ -40,19 +43,19 @@ L.SVG.include(!L.Browser.vml ? {} : {
layer._path = L.SVG.create('path');
container.appendChild(layer._path);
if (layer.options.clickable) {
this._initEvents(layer, container);
}
this._updateStyle(layer);
},
_addPath: function (layer) {
this._container.appendChild(layer._container);
var container = layer._container;
this._container.appendChild(container);
this._paths[L.stamp(container)] = layer;
},
_removePath: function (layer) {
L.DomUtil.remove(layer._container);
var container = layer._container;
L.DomUtil.remove(container);
delete this._paths[L.stamp(container)];
},
_updateStyle: function (layer) {

View File

@ -147,7 +147,7 @@ L.SVG = L.Renderer.extend({
},
_fireMouseEvent: function (e) {
this._paths[L.stamp(e.target)]._fireMouseEvent(e);
this._paths[L.stamp(e.target || e.srcElement)]._fireMouseEvent(e);
}
});