Merge pull request #4404 from Leaflet/fix-4401

Fix regression when setting style of Path with canvas renderer
This commit is contained in:
Iván Sánchez Ortega 2016-04-08 17:50:13 +02:00
commit b74cf171f8
2 changed files with 15 additions and 1 deletions

View File

@ -98,4 +98,18 @@ describe('Canvas', function () {
}); });
describe('#dashArray', function () {
it('can add polyline with dashArray', function () {
var layer = L.polygon(latLngs, {
dashArray: "5,5"
}).addTo(map);
});
it('can setStyle with dashArray', function () {
var layer = L.polygon(latLngs).addTo(map);
layer.setStyle({
dashArray: "5,5"
});
});
});
}); });

View File

@ -103,7 +103,7 @@ L.Canvas = L.Renderer.extend({
}, },
_updateStyle: function (layer) { _updateStyle: function (layer) {
this._updateDashArray(); this._updateDashArray(layer);
this._requestRedraw(layer); this._requestRedraw(layer);
}, },