Merge pull request #4404 from Leaflet/fix-4401
Fix regression when setting style of Path with canvas renderer
This commit is contained in:
commit
b74cf171f8
@ -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"
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -103,7 +103,7 @@ L.Canvas = L.Renderer.extend({
|
||||
},
|
||||
|
||||
_updateStyle: function (layer) {
|
||||
this._updateDashArray();
|
||||
this._updateDashArray(layer);
|
||||
this._requestRedraw(layer);
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user