From c0abbe1459c2d8b85739b0847714e023d553b39a Mon Sep 17 00:00:00 2001 From: Samuel Asensi Date: Tue, 9 Oct 2018 11:38:52 +0200 Subject: [PATCH] Fix raster shadow is not drawn (#1555) Closes #1437 --- src/item/Raster.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/item/Raster.js b/src/item/Raster.js index 7b6517b9..1904d8bf 100644 --- a/src/item/Raster.js +++ b/src/item/Raster.js @@ -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.