Fix raster shadow is not drawn (#1555)

Closes #1437
This commit is contained in:
Samuel Asensi 2018-10-09 11:38:52 +02:00 committed by Jürg Lehni
parent fd1a517e84
commit c0abbe1459

View file

@ -751,13 +751,16 @@ var Raster = Item.extend(/** @lends Raster# */{
}
},
_draw: function(ctx) {
_draw: function(ctx, param, viewMatrix) {
var element = this.getElement();
if (element) {
// Handle opacity for Rasters separately from the rest, since
// Rasters never draw a stroke. See Item#draw().
ctx.globalAlpha = this._opacity;
// Call _setStyles() to make sure shadow is drawn (#1437).
this._setStyles(ctx, param, viewMatrix);
// Set context smoothing value according to raster property.
// There's no need to restore original value after drawing due to
// the call to ctx.restore() in Item#draw() after this method call.