fix eslint

This commit is contained in:
heyoubiao 2020-09-27 17:01:10 +08:00
parent 7816b961fc
commit 72c6f0a004
2 changed files with 10 additions and 7 deletions

View File

@ -5,7 +5,7 @@ import {ElementContainer} from '../../dom/element-container';
import {BORDER_STYLE} from '../../css/property-descriptors/border-style'; import {BORDER_STYLE} from '../../css/property-descriptors/border-style';
import {CSSParsedDeclaration} from '../../css/index'; import {CSSParsedDeclaration} from '../../css/index';
import {TextContainer} from '../../dom/text-container'; 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 {BACKGROUND_CLIP} from '../../css/property-descriptors/background-clip';
import {BoundCurves, calculateBorderBoxPath, calculateContentBoxPath, calculatePaddingBoxPath} from '../bound-curves'; import {BoundCurves, calculateBorderBoxPath, calculateContentBoxPath, calculatePaddingBoxPath} from '../bound-curves';
import {isBezierCurve} from '../bezier-curve'; import {isBezierCurve} from '../bezier-curve';
@ -692,7 +692,7 @@ export class CanvasRenderer {
this.path(shadowPaintingArea); this.path(shadowPaintingArea);
} }
this.ctx.shadowOffsetX = maskOffset; this.ctx.shadowOffsetX = maskOffset;
this.ctx.shadowOffsetY = 0; this.ctx.shadowOffsetY = 0;
this.ctx.shadowColor = asString(shadow.color); this.ctx.shadowColor = asString(shadow.color);
this.ctx.shadowBlur = shadow.blur.number; this.ctx.shadowBlur = shadow.blur.number;

View File

@ -35,9 +35,12 @@ export const transformPath = (path: Path[], deltaX: number, deltaY: number, delt
}); });
}; };
export const reversePath = (path: Path[]) : Path[] => { export const reversePath = (path: Path[]): Path[] => {
return path.slice(0).reverse().map((point) => { return path
return point.reverse(); .slice(0)
}); .reverse()
} .map(point => {
return point.reverse();
});
};
export type Path = Vector | BezierCurve; export type Path = Vector | BezierCurve;