diff --git a/src/render/canvas/canvas-renderer.ts b/src/render/canvas/canvas-renderer.ts index 069b55d..3375a2d 100644 --- a/src/render/canvas/canvas-renderer.ts +++ b/src/render/canvas/canvas-renderer.ts @@ -5,7 +5,7 @@ import {ElementContainer} from '../../dom/element-container'; import {BORDER_STYLE} from '../../css/property-descriptors/border-style'; import {CSSParsedDeclaration} from '../../css/index'; import {TextContainer} from '../../dom/text-container'; -import {Path, transformPath, reversePath } from '../path'; +import {Path, transformPath, reversePath} from '../path'; import {BACKGROUND_CLIP} from '../../css/property-descriptors/background-clip'; import {BoundCurves, calculateBorderBoxPath, calculateContentBoxPath, calculatePaddingBoxPath} from '../bound-curves'; import {isBezierCurve} from '../bezier-curve'; @@ -692,7 +692,7 @@ export class CanvasRenderer { this.path(shadowPaintingArea); } - this.ctx.shadowOffsetX = maskOffset; + this.ctx.shadowOffsetX = maskOffset; this.ctx.shadowOffsetY = 0; this.ctx.shadowColor = asString(shadow.color); this.ctx.shadowBlur = shadow.blur.number; diff --git a/src/render/path.ts b/src/render/path.ts index cf0bd6e..b853eaa 100644 --- a/src/render/path.ts +++ b/src/render/path.ts @@ -35,9 +35,12 @@ export const transformPath = (path: Path[], deltaX: number, deltaY: number, delt }); }; -export const reversePath = (path: Path[]) : Path[] => { - return path.slice(0).reverse().map((point) => { - return point.reverse(); - }); -} +export const reversePath = (path: Path[]): Path[] => { + return path + .slice(0) + .reverse() + .map(point => { + return point.reverse(); + }); +}; export type Path = Vector | BezierCurve;