mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Implement RefTestRenderer
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/* @flow */
|
||||
'use strict';
|
||||
|
||||
import type {Bounds, BoundCurves, Path} from '../Bounds';
|
||||
import type {Path} from '../drawing/Path';
|
||||
import type {Bounds, BoundCurves} from '../Bounds';
|
||||
import type ImageLoader, {ImageElement} from '../ImageLoader';
|
||||
|
||||
import Color from '../Color';
|
||||
|
||||
@@ -29,7 +29,7 @@ export type TextDecoration = {
|
||||
textDecorationLine: Array<TextDecorationLine>,
|
||||
textDecorationStyle: TextDecorationStyle,
|
||||
textDecorationColor: Color | null
|
||||
} | null;
|
||||
};
|
||||
|
||||
const parseLine = (line: string): TextDecorationLine => {
|
||||
switch (line) {
|
||||
@@ -65,7 +65,7 @@ const parseTextDecorationStyle = (style: string): TextDecorationStyle => {
|
||||
return TEXT_DECORATION_STYLE.SOLID;
|
||||
};
|
||||
|
||||
export const parseTextDecoration = (style: CSSStyleDeclaration): TextDecoration => {
|
||||
export const parseTextDecoration = (style: CSSStyleDeclaration): TextDecoration | null => {
|
||||
const textDecorationLine = parseTextDecorationLine(
|
||||
style.textDecorationLine ? style.textDecorationLine : style.textDecoration
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user